diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 52c6bebc..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "codium.codium" - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ee29ecad..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "go.toolsEnvVars": { - "GOARCH": "amd64", - "GOOS": "windows" - }, - "go.testEnvVars": { - "GOARCH": "wasm", - "GOOS": "js" - }, - "commentTranslate.hover.enabled": true, - "CodeGPT.apiKey": "OpenAI", - "CodeGPT.Autocomplete.enabled": true -} \ No newline at end of file diff --git a/config/locales/i18n_data.xlsx b/config/locales/i18n_data.xlsx index 03e0c614..954448ae 100644 Binary files a/config/locales/i18n_data.xlsx and b/config/locales/i18n_data.xlsx differ diff --git a/config/locales/i18n_table.xlsx b/config/locales/i18n_table.xlsx index a65e5b9d..b3d29556 100644 Binary files a/config/locales/i18n_table.xlsx and b/config/locales/i18n_table.xlsx differ diff --git a/database/install/alarm_forward_log.sql b/database/install/alarm_forward_log.sql index 78852524..67a420af 100644 --- a/database/install/alarm_forward_log.sql +++ b/database/install/alarm_forward_log.sql @@ -1,28 +1,15 @@ -/* - Navicat Premium Data Transfer - - Source Server : local_mariadb - Source Server Type : MariaDB - Source Server Version : 100338 (10.3.38-MariaDB) - Source Host : localhost:33066 - Source Schema : omc_db - - Target Server Type : MariaDB - Target Server Version : 100338 (10.3.38-MariaDB) - File Encoding : 65001 - - Date: 23/04/2024 14:05:00 -*/ - SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; --- ---------------------------- --- Table structure for alarm_forward_log --- ---------------------------- +-- +-- Table structure for table `alarm_forward_log` +-- + + DROP TABLE IF EXISTS `alarm_forward_log`; + CREATE TABLE `alarm_forward_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `alarm_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, @@ -32,8 +19,8 @@ CREATE TABLE `alarm_forward_log` ( `interface` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `to_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `oper_result` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `log_time` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, + `log_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 209149 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 209163 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; -SET FOREIGN_KEY_CHECKS = 1; +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/measure_task.sql b/database/install/measure_task.sql index e5b474a8..7661d7a0 100644 --- a/database/install/measure_task.sql +++ b/database/install/measure_task.sql @@ -1,54 +1,30 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for table `measure_task` -- + DROP TABLE IF EXISTS `measure_task`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `measure_task` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ne_type` varchar(16) DEFAULT NULL, - `ne_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `kpi_set` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `start_time` varchar(32) DEFAULT NULL, - `end_time` varchar(32) DEFAULT NULL, - `periods` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `schedule` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `granul_option` enum('15M','30M','60M','24H') NOT NULL DEFAULT '15M', - `status` enum('Inactive','Active','Suspend','Deleted') NOT NULL DEFAULT 'Inactive', - `account_id` varchar(32) DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `create_time` datetime DEFAULT current_timestamp(), - `update_time` datetime DEFAULT NULL, - `delete_time` datetime DEFAULT NULL, + +CREATE TABLE `measure_task` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ne_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `kpi_set` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `start_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `end_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `periods` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `schedule` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `granul_option` enum('15M','30M','60M','24H') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '15M', + `status` enum('Inactive','Active','Suspend','Deleted') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Inactive', + `account_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `comment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime NULL DEFAULT NULL, + `delete_time` datetime NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:55 +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/monitor_base.sql b/database/install/monitor_base.sql index 0899e3fb..8616fa05 100644 --- a/database/install/monitor_base.sql +++ b/database/install/monitor_base.sql @@ -23,18 +23,18 @@ DROP TABLE IF EXISTS `monitor_base`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `monitor_base` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', - `cpu` float DEFAULT 0 COMMENT 'cpu使用率', - `load_usage` float DEFAULT 0 COMMENT 'cpu平均使用率', - `cpu_load1` float DEFAULT 0 COMMENT 'cpu使用1分钟', - `cpu_load5` float DEFAULT 0 COMMENT 'cpu使用5分钟', - `cpu_load15` float DEFAULT 0 COMMENT 'cpu使用15分钟', - `memory` float DEFAULT 0 COMMENT '内存使用率', - `ne_type` varchar(32) DEFAULT NULL COMMENT '网元类型', - `ne_id` varchar(32) DEFAULT NULL COMMENT '网元ID', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `cpu` float DEFAULT '0' COMMENT 'cpu使用率', + `load_usage` float DEFAULT '0' COMMENT 'cpu平均使用率', + `cpu_load1` float DEFAULT '0' COMMENT 'cpu使用1分钟', + `cpu_load5` float DEFAULT '0' COMMENT 'cpu使用5分钟', + `cpu_load15` float DEFAULT '0' COMMENT 'cpu使用15分钟', + `memory` float DEFAULT '0' COMMENT '内存使用率', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=108643 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_基本信息'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_基本信息'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/monitor_io.sql b/database/install/monitor_io.sql index c84e4690..fc2e3f87 100644 --- a/database/install/monitor_io.sql +++ b/database/install/monitor_io.sql @@ -23,17 +23,17 @@ DROP TABLE IF EXISTS `monitor_io`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `monitor_io` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', - `name` varchar(50) NOT NULL COMMENT '磁盘名', - `read` int(11) DEFAULT 0 COMMENT '读取K', - `write` int(11) DEFAULT 0 COMMENT '写入K', - `count` int(11) DEFAULT 0 COMMENT '读写次数', - `time` int(11) DEFAULT 0 COMMENT '读写延迟', - `ne_type` varchar(32) DEFAULT NULL COMMENT '网元类型', - `ne_id` varchar(32) DEFAULT NULL COMMENT '网元ID', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '磁盘名', + `read` int DEFAULT '0' COMMENT '读取K', + `write` int DEFAULT '0' COMMENT '写入K', + `count` int DEFAULT '0' COMMENT '读写次数', + `time` int DEFAULT '0' COMMENT '读写延迟', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=201014 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_磁盘IO'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_磁盘IO'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/monitor_network.sql b/database/install/monitor_network.sql index 5348c74b..06d1f604 100644 --- a/database/install/monitor_network.sql +++ b/database/install/monitor_network.sql @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS `monitor_network`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `monitor_network` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', - `name` varchar(50) NOT NULL COMMENT '网卡名', - `up` float DEFAULT 0 COMMENT '上行', - `down` float DEFAULT 0 COMMENT '下行', - `ne_type` varchar(32) DEFAULT NULL COMMENT '网元类型', - `ne_id` varchar(32) DEFAULT NULL COMMENT '网元ID', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网卡名', + `up` float DEFAULT '0' COMMENT '上行', + `down` float DEFAULT '0' COMMENT '下行', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=821562 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_网络IO'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_网络IO'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/ne_host.sql b/database/install/ne_host.sql new file mode 100644 index 00000000..56a6e773 --- /dev/null +++ b/database/install/ne_host.sql @@ -0,0 +1,63 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- +-- Table structure for table `ne_host` +-- + + +DROP TABLE IF EXISTS `ne_host`; + +CREATE TABLE `ne_host` ( + `host_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主机主键', + `host_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机类型 ssh telnet', + `group_id` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '分组(0默认 1网元 2系统)', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题名称', + `addr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机地址', + `port` int NULL DEFAULT 22 COMMENT 'SSH端口', + `user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机用户名', + `auth_mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '认证模式(0密码 1主机私钥 2已免密)', + `password` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证密码', + `private_key` varchar(6000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证私钥', + `pass_phrase` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证私钥密码', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`host_id`) USING BTREE, + UNIQUE INDEX `uk_type_group_title`(`host_type` ASC, `group_id` ASC, `title` ASC) USING BTREE COMMENT '同组内名称唯一' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元主机表' ROW_FORMAT = DYNAMIC; + +-- 初始数据对应网元 +INSERT INTO `ne_host` VALUES (1, 'ssh', '1', 'OMC_001_22', '172.16.5.100', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (2, 'telnet', '1', 'OMC_001_4100', '172.16.5.100', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (3, 'ssh', '1', 'IMS_001_22', '172.16.5.110', 22, 'manager', '2', '', '', '', '', 'admin', 1708314682742, NULL, 0); +INSERT INTO `ne_host` VALUES (4, 'telnet', '1', 'IMS_001_4100', '172.16.5.110', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (5, 'ssh', '1', 'AMF_001_22', '172.16.5.120', 22, 'manager', '2', '', '', '', '', 'admin', 1708314682742, NULL, 0); +INSERT INTO `ne_host` VALUES (6, 'telnet', '1', 'AMF_001_4100', '172.16.5.120', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (7, 'ssh', '1', 'AUSF_001_22', '172.16.5.130', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (8, 'telnet', '1', 'AUSF_001_4100', '172.16.5.130', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (9, 'ssh', '1', 'UDM_001_22', '172.16.5.140', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (10, 'telnet', '1', 'UDM_001_4100', '172.16.5.140', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (11, 'ssh', '1', 'SMF_001_22', '172.16.5.150', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (12, 'telnet', '1', 'SMF_001_4100', '172.16.5.150', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (13, 'ssh', '1', 'PCF_001_22', '172.16.5.160', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (14, 'telnet', '1', 'PCF_001_4100', '172.16.5.160', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (15, 'ssh', '1', 'NSSF_001_22', '172.16.5.170', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (16, 'telnet', '1', 'NSSF_001_4100', '172.16.5.170', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (17, 'ssh', '1', 'NRF_001_22', '172.16.5.180', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (18, 'telnet', '1', 'NRF_001_4100', '172.16.5.180', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (19, 'ssh', '1', 'UPF_001_22', '172.16.5.190', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (20, 'telnet', '1', 'UPF_001_4100', '172.16.5.190', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (21, 'telnet', '1', 'UPF_001_5002', '172.16.5.190', 5002, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (22, 'ssh', '1', 'LMF_001_22', '172.16.5.200', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (23, 'telnet', '1', 'LMF_001_4100', '172.16.5.200', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (24, 'ssh', '1', 'NEF_001_22', '172.16.5.210', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (25, 'telnet', '1', 'NEF_001_4100', '172.16.5.210', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (26, 'ssh', '1', 'MME_001_22', '172.16.5.220', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (27, 'telnet', '1', 'MME_001_4100', '172.16.5.220', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (28, 'ssh', '1', 'N3IWF_001_22', '172.16.5.230', 22, 'manager', '2', '', '', '', '', 'admin', 1708333292882, NULL, 0); +INSERT INTO `ne_host` VALUES (29, 'telnet', '1', 'N3IWF_001_4100', '172.16.5.230', 4100, 'admin', '0', '', '', '', '', 'admin', 1708333292882, NULL, 0); + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_host_cmd.sql b/database/install/ne_host_cmd.sql new file mode 100644 index 00000000..50b218f4 --- /dev/null +++ b/database/install/ne_host_cmd.sql @@ -0,0 +1,26 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- +-- Table structure for table `ne_host_cmd` +-- + + +DROP TABLE IF EXISTS `ne_host_cmd`; + +CREATE TABLE `ne_host_cmd` ( + `cmd_id` bigint NOT NULL AUTO_INCREMENT COMMENT '命令主键', + `cmd_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '命令类型', + `group_id` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '分组(0默认 1快速命令)', + `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题名称', + `command` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '命令字符串', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`cmd_id`) USING BTREE, + UNIQUE INDEX `uk_type_group_title`(`cmd_type` ASC, `group_id` ASC, `title` ASC) USING BTREE COMMENT '同组内名称唯一' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元主机命令表' ROW_FORMAT = DYNAMIC; + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_info.sql b/database/install/ne_info.sql index 8ea39bda..797dfb07 100644 --- a/database/install/ne_info.sql +++ b/database/install/ne_info.sql @@ -1,55 +1,53 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for table `ne_info` -- + DROP TABLE IF EXISTS `ne_info`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; + CREATE TABLE `ne_info` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ne_type` varchar(32) NOT NULL, - `ne_id` varchar(32) NOT NULL DEFAULT '', - `rm_uid` varchar(40) DEFAULT NULL, - `ne_name` varchar(64) DEFAULT NULL, - `ip` varchar(128) DEFAULT '', - `port` int(11) DEFAULT NULL, - `pv_flag` enum('PNF','VNF') DEFAULT 'PNF', - `province` varchar(32) DEFAULT NULL, - `vendor_name` varchar(64) DEFAULT NULL, - `dn` varchar(255) DEFAULT NULL, - `ne_address` varchar(64) DEFAULT NULL, - `status` int(11) DEFAULT 0 COMMENT '0: 在线 1: 下线 2: 备用 3: 待下发配置', - `update_time` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `host_ids` varchar(64) DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet,telnet)', + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `rm_uid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `port` int NULL DEFAULT 0 COMMENT '端口', + `pv_flag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'PNF' COMMENT '\'PNF\',\'VNF\'', + `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '省份地域', + `vendor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-', + `dn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ne_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'MAC地址', + `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet,telnet)', + `status` int NULL DEFAULT 0 COMMENT '0离线 1在线 2配置待下发', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `idx_netype_neid` (`ne_type`,`ne_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='网元信息表'; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + UNIQUE INDEX `ux_netype_neid`(`ne_type` ASC, `ne_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元信息表 对应一个网元版本、网元授权、网元主机' ROW_FORMAT = DYNAMIC; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +-- 初始网元数据 +INSERT INTO `ne_info` VALUES (1, 'OMC', '001', '4400HXOMC001', 'OMC_001', '172.16.5.100', 33030, 'PNF', '-', '-', '-', '-', '1,2', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (2, 'IMS', '001', '4400HXIMS001', 'IMS_001', '172.16.5.110', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (3, 'AMF', '001', '4400HXAMF001', 'AMF_001', '172.16.5.120', 33030, 'PNF', '-', '-', '-', '', '5,6', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (4, 'AUSF', '001', '4400HXAUSF001', 'AUSF_001', '172.16.5.130', 33030, 'PNF', '-', '-', '-', '', '7,8', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (5, 'UDM', '001', '4400HXUDM001', 'UDM_001', '172.16.5.140', 33030, 'PNF', '-', '-', '-', '-', '9,10', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (6, 'SMF', '001', '4400HXSMF001', 'SMF_001', '172.16.5.150', 33030, 'PNF', '-', '-', '-', '-', '11,12', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (7, 'PCF', '001', '4400HXPCF001', 'PCF_001', '172.16.5.160', 33030, 'PNF', '-', '-', '-', '-', '13,14', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (8, 'NSSF', '001', '4400HXNSF001', 'NSSF_001', '172.16.5.170', 33030, 'PNF', '-', '-', '-', '-', '15,16', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (9, 'NRF', '001', '4400HXNRF001', 'NRF_001', '172.16.5.180', 33030, 'PNF', '-', '-', '-', '-', '17,18', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (10, 'UPF', '001', '4400HXUPF001', 'UPF_001', '172.16.5.190', 33030, 'PNF', '-', '-', '-', '', '19,20,21', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (11, 'LMF', '001', '4400HXLMF001', 'LMF_001', '172.16.5.200', 33030, 'PNF', '-', '-', '-', '-', '22,23', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (12, 'NEF', '001', '4400HXNEF001', 'NEF_001', '172.16.5.210', 33030, 'PNF', '-', '-', '-', '-', '24,25', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (13, 'MME', '001', '4400HXMME001', 'MME_001', '172.16.5.220', 33030, 'PNF', '-', '-', '-', '', '26,27', 0, '', '', 0, '', 0); +INSERT INTO `ne_info` VALUES (14, 'N3IWF', '001', '4400HXN3IWF001', 'N3IWF_001', '172.16.5.230', 33030, 'PNF', '-', '-', '-', '', '28,29', 0, '', '', 0, '', 0); --- Dump completed on 2024-03-06 17:26:57 + + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_license.sql b/database/install/ne_license.sql index 47b7d681..058d3a5a 100644 --- a/database/install/ne_license.sql +++ b/database/install/ne_license.sql @@ -1,54 +1,45 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for table `ne_license` -- + DROP TABLE IF EXISTS `ne_license`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ne_license` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ne_type` varchar(16) DEFAULT NULL, - `ne_id` varchar(32) DEFAULT '', - `serial_no` varchar(16) DEFAULT NULL, - `capcity` int(11) DEFAULT NULL, - `used` int(11) DEFAULT NULL, - `feature_enabled` varchar(64) DEFAULT NULL, - `expiration_date` varchar(16) DEFAULT NULL, - `status` enum('ACTIVE','INACTIVE','PENDING') DEFAULT 'ACTIVE', - `path` varchar(128) DEFAULT NULL, - `file_name` varchar(64) DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `created_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `updated_at` datetime DEFAULT NULL, - `deleted_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='NE license management'; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +CREATE TABLE `ne_license` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID', + `activation_request_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '激活申请代码', + `license_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '激活授权文件', + `serial_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '序列号', + `expiry_date` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '许可证到期日期', + `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态 0无效 1有效', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和网元ID' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元授权激活信息' ROW_FORMAT = DYNAMIC; --- Dump completed on 2024-03-06 17:26:57 +-- 初始数据对应网元 +INSERT INTO `ne_license` VALUES (1, 'OMC', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (2, 'IMS', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (3, 'AMF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (4, 'AUSF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (5, 'UDM', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (6, 'SMF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (7, 'PCF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (8, 'NSSF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (9, 'NRF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (10, 'UPF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (11, 'LMF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (12, 'NEF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (13, 'MME', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); +INSERT INTO `ne_license` VALUES (14, 'N3IWF', '001', '', '', '', '', '0', '', 'supervisor', 1713928436971, '', 0); + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_software.sql b/database/install/ne_software.sql index 266c246b..aa89eb93 100644 --- a/database/install/ne_software.sql +++ b/database/install/ne_software.sql @@ -1,49 +1,26 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for table `ne_software` -- + DROP TABLE IF EXISTS `ne_software`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; + CREATE TABLE `ne_software` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ne_type` varchar(32) DEFAULT NULL, - `file_name` varchar(64) DEFAULT NULL, - `path` varchar(128) DEFAULT '', - `version` varchar(32) DEFAULT NULL, - `md5_sum` varchar(64) DEFAULT NULL, - `status` enum('Uploaded','Inactive','Active') DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `update_time` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `patch_time` datetime DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包名称', + `path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '包路径', + `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包版本', + `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '包说明', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者', + `update_time` bigint DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `uk_type_name_version` (`ne_type`,`name`,`version`) USING BTREE COMMENT '唯一网元类型和文件名版本是否唯一' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='网元软件包'; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:57 +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_state.sql b/database/install/ne_state.sql index 6d8bdad3..c9cc4de7 100644 --- a/database/install/ne_state.sql +++ b/database/install/ne_state.sql @@ -1,41 +1,28 @@ -/* - Navicat Premium Data Transfer - - Source Server : local_mariadb - Source Server Type : MariaDB - Source Server Version : 100338 (10.3.38-MariaDB) - Source Host : localhost:33066 - Source Schema : omc_db - - Target Server Type : MariaDB - Target Server Version : 100338 (10.3.38-MariaDB) - File Encoding : 65001 - - Date: 16/04/2024 09:47:50 -*/ - SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; --- ---------------------------- --- Table structure for ne_state --- ---------------------------- +-- +-- Table structure for table `ne_state` +-- + + DROP TABLE IF EXISTS `ne_state`; -CREATE TABLE `ne_state` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + +CREATE TABLE `ne_state` ( + `id` int NOT NULL AUTO_INCREMENT, `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `version` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `capability` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `serial_num` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `expiry_date` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-', - `cpu_usage` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, - `mem_usage` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, - `disk_space` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, - `timestamp` datetime NULL DEFAULT current_timestamp(), + `cpu_usage` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `mem_usage` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `disk_space` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `timestamp` datetime NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_ne_type_id`(`ne_type`, `ne_id`) USING BTREE, - INDEX `idx_timestamp`(`timestamp`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 8551941 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + INDEX `idx_ne_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE, + INDEX `idx_timestamp`(`timestamp` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 8551941 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; -SET FOREIGN_KEY_CHECKS = 1; +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/ne_version.sql b/database/install/ne_version.sql index d64da845..d3895665 100644 --- a/database/install/ne_version.sql +++ b/database/install/ne_version.sql @@ -1,50 +1,49 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for table `ne_version` -- + DROP TABLE IF EXISTS `ne_version`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ne_version` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ne_type` varchar(32) DEFAULT NULL, - `ne_id` varchar(32) DEFAULT NULL, - `version` varchar(32) DEFAULT NULL, - `file_path` varchar(255) DEFAULT NULL, - `pre_version` varchar(32) DEFAULT NULL, - `pre_file` varchar(255) DEFAULT NULL, - `new_version` varchar(32) DEFAULT NULL, - `new_file` varchar(255) DEFAULT NULL, - `status` enum('Uploaded','Inactive','Active') DEFAULT NULL, - `update_time` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +CREATE TABLE `ne_version` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID', + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前包名', + `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前版本', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前软件包', + `pre_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本包名', + `pre_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本', + `pre_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上一版本软件包', + `new_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本报名', + `new_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本', + `new_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '新版软件包', + `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '当前状态 0无 1当前版本 2上一版本 3有新版本', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和ID' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元版本信息' ROW_FORMAT = DYNAMIC; --- Dump completed on 2024-03-06 17:26:57 +-- 初始数据对应网元 +INSERT INTO `ne_version` VALUES (1, 'OMC', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (2, 'IMS', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (3, 'AMF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (4, 'AUSF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (5, 'UDM', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (6, 'SMF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (7, 'PCF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (8, 'NSSF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (9, 'NRF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (10, 'UPF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (11, 'LMF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (12, 'NEF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (13, 'MME', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); +INSERT INTO `ne_version` VALUES (14, 'N3IWF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0); + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/install/permission.sql b/database/install/permission.sql deleted file mode 100644 index cdd503c2..00000000 --- a/database/install/permission.sql +++ /dev/null @@ -1,52 +0,0 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `permission` --- - -DROP TABLE IF EXISTS `permission`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `permission_name` varchar(32) NOT NULL, - `method` varchar(10) DEFAULT '*', - `module` varchar(32) DEFAULT '*', - `management` varchar(32) DEFAULT '*', - `element` varchar(10) DEFAULT '*', - `object` varchar(16) DEFAULT '*', - `description` varchar(255) DEFAULT NULL, - `created_at` datetime DEFAULT current_timestamp(), - `updated_at` datetime DEFAULT NULL, - `deleted_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`,`permission_name`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - UNIQUE KEY `permission_name` (`permission_name`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-已使用sys_menu权限标识'; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:57 diff --git a/database/install/role.sql b/database/install/role.sql deleted file mode 100644 index fb71566e..00000000 --- a/database/install/role.sql +++ /dev/null @@ -1,44 +0,0 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `role` --- - -DROP TABLE IF EXISTS `role`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `role` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `role_name` varchar(255) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `create_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`id`,`role_name`) USING BTREE, - KEY `role_name` (`role_name`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-已使用sys_role'; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:58 diff --git a/database/install/rs_subscribe.sql b/database/install/rs_subscribe.sql deleted file mode 100644 index 287bafd2..00000000 --- a/database/install/rs_subscribe.sql +++ /dev/null @@ -1,49 +0,0 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `rs_subscribe` --- - -DROP TABLE IF EXISTS `rs_subscribe`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rs_subscribe` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `created_at` datetime(3) DEFAULT NULL, - `updated_at` datetime(3) DEFAULT NULL, - `deleted_at` datetime(3) DEFAULT NULL, - `user` varchar(64) DEFAULT NULL, - `event_type` varchar(255) DEFAULT NULL, - `ne_type` varchar(64) DEFAULT NULL, - `object_type` varchar(64) DEFAULT NULL, - `callback_url` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `idx_rs_subscribe_deleted_at` (`deleted_at`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:58 diff --git a/database/install/sys_config.sql b/database/install/sys_config.sql index ca1a6776..ac1551ee 100644 --- a/database/install/sys_config.sql +++ b/database/install/sys_config.sql @@ -43,7 +43,24 @@ CREATE TABLE `sys_config` ( LOCK TABLES `sys_config` WRITE; /*!40000 ALTER TABLE `sys_config` DISABLE KEYS */; -INSERT INTO `sys_config` VALUES (1,'config.sys.user.initPassword','sys.user.initPassword','Abcd@1234..','Y','supervisor',1700000000000,NULL,0,'config.sys.user.initPasswordRemark'),(2,'config.sys.account.captchaEnabled','sys.account.captchaEnabled','false','Y','supervisor',1700000000000,NULL,0,'config.sys.account.captchaEnabledRemark'),(3,'config.sys.account.registerUser','sys.account.registerUser','false','Y','supervisor',1700000000000,NULL,0,'config.sys.account.registerUserRemark'),(4,'config.sys.user.maxRetryCount','sys.user.maxRetryCount','5','Y','supervisor',1700000000000,NULL,0,'config.sys.user.maxRetryCountRemark'),(5,'config.sys.user.lockTime','sys.user.lockTime','10','Y','supervisor',1700000000000,NULL,0,'config.sys.user.lockTimeRemark'),(6,'config.sys.officialUrl','sys.officialUrl','#','Y','supervisor',1700000000000,NULL,0,'config.sys.officialUrlRemark'),(7,'config.sys.helpDoc','sys.helpDoc','/static/helpDoc/{language}_doc.pdf','Y','supervisor',1700000000000,NULL,0,'config.sys.helpDocRemark'),(8,'sys.account.captchaType','sys.account.captchaType','math','Y','supervisor',1705410000000,NULL,0,'sys.account.captchaTypeRemark'),(10,'config.monitor.sysResource.storeDays','monitor.sysResource.storeDays','30','Y','supervisor',1700000000000,NULL,0,'config.monitor.sysResource.storeDaysRemark'),(102,'config.sys.logo.type','sys.logo.type','icon','Y','supervisor',1700000000000,NULL,0,'config.sys.logo.typeRemark'),(103,'config.sys.logo.filePathIcon','sys.logo.filePathIcon','/static/logo/{language}_icon.png','Y','supervisor',1700000000000,NULL,0,'config.sys.logo.filePathIconRemark'),(104,'config.sys.logo.filePathBrand','sys.logo.filePathBrand','/static/logo/{language}_brand.png','Y','supervisor',1700000000000,NULL,0,'config.sys.logo.filePathBrandRemark'),(105,'config.sys.loginBackground','sys.loginBackground','#','Y','supervisor',1700000000000,NULL,0,'config.sys.loginBackgroundRemark'),(106,'config.sys.title','sys.title','config.sys.titleValue','Y','supervisor',1700000000000,NULL,0,'config.sys.titleRemark'),(107,'config.sys.copyright','sys.copyright','config.sys.copyrightValue','Y','supervisor',1700000000000,NULL,0,'config.sys.copyrightRemark'),(108,'config.sys.i18nOpen','sys.i18n.open','true','Y','supervisor',1700000000000,NULL,0,'config.sys.i18nOpenRemark'),(109,'config.sys.i18nDefault','sys.i18n.default','en_US','Y','supervisor',1700000000000,NULL,0,'config.sys.i18nDefaultRemark'),(110,'config.sys.lockTime','sys.lockTime','0','Y','supervisor',1704960008300,'admin',1706838764703,'config.sys.lockTimeRemark'); +INSERT INTO `sys_config` VALUES (1, 'config.sys.user.initPassword', 'sys.user.initPassword', 'Abcd@1234..', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.user.initPasswordRemark'); +INSERT INTO `sys_config` VALUES (2, 'config.sys.account.captchaEnabled', 'sys.account.captchaEnabled', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.account.captchaEnabledRemark'); +INSERT INTO `sys_config` VALUES (3, 'config.sys.account.registerUser', 'sys.account.registerUser', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.account.registerUserRemark'); +INSERT INTO `sys_config` VALUES (4, 'config.sys.user.maxRetryCount', 'sys.user.maxRetryCount', '5', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.user.maxRetryCountRemark'); +INSERT INTO `sys_config` VALUES (5, 'config.sys.user.lockTime', 'sys.user.lockTime', '10', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.user.lockTimeRemark'); +INSERT INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark'); +INSERT INTO `sys_config` VALUES (7, 'config.sys.helpDoc', 'sys.helpDoc', '/static/helpDoc/{language}_doc.pdf', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.helpDocRemark'); +INSERT INTO `sys_config` VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', 'supervisor', 1705410000000, NULL, 0, 'sys.account.captchaTypeRemark'); +INSERT INTO `sys_config` VALUES (10, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.monitor.sysResource.storeDaysRemark'); +INSERT INTO `sys_config` VALUES (102, 'config.sys.logo.type', 'sys.logo.type', 'icon', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.logo.typeRemark'); +INSERT INTO `sys_config` VALUES (103, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.logo.filePathIconRemark'); +INSERT INTO `sys_config` VALUES (104, 'config.sys.logo.filePathBrand', 'sys.logo.filePathBrand', '/static/logo/{language}_brand.png', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.logo.filePathBrandRemark'); +INSERT INTO `sys_config` VALUES (105, 'config.sys.loginBackground', 'sys.loginBackground', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.loginBackgroundRemark'); +INSERT INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark'); +INSERT INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark'); +INSERT INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark'); +INSERT INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark'); +INSERT INTO `sys_config` VALUES (110, 'config.sys.lockTime', 'sys.lockTime', '0', 'Y', 'supervisor', 1704960008300, 'admin', 1706838764703, 'config.sys.lockTimeRemark'); /*!40000 ALTER TABLE `sys_config` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/sys_dept.sql b/database/install/sys_dept.sql index 02e785e2..ba68541a 100644 --- a/database/install/sys_dept.sql +++ b/database/install/sys_dept.sql @@ -38,19 +38,15 @@ CREATE TABLE `sys_dept` ( `update_by` varchar(50) DEFAULT '' COMMENT '更新者', `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`dept_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表'; +) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `sys_dept` -- -LOCK TABLES `sys_dept` WRITE; -/*!40000 ALTER TABLE `sys_dept` DISABLE KEYS */; -INSERT INTO `sys_dept` VALUES (100,0,'0','dept.root',0,'supervisor',NULL,NULL,'1','0','supervisor',1699348237468,NULL,0),(101,100,'0,100','dept.root.item1',1,'supervisor',NULL,NULL,'1','0','supervisor',1699348237468,NULL,0); -/*!40000 ALTER TABLE `sys_dept` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +INSERT INTO `sys_dept` VALUES (1, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0); +INSERT INTO `sys_dept` VALUES (2, 1, '0,1', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/database/install/sys_dict_data0.sql b/database/install/sys_dict_data0.sql index a68e81de..a0602501 100644 --- a/database/install/sys_dict_data0.sql +++ b/database/install/sys_dict_data0.sql @@ -36,7 +36,7 @@ CREATE TABLE `sys_dict_data` ( `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', PRIMARY KEY (`dict_code`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4130 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 10000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_dict_data @@ -158,12 +158,16 @@ INSERT INTO `sys_dict_data` VALUES (114, 0, 'dictData.ne_host_authMode.0', '0', INSERT INTO `sys_dict_data` VALUES (115, 1, 'dictData.ne_host_authMode.1', '1', 'ne_host_authMode', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (116, 0, 'dictData.ne_host_cmd_groupId.0', '0', 'ne_host_cmd_groupId', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (117, 1, 'dictData.ne_host_cmd_groupId.1', '1', 'ne_host_cmd_groupId', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (118, 0, 'dictData.ne_info_status.0', '0', 'ne_info_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1709642157849, ''); -INSERT INTO `sys_dict_data` VALUES (119, 1, 'dictData.ne_info_status.1', '1', 'ne_info_status', '', 'error', '1', 'supervisor', 1706620000000, 'supervisor', 1709642164831, ''); -INSERT INTO `sys_dict_data` VALUES (120, 2, 'dictData.ne_info_status.2', '2', 'ne_info_status', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (121, 3, 'dictData.ne_info_status.3', '3', 'ne_info_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1709642169871, ''); -INSERT INTO `sys_dict_data` VALUES (122, 0, 'ne_license_status.0', '0', 'ne_license_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); -INSERT INTO `sys_dict_data` VALUES (123, 1, 'ne_license_status.1', '1', 'ne_license_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT INTO `sys_dict_data` VALUES (118, 0, 'dictData.ne_info_status.0', '0', 'ne_info_status', '', 'error', '1', 'supervisor', 1706620000000, 'supervisor', 1709642157849, ''); +INSERT INTO `sys_dict_data` VALUES (119, 1, 'dictData.ne_info_status.1', '1', 'ne_info_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1709642164831, ''); +INSERT INTO `sys_dict_data` VALUES (120, 2, 'dictData.ne_info_status.2', '2', 'ne_info_status', '', 'warning', '1', 'supervisor', 1706620000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (121, 3, 'dictData.ne_info_status.3', '3', 'ne_info_status', '', '', '1', 'supervisor', 1706620000000, 'supervisor', 1709642169871, ''); +INSERT INTO `sys_dict_data` VALUES (122, 0, 'dictData.ne_license_status.0', '0', 'ne_license_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); +INSERT INTO `sys_dict_data` VALUES (123, 1, 'dictData.ne_license_status.1', '1', 'ne_license_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); INSERT INTO `sys_dict_data` VALUES (124, 2, 'dictData.ne_host_authMode.2', '2', 'ne_host_authMode', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (125, 0, 'dictData.ne_version_status.0', '0', 'ne_version_status', '', 'default', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); +INSERT INTO `sys_dict_data` VALUES (126, 1, 'dictData.ne_version_status.1', '1', 'ne_version_status', '', 'success', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT INTO `sys_dict_data` VALUES (127, 1, 'dictData.ne_version_status.2', '2', 'ne_version_status', '', 'purple', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT INTO `sys_dict_data` VALUES (128, 1, 'dictData.ne_version_status.3', '3', 'ne_version_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/install/sys_dict_data1_i18n_zh.sql b/database/install/sys_dict_data1_i18n_zh.sql index ab31fa10..30892d17 100644 --- a/database/install/sys_dict_data1_i18n_zh.sql +++ b/database/install/sys_dict_data1_i18n_zh.sql @@ -634,22 +634,22 @@ INSERT INTO `sys_dict_data` VALUES (2107, 2107, 'neInfo.errKeyExists', '网元 INSERT INTO `sys_dict_data` VALUES (2108, 2108, 'log.operate.title.imsCDR', 'IMS-CDR会话', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2109, 2109, 'menu.dashboard.amfUE', '用户事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2110, 2110, 'log.operate.title.amfUE', 'AMF-UE事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2111, 2111, 'dictData.ne_info_status.0', '在线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2112, 2112, 'dictData.ne_info_status.1', '离线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2113, 2113, 'dictData.ne_info_status.2', '-', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2114, 2114, 'dictData.ne_info_status.3', '同步配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2111, 2111, 'dictData.ne_info_status.0', '离线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2112, 2112, 'dictData.ne_info_status.1', '在线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2113, 2113, 'dictData.ne_info_status.2', '等待同步', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2114, 2114, 'dictData.ne_info_status.3', '-', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2115, 2115, 'dictType.ne_info_status', '网元信息状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2116, 2116, 'menu.tools.neQuickSetup', '网元快速安装', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2116, 2116, 'menu.ne.neQuickSetup', '网元快速安装', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2117, 2117, 'log.operate.title.neConfig', '网元参数配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2118, 2118, 'menu.config.neLicense', '网元授权', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2119, 2119, 'log.operate.title.neLicense', '网元授权', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2118, 2118, 'menu.config.neLicense', '网元许可', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2119, 2119, 'log.operate.title.neLicense', '网元许可', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2120, 2120, 'menu.config.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2121, 2121, 'log.operate.title.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2122, 2122, 'log.operate.title.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2123, 2123, 'menu.config.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2124, 2124, 'dictType.ne_license_status', '网元授权状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2125, 2125, 'ne_license_status.0', '无效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2126, 2126, 'ne_license_status.1', '有效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2124, 2124, 'dictType.ne_license_status', '网元许可状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2125, 2125, 'dictData.ne_license_status.0', '无效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2126, 2126, 'dictData.ne_license_status.1', '有效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2127, 2127, 'menu.dashboard.mocn', 'MOCN', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2128, 2128, 'menu.monitor.cdr', '话单', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2129, 2129, 'menu.monitor.event', '事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); @@ -657,7 +657,10 @@ INSERT INTO `sys_dict_data` VALUES (2130, 2130, 'post.export.time', '创建时 INSERT INTO `sys_dict_data` VALUES (2131, 2131, 'role.export.time', '创建时间', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2132, 2132, 'dictData.ne_host_authMode.2', '免密认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (2133, 2133, 'menu.ne.neConfPara5G', '网元公共配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (2134, 2134, 'menu.fault.event', '事件通知', 'i18n_zh', '', '', '1', 'supervisor', 1717051745866, '', 0, ''); - +INSERT INTO `sys_dict_data` VALUES (2134, 2134, 'dictData.ne_version_status.0', '无', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2135, 2135, 'dictData.ne_version_status.1', '已是最新', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2136, 2136, 'dictData.ne_version_status.2', '上一版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2137, 2137, 'dictData.ne_version_status.3', '有新版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (2138, 2138, 'menu.fault.event', '事件通知', 'i18n_zh', '', '', '1', 'supervisor', 1717051745866, '', 0, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/install/sys_dict_data2_i18n_en.sql b/database/install/sys_dict_data2_i18n_en.sql index 2a8ac947..f33959cb 100644 --- a/database/install/sys_dict_data2_i18n_en.sql +++ b/database/install/sys_dict_data2_i18n_en.sql @@ -634,12 +634,12 @@ INSERT INTO `sys_dict_data` VALUES (4107, 4107, 'neInfo.errKeyExists', 'NE info INSERT INTO `sys_dict_data` VALUES (4108, 4108, 'log.operate.title.imsCDR', 'IMS-CDR session', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4109, 4109, 'menu.dashboard.amfUE', 'UE Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4110, 4110, 'log.operate.title.amfUE', 'AMF-UE event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4111, 4111, 'dictData.ne_info_status.0', 'Online', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4112, 4112, 'dictData.ne_info_status.1', 'Offline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4113, 4113, 'dictData.ne_info_status.2', '-', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4114, 4114, 'dictData.ne_info_status.3', 'Sync Config', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4111, 4111, 'dictData.ne_info_status.0', 'Offline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4112, 4112, 'dictData.ne_info_status.1', 'Online', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4113, 4113, 'dictData.ne_info_status.2', 'Wait Sync', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4114, 4114, 'dictData.ne_info_status.3', '-', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4115, 4115, 'dictType.ne_info_status', 'NE Info State', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4116, 4116, 'menu.tools.neQuickSetup', 'NE Quick Setup', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4116, 4116, 'menu.ne.neQuickSetup', 'NE Quick Setup', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4117, 4117, 'log.operate.title.neConfig', 'NE Parameter Configuration', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4118, 4118, 'menu.config.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4119, 4119, 'log.operate.title.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); @@ -648,16 +648,19 @@ INSERT INTO `sys_dict_data` VALUES (4121, 4121, 'log.operate.title.neSoftware', INSERT INTO `sys_dict_data` VALUES (4122, 4122, 'menu.config.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4123, 4123, 'log.operate.title.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4124, 4124, 'dictType.ne_license_status', 'NE License Status', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4125, 4125, 'ne_license_status.0', 'Invalid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4126, 4126, 'ne_license_status.1', 'Valid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4125, 4125, 'dictData.ne_license_status.0', 'Invalid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4126, 4126, 'dictData.ne_license_status.1', 'Valid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4127, 4127, 'menu.dashboard.mocn', 'MOCN', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4128, 4128, 'menu.monitor.cdr', 'CDR', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4129, 4129, 'menu.monitor.event', 'Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4130, 4130, 'post.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4131, 4131, 'role.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); INSERT INTO `sys_dict_data` VALUES (4132, 4132, 'dictData.ne_host_authMode.2', 'Confidentiality Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4133, 4133, 'menu.ne.neConfPara5G', 'NE Config Public 5G', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT INTO `sys_dict_data` VALUES (4134, 4134, 'menu.fault.event', 'Event Notification', 'i18n_en', NULL, NULL, '1', 'supervisor', 1717051688260, '', 0, NULL); - +INSERT INTO `sys_dict_data` VALUES (4133, 4133, 'menu.ne.neConfPara5G', 'NE Public Config', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4134, 4134, 'dictData.ne_version_status.0', 'Nothing', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4135, 4135, 'dictData.ne_version_status.1', 'Updated', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4136, 4136, 'dictData.ne_version_status.2', 'Previous', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4137, 4137, 'dictData.ne_version_status.3', 'Has New', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +INSERT INTO `sys_dict_data` VALUES (4138, 4138, 'menu.fault.event', 'Event Notification', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/install/sys_dict_type.sql b/database/install/sys_dict_type.sql index 3059a67f..fa2d8339 100644 --- a/database/install/sys_dict_type.sql +++ b/database/install/sys_dict_type.sql @@ -34,7 +34,7 @@ CREATE TABLE `sys_dict_type` ( `remark` varchar(500) DEFAULT NULL COMMENT '备注', PRIMARY KEY (`dict_id`) USING BTREE, UNIQUE KEY `dict_type` (`dict_type`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典类型表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典类型表'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -43,7 +43,39 @@ CREATE TABLE `sys_dict_type` ( LOCK TABLES `sys_dict_type` WRITE; /*!40000 ALTER TABLE `sys_dict_type` DISABLE KEYS */; -INSERT INTO `sys_dict_type` VALUES (1,'dictType.sys_user_sex','sys_user_sex','1','supervisor',1699350000000,NULL,0,'dictType.sys_user_sex_remark'),(2,'dictType.sys_show_hide','sys_show_hide','1','supervisor',1699350000000,NULL,0,'dictType.sys_show_hide_remark'),(3,'dictType.sys_normal_disable','sys_normal_disable','1','supervisor',1699350000000,NULL,0,'dictType.sys_normal_disable_remark'),(4,'dictType.sys_job_status','sys_job_status','1','supervisor',1699350000000,NULL,0,'dictType.sys_job_status_remark'),(5,'dictType.sys_job_group','sys_job_group','1','supervisor',1699350000000,NULL,0,'dictType.sys_job_group_remark'),(6,'dictType.sys_yes_no','sys_yes_no','1','supervisor',1699350000000,NULL,0,'dictType.sys_yes_no_remark'),(9,'dictType.sys_oper_type','sys_oper_type','1','supervisor',1699350000000,NULL,0,'dictType.sys_oper_type_remark'),(10,'dictType.sys_common_status','sys_common_status','1','supervisor',1699350000000,NULL,0,'dictType.sys_common_status_remark'),(100,'dictType.trace_type','trace_type','1','supervisor',1699350000000,NULL,0,'dictType.trace_type_remark'),(101,'dictType.operation_log_type','operation_log_type','1','supervisor',1699350000000,NULL,0,'dictType.operation_log_type_remark'),(102,'dictType.alarm_status','alarm_status','1','supervisor',1699350000000,NULL,0,'dictType.alarm_status_remark'),(103,'dictType.security_log_type','security_log_type','1','supervisor',1699350000000,NULL,0,'dictType.security_log_type_remark'),(104,'dictType.ne_version_status','ne_version_status','1','supervisor',1699350000000,NULL,0,'dictType.ne_version_status_remark'),(105,'dictType.i18n_en','i18n_en','1','supervisor',1699350000000,NULL,0,'dictType.i18n_en_remark'),(106,'dictType.i18n_zh','i18n_zh','1','supervisor',1699350000000,NULL,0,'dictType.i18n_zh_remark'),(107,'dictType.sys_role_datascope','sys_role_datascope','1','supervisor',1699350000000,NULL,0,'dictType.sys_role_datascope_remark'),(108,'dictType.active_alarm_type','active_alarm_type','1','supervisor',1699350000000,NULL,0,'dictType.active_alarm_type_remark'),(109,'dictType.active_clear_type','active_clear_type','1','supervisor',1699350000000,NULL,0,'dictType.active_clear_type_remark'),(110,'dictType.active_ack_state','active_ack_state','1','supervisor',1699350000000,NULL,0,'dictType.active_ack_state_remark'),(111,'dictType.active_alarm_severity','active_alarm_severity','1','supervisor',1699350000000,NULL,0,'dictType.active_alarm_severity_remark'),(112,'dictType.index_status','index_status','1','supervisor',1702019398308,NULL,0,'dictType.index_status_remark'),(113,'dictType.cdr_sip_code','cdr_sip_code','1','supervisor',1706611609998,'supervisor',1706612186095,NULL),(114,'dictType.cdr_call_type','cdr_call_type','1','supervisor',1706612292095,NULL,0,NULL),(115,'dictType.ue_auth_code','ue_auth_code','1','supervisor',1706615964700,'supervisor',1706617253275,NULL),(116,'dictType.ue_event_type','ue_event_type','1','supervisor',1706617070548,'supervisor',1706617236965,NULL),(117,'dictType.ue_event_cm_state','ue_event_cm_state','1','supervisor',1706617070548,'supervisor',1706617236965,''),(118,'dictType.ne_host_type','ne_host_type','1','supervisor',1702020000000,'',0,''),(119,'dictType.ne_host_groupId','ne_host_groupId','1','supervisor',1702020000000,'',0,''),(120,'dictType.ne_host_authMode','ne_host_authMode','1','supervisor',1702020000000,'',0,''),(121,'dictType.ne_host_cmd_groupId','ne_host_cmd_groupId','1','supervisor',1702020000000,'',0,''),(122,'dictType.ne_info_status','ne_info_status','1','supervisor',1702020000000,'',0,''); +INSERT INTO `sys_dict_type` VALUES (1, 'dictType.sys_user_sex', 'sys_user_sex', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_user_sex_remark'); +INSERT INTO `sys_dict_type` VALUES (2, 'dictType.sys_show_hide', 'sys_show_hide', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_show_hide_remark'); +INSERT INTO `sys_dict_type` VALUES (3, 'dictType.sys_normal_disable', 'sys_normal_disable', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_normal_disable_remark'); +INSERT INTO `sys_dict_type` VALUES (4, 'dictType.sys_job_status', 'sys_job_status', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_job_status_remark'); +INSERT INTO `sys_dict_type` VALUES (5, 'dictType.sys_job_group', 'sys_job_group', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_job_group_remark'); +INSERT INTO `sys_dict_type` VALUES (6, 'dictType.sys_yes_no', 'sys_yes_no', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_yes_no_remark'); +INSERT INTO `sys_dict_type` VALUES (9, 'dictType.sys_oper_type', 'sys_oper_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_oper_type_remark'); +INSERT INTO `sys_dict_type` VALUES (10, 'dictType.sys_common_status', 'sys_common_status', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_common_status_remark'); +INSERT INTO `sys_dict_type` VALUES (100, 'dictType.trace_type', 'trace_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.trace_type_remark'); +INSERT INTO `sys_dict_type` VALUES (101, 'dictType.operation_log_type', 'operation_log_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.operation_log_type_remark'); +INSERT INTO `sys_dict_type` VALUES (102, 'dictType.alarm_status', 'alarm_status', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.alarm_status_remark'); +INSERT INTO `sys_dict_type` VALUES (103, 'dictType.security_log_type', 'security_log_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.security_log_type_remark'); +INSERT INTO `sys_dict_type` VALUES (104, 'dictType.ne_version_status', 'ne_version_status', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.ne_version_status_remark'); +INSERT INTO `sys_dict_type` VALUES (105, 'dictType.i18n_en', 'i18n_en', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.i18n_en_remark'); +INSERT INTO `sys_dict_type` VALUES (106, 'dictType.i18n_zh', 'i18n_zh', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.i18n_zh_remark'); +INSERT INTO `sys_dict_type` VALUES (107, 'dictType.sys_role_datascope', 'sys_role_datascope', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.sys_role_datascope_remark'); +INSERT INTO `sys_dict_type` VALUES (108, 'dictType.active_alarm_type', 'active_alarm_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.active_alarm_type_remark'); +INSERT INTO `sys_dict_type` VALUES (109, 'dictType.active_clear_type', 'active_clear_type', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.active_clear_type_remark'); +INSERT INTO `sys_dict_type` VALUES (110, 'dictType.active_ack_state', 'active_ack_state', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.active_ack_state_remark'); +INSERT INTO `sys_dict_type` VALUES (111, 'dictType.active_alarm_severity', 'active_alarm_severity', '1', 'supervisor', 1699350000000, NULL, 0, 'dictType.active_alarm_severity_remark'); +INSERT INTO `sys_dict_type` VALUES (112, 'dictType.index_status', 'index_status', '1', 'supervisor', 1702019398308, NULL, 0, 'dictType.index_status_remark'); +INSERT INTO `sys_dict_type` VALUES (113, 'dictType.cdr_sip_code', 'cdr_sip_code', '1', 'supervisor', 1706611609998, 'supervisor', 1706612186095, NULL); +INSERT INTO `sys_dict_type` VALUES (114, 'dictType.cdr_call_type', 'cdr_call_type', '1', 'supervisor', 1706612292095, NULL, 0, NULL); +INSERT INTO `sys_dict_type` VALUES (115, 'dictType.ue_auth_code', 'ue_auth_code', '1', 'supervisor', 1706615964700, 'supervisor', 1706617253275, NULL); +INSERT INTO `sys_dict_type` VALUES (116, 'dictType.ue_event_type', 'ue_event_type', '1', 'supervisor', 1706617070548, 'supervisor', 1706617236965, NULL); +INSERT INTO `sys_dict_type` VALUES (117, 'dictType.ue_event_cm_state', 'ue_event_cm_state', '1', 'supervisor', 1706617070548, 'supervisor', 1706617236965, ''); +INSERT INTO `sys_dict_type` VALUES (118, 'dictType.ne_host_type', 'ne_host_type', '1', 'supervisor', 1702020000000, '', 0, ''); +INSERT INTO `sys_dict_type` VALUES (119, 'dictType.ne_host_groupId', 'ne_host_groupId', '1', 'supervisor', 1702020000000, '', 0, ''); +INSERT INTO `sys_dict_type` VALUES (120, 'dictType.ne_host_authMode', 'ne_host_authMode', '1', 'supervisor', 1702020000000, '', 0, ''); +INSERT INTO `sys_dict_type` VALUES (121, 'dictType.ne_host_cmd_groupId', 'ne_host_cmd_groupId', '1', 'supervisor', 1702020000000, '', 0, ''); +INSERT INTO `sys_dict_type` VALUES (122, 'dictType.ne_info_status', 'ne_info_status', '1', 'supervisor', 1702020000000, '', 0, ''); +INSERT INTO `sys_dict_type` VALUES (123, 'dictType.ne_license_status', 'ne_license_status', '1', 'supervisor', 1702020000000, '', 0, ''); + /*!40000 ALTER TABLE `sys_dict_type` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/sys_job.sql b/database/install/sys_job.sql index 65c74f3b..9a19829a 100644 --- a/database/install/sys_job.sql +++ b/database/install/sys_job.sql @@ -39,7 +39,7 @@ CREATE TABLE `sys_job` ( `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`job_id`) USING BTREE, UNIQUE INDEX `idx_uni_name_group`(`job_name`, `job_group`) USING BTREE COMMENT 'unique index for job_name and job_group' -) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_job @@ -50,7 +50,7 @@ INSERT INTO `sys_job` VALUES (5, 'job.deleteExpiredAlarmRecord', 'SYSTEM', 'dele INSERT INTO `sys_job` VALUES (6, 'job.deleteExpiredKpiRecord', 'SYSTEM', 'deleteExpiredRecord', '{\"duration\":30,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}', '0 15 0 * * ?', '3', '0', '1', '1', 'supervisor', 1698478134842, 'supervisor', 1700570673113, 'job.deleteExpiredKpiRecordRemark'); INSERT INTO `sys_job` VALUES (7, 'job.backupEtcFromNE', 'SYSTEM', 'backupEtcFromNE', NULL, '0 30 0 * * ?', '3', '0', '1', '1', 'supervisor', 1698478134843, NULL, 0, 'job.backupEtcFromNERemark'); INSERT INTO `sys_job` VALUES (8, 'job.deleteExpiredNeStateRecord', 'SYSTEM', 'deleteExpiredRecord', '{\"duration\":1,\"tableName\":\"ne_state\",\"colName\":\"timestamp\"}', '0 25 0 * * ?', '3', '0', '1', '1', 'supervisor', 1698478134842, 'admin', 1703668901929, 'job.deleteExpiredNeStateRecordRemark'); -INSERT INTO `sys_job` VALUES (9, 'job.getStateFromNE', 'SYSTEM', 'getStateFromNE', '', '0/10 * * * * ?', '3', '0', '1', '0', 'supervisor', 1698478134842, 'admin', 1713231120503, 'job.getStateFromNERemark'); -INSERT INTO `sys_job` VALUES (10, 'job.genNeStateAlarm', 'SYSTEM', 'genNeStateAlarm', '{\"alarmID\":\"HXEMSSM10000\",\"alarmCode\":10000,\"alarmTitle\":\"The system state is abnormal\",\"neType\":\"OMC\",\"alarmType\":\"EquipmentAlarm\",\"origSeverity\": \"Major\",\"objectName\":\"EMS;SystemManagement;Heartbeat\",\"objectType\":\"SystemState\",\"specificProblem\":\"Alarm cause: the system state of target NE has not been received for {threshold} seconds\", \"specificProblemID\":\"AC10000\",\"threshold\":30}', '0/5 * * * * ?', '3', '0', '1', '0', 'supervisor', 1698478134842, 'admin', 1713781643031, 'job.genNeStateAlarmRemark'); +INSERT INTO `sys_job` VALUES (9, 'job.getStateFromNE', 'SYSTEM', 'getStateFromNE', '', '0/10 * * * * ?', '3', '0', '0', '0', 'supervisor', 1698478134842, 'admin', 1713231120503, 'job.getStateFromNERemark'); +INSERT INTO `sys_job` VALUES (10, 'job.genNeStateAlarm', 'SYSTEM', 'genNeStateAlarm', '{\"alarmID\":\"HXEMSSM10000\",\"alarmCode\":10000,\"alarmTitle\":\"The system state is abnormal\",\"neType\":\"OMC\",\"alarmType\":\"EquipmentAlarm\",\"origSeverity\": \"Major\",\"objectName\":\"EMS;SystemManagement;Heartbeat\",\"objectType\":\"SystemState\",\"specificProblem\":\"Alarm cause: the system state of target NE has not been received for {threshold} seconds\", \"specificProblemID\":\"AC10000\",\"threshold\":30}', '0/5 * * * * ?', '3', '0', '0', '0', 'supervisor', 1698478134842, 'admin', 1713781643031, 'job.genNeStateAlarmRemark'); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/install/sys_job_log.sql b/database/install/sys_job_log.sql index 0718d72e..082d51cf 100644 --- a/database/install/sys_job_log.sql +++ b/database/install/sys_job_log.sql @@ -33,7 +33,7 @@ CREATE TABLE `sys_job_log` ( `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', `cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间(毫秒)', PRIMARY KEY (`job_log_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=763 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='调度任务调度日志表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='调度任务调度日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/sys_log_login.sql b/database/install/sys_log_login.sql index f2c58b8c..2b8fa4a9 100644 --- a/database/install/sys_log_login.sql +++ b/database/install/sys_log_login.sql @@ -33,7 +33,7 @@ CREATE TABLE `sys_log_login` ( `msg` varchar(255) DEFAULT '' COMMENT '提示消息', `login_time` bigint(20) DEFAULT 0 COMMENT '登录时间', PRIMARY KEY (`login_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1177 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统登录日志表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统登录日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/sys_log_operate.sql b/database/install/sys_log_operate.sql index 50916276..2c2130ac 100644 --- a/database/install/sys_log_operate.sql +++ b/database/install/sys_log_operate.sql @@ -40,7 +40,7 @@ CREATE TABLE `sys_log_operate` ( `oper_time` bigint(20) DEFAULT 0 COMMENT '操作时间', `cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间(毫秒)', PRIMARY KEY (`oper_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=4083 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/sys_menu.sql b/database/install/sys_menu.sql index b5c5130f..521e344c 100644 --- a/database/install/sys_menu.sql +++ b/database/install/sys_menu.sql @@ -41,7 +41,7 @@ CREATE TABLE `sys_menu` ( `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`menu_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2148 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_menu @@ -145,7 +145,7 @@ INSERT INTO `sys_menu` VALUES (2099, 'menu.perf', 0, 5, 'perfManage', NULL, '1', INSERT INTO `sys_menu` VALUES (2100, 'menu.perf.task', 2099, 1, 'taskManage', 'perfManage/taskManage/index', '1', '1', 'M', '0', '1', 'perfManage:taskManage:index', 'icon-wofaqi', 'supervisor', 1700000000000, 'admin', 1713177036412, 'menu.perf.taskRemark'); INSERT INTO `sys_menu` VALUES (2101, 'menu.perf.data', 2099, 2, 'perfData', 'perfManage/perfData/index', '1', '1', 'M', '0', '1', 'perfManage:perfData:index', 'icon-soutubiao', 'supervisor', 1700000000000, 'admin', 1713177042915, 'menu.perf.dataRemark'); INSERT INTO `sys_menu` VALUES (2102, 'menu.perf.report', 2099, 3, 'perfReport', 'perfManage/perfReport/index', '1', '0', 'M', '0', '0', 'perfManage:perfReport:index', 'icon-gonggaodayi', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.reportRemark'); -INSERT INTO `sys_menu` VALUES (2103, 'menu.perf.threshold', 2099, 4, 'perfThreshold', 'perfManage/perfThreshold/index', '1', '0', 'M', '0', '1', 'perfManage:perfThreshold:index', 'icon-zhuanrang', 'supervisor', 1700000000000, 'supervisor', 1715417264697, 'menu.perf.thresholdRemark'); +INSERT INTO `sys_menu` VALUES (2103, 'menu.perf.threshold', 2099, 4, 'perfThreshold', 'perfManage/perfThreshold/index', '1', '0', 'M', '0', '0', 'perfManage:perfThreshold:index', 'icon-zhuanrang', 'supervisor', 1700000000000, 'supervisor', 1715417264697, 'menu.perf.thresholdRemark'); INSERT INTO `sys_menu` VALUES (2104, 'menu.perf.kpi', 2099, 5, 'goldTarget', 'perfManage/goldTarget/index', '1', '1', 'M', '1', '1', 'perfManage:goldTarget:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.kpiRemark'); INSERT INTO `sys_menu` VALUES (2105, 'menu.perf.customTarget', 2099, 6, 'customTarget', 'perfManage/customTarget/index', '1', '1', 'M', '0', '0', 'perfManage:customTarget:index', 'icon-fanhui1', 'supervisor', 1700000000000, 'admin', 1712807948673, 'menu.perf.customTargetRemark'); INSERT INTO `sys_menu` VALUES (2106, 'menu.perf.set', 2099, 7, 'perfSet', 'perfManage/perfSet/index', '1', '0', 'M', '0', '0', 'perfManage:perfSet:index', 'icon-gonggao', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.setRemark'); @@ -180,6 +180,11 @@ INSERT INTO `sys_menu` VALUES (2137, 'menu.config.neInfo', 4, 14, 'neInfo', 'ne/ INSERT INTO `sys_menu` VALUES (2138, 'menu.dashboard.amfUE', 2141, 1, 'amfUE', 'dashboard/amfUE/index', '1', '0', 'M', '1', '1', 'dashboard:amfUE:index', 'icon-paixu', 'supervisor', 1705550000000, 'supervisor', 1711354049893, ''); INSERT INTO `sys_menu` VALUES (2140, 'menu.monitor.cdr', 2087, 40, 'cdr', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1712751135878, ''); INSERT INTO `sys_menu` VALUES (2141, 'menu.monitor.event', 2087, 50, 'event', '', '1', '0', 'D', '1', '1', '', 'icon-gengduo', 'supervisor', 1711352768797, 'supervisor', 1712751125648, ''); -INSERT INTO `sys_menu` VALUES (2144, 'menu.fault.event', 2129, 3, 'event', 'faultManage/event/index', '1', '0', 'M', '1', '1', 'faultManage:event:index', 'icon-tubiaoku', 'supervisor', 1717051993146, 'supervisor', 1717052106943, ''); +INSERT INTO `sys_menu` VALUES (2142, 'menu.ne.neQuickSetup', 4, 10, 'neQuickSetup', 'ne/neQuickSetup/index', '1', '1', 'M', '1', '1', 'ne:neQuickSetup:list', 'icon-wofaqi', 'supervisor', 1708580000000, '', 0, ''); +INSERT INTO `sys_menu` VALUES (2143, 'menu.config.neLicense', 4, 20, 'neLicense', 'ne/neLicense/index', '1', '0', 'M', '1', '1', 'ne:neLicense:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT INTO `sys_menu` VALUES (2144, 'menu.config.neSoftware', 4, 23, 'neSoftware', 'ne/neSoftware/index', '1', '0', 'M', '1', '1', 'ne:neSoftware:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT INTO `sys_menu` VALUES (2145, 'menu.config.neVersion', 4, 26, 'neVersion', 'ne/neVersion/index', '1', '0', 'M', '1', '1', 'ne:neVersion:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT INTO `sys_menu` VALUES (2146, 'menu.ne.neConfPara5G', 4, 8, 'neConfPara5G', 'ne/neConfPara5G/index', '1', '0', 'M', '1', '1', 'ne:neConfPara5G:list', 'icon-wofaqi', 'supervisor', 1708580000000, '', 0, ''); +INSERT INTO `sys_menu` VALUES (2147, 'menu.fault.event', 2129, 3, 'event', 'faultManage/event/index', '1', '0', 'M', '1', '1', 'faultManage:event:index', 'icon-tubiaoku', 'supervisor', 1717051993146, '', 0, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/install/sys_post.sql b/database/install/sys_post.sql index 0f283851..f0d81ee2 100644 --- a/database/install/sys_post.sql +++ b/database/install/sys_post.sql @@ -1,27 +1,9 @@ -- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- -- Table structure for table `sys_post` -- DROP TABLE IF EXISTS `sys_post`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `sys_post` ( `post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID', `post_code` varchar(50) NOT NULL COMMENT '岗位编码', @@ -34,26 +16,19 @@ CREATE TABLE `sys_post` ( `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', `remark` varchar(500) DEFAULT NULL COMMENT '备注', PRIMARY KEY (`post_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='岗位信息表'; -/*!40101 SET character_set_client = @saved_cs_client */; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='岗位信息表'; -- -- Dumping data for table `sys_post` -- LOCK TABLES `sys_post` WRITE; -/*!40000 ALTER TABLE `sys_post` DISABLE KEYS */; -INSERT INTO `sys_post` VALUES (1,'administator','post.admin',1,'1','supervisor',1697110106499,NULL,0,NULL),(2,'operator','post.operator',2,'1','supervisor',1697110106499,NULL,0,NULL),(3,'monitor','post.monitor',3,'1','supervisor',1697110106499,NULL,0,NULL),(4,'visitor','post.visitor',4,'1','supervisor',1697110106499,NULL,0,NULL),(5,'111','test1',7,'0','admin',1701766022383,'',0,'remark'); -/*!40000 ALTER TABLE `sys_post` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +INSERT INTO `sys_post` VALUES (1, 'administator', 'post.admin', 1, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (2, 'operator', 'post.operator', 2, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (3, 'monitor', 'post.monitor', 3, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (4, 'visitor', 'post.visitor', 4, '1', 'supervisor', 1697110106499, NULL, 0, NULL); + +UNLOCK TABLES; -- Dump completed on 2024-03-06 17:27:00 diff --git a/database/install/sys_role.sql b/database/install/sys_role.sql index 6da9136b..9dac69b0 100644 --- a/database/install/sys_role.sql +++ b/database/install/sys_role.sql @@ -1,27 +1,10 @@ -- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `sys_role` -- DROP TABLE IF EXISTS `sys_role`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `sys_role` ( `role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID', `role_name` varchar(30) NOT NULL COMMENT '角色名称', @@ -38,26 +21,21 @@ CREATE TABLE `sys_role` ( `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', `remark` varchar(500) DEFAULT NULL COMMENT '备注', PRIMARY KEY (`role_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色信息表'; -/*!40101 SET character_set_client = @saved_cs_client */; +) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色信息表'; -- -- Dumping data for table `sys_role` -- LOCK TABLES `sys_role` WRITE; -/*!40000 ALTER TABLE `sys_role` DISABLE KEYS */; -INSERT INTO `sys_role` VALUES (1,'role.admin','supervisor',1,'1','1','1','1','0','supervisor',1697091437683,NULL,0,'role.adminRemark'),(2,'role.adminAssign','administrator',2,'1','1','1','1','0','supervisor',1698486915894,'supervisor',1706774375473,'role.adminAssignRemark'),(3,'role.operator','operator',3,'1','1','1','1','0','supervisor',1698486934900,'supervisor',1706774382221,'role.operatorRemark'),(4,'role.monitor','monitor',4,'1','1','1','1','0','supervisor',1698486950714,'supervisor',1706774389300,'role.monitorRemark'),(5,'role.vistor','vistor',5,'1','1','1','1','0','supervisor',1698486975779,'supervisor',1706774405096,'role.vistorRemark'); -/*!40000 ALTER TABLE `sys_role` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +INSERT INTO `sys_role` VALUES (1, 'role.admin', 'supervisor', 1, '1', '1', '1', '1', '0', 'supervisor', 1697091437683, 'supervisor', 1697091437683, 'role.adminRemark'); +INSERT INTO `sys_role` VALUES (2, 'role.adminAssign', 'administrator', 2, '1', '1', '1', '1', '0', 'supervisor', 1698486915894, 'supervisor', 1717143830709, 'role.adminAssignRemark'); +INSERT INTO `sys_role` VALUES (3, 'role.operator', 'operator', 3, '1', '1', '1', '1', '0', 'supervisor', 1698486934900, 'supervisor', 1717143582784, 'role.operatorRemark'); +INSERT INTO `sys_role` VALUES (4, 'role.monitor', 'monitor', 4, '1', '1', '1', '1', '0', 'supervisor', 1698486950714, 'supervisor', 1706774389300, 'role.monitorRemark'); +INSERT INTO `sys_role` VALUES (5, 'role.vistor', 'vistor', 5, '1', '1', '1', '1', '0', 'supervisor', 1698486975779, 'supervisor', 1706774405096, 'role.vistorRemark'); + +UNLOCK TABLES; + -- Dump completed on 2024-03-06 17:27:00 diff --git a/database/install/sys_role_menu.sql b/database/install/sys_role_menu.sql index 6d766025..1cca968b 100644 --- a/database/install/sys_role_menu.sql +++ b/database/install/sys_role_menu.sql @@ -1,19 +1,3 @@ -/* - Navicat Premium Data Transfer - - Source Server : local_mariadb - Source Server Type : MariaDB - Source Server Version : 100338 (10.3.38-MariaDB) - Source Host : localhost:33066 - Source Schema : omc_db - - Target Server Type : MariaDB - Target Server Version : 100338 (10.3.38-MariaDB) - File Encoding : 65001 - - Date: 30/05/2024 17:22:32 -*/ - SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; @@ -27,246 +11,253 @@ CREATE TABLE `sys_role_menu` ( PRIMARY KEY (`role_id`, `menu_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic; --- ---------------------------- --- Records of sys_role_menu --- ---------------------------- -INSERT INTO `sys_role_menu` VALUES (2, 1); -INSERT INTO `sys_role_menu` VALUES (2, 4); -INSERT INTO `sys_role_menu` VALUES (2, 5); -INSERT INTO `sys_role_menu` VALUES (2, 100); -INSERT INTO `sys_role_menu` VALUES (2, 101); -INSERT INTO `sys_role_menu` VALUES (2, 102); -INSERT INTO `sys_role_menu` VALUES (2, 103); -INSERT INTO `sys_role_menu` VALUES (2, 104); -INSERT INTO `sys_role_menu` VALUES (2, 105); -INSERT INTO `sys_role_menu` VALUES (2, 108); -INSERT INTO `sys_role_menu` VALUES (2, 111); -INSERT INTO `sys_role_menu` VALUES (2, 112); -INSERT INTO `sys_role_menu` VALUES (2, 115); -INSERT INTO `sys_role_menu` VALUES (2, 116); -INSERT INTO `sys_role_menu` VALUES (2, 117); -INSERT INTO `sys_role_menu` VALUES (2, 500); -INSERT INTO `sys_role_menu` VALUES (2, 501); -INSERT INTO `sys_role_menu` VALUES (2, 1000); -INSERT INTO `sys_role_menu` VALUES (2, 1001); -INSERT INTO `sys_role_menu` VALUES (2, 1002); -INSERT INTO `sys_role_menu` VALUES (2, 1003); -INSERT INTO `sys_role_menu` VALUES (2, 1004); -INSERT INTO `sys_role_menu` VALUES (2, 1005); -INSERT INTO `sys_role_menu` VALUES (2, 1006); -INSERT INTO `sys_role_menu` VALUES (2, 1007); -INSERT INTO `sys_role_menu` VALUES (2, 1008); -INSERT INTO `sys_role_menu` VALUES (2, 1009); -INSERT INTO `sys_role_menu` VALUES (2, 1010); -INSERT INTO `sys_role_menu` VALUES (2, 1011); -INSERT INTO `sys_role_menu` VALUES (2, 1012); -INSERT INTO `sys_role_menu` VALUES (2, 1013); -INSERT INTO `sys_role_menu` VALUES (2, 1014); -INSERT INTO `sys_role_menu` VALUES (2, 1015); -INSERT INTO `sys_role_menu` VALUES (2, 1016); -INSERT INTO `sys_role_menu` VALUES (2, 1017); -INSERT INTO `sys_role_menu` VALUES (2, 1018); -INSERT INTO `sys_role_menu` VALUES (2, 1019); -INSERT INTO `sys_role_menu` VALUES (2, 1020); -INSERT INTO `sys_role_menu` VALUES (2, 1021); -INSERT INTO `sys_role_menu` VALUES (2, 1022); -INSERT INTO `sys_role_menu` VALUES (2, 1023); -INSERT INTO `sys_role_menu` VALUES (2, 1024); -INSERT INTO `sys_role_menu` VALUES (2, 1030); -INSERT INTO `sys_role_menu` VALUES (2, 1031); -INSERT INTO `sys_role_menu` VALUES (2, 1032); -INSERT INTO `sys_role_menu` VALUES (2, 1033); -INSERT INTO `sys_role_menu` VALUES (2, 1034); -INSERT INTO `sys_role_menu` VALUES (2, 1039); -INSERT INTO `sys_role_menu` VALUES (2, 1040); -INSERT INTO `sys_role_menu` VALUES (2, 1041); -INSERT INTO `sys_role_menu` VALUES (2, 1042); -INSERT INTO `sys_role_menu` VALUES (2, 1043); -INSERT INTO `sys_role_menu` VALUES (2, 1044); -INSERT INTO `sys_role_menu` VALUES (2, 1045); -INSERT INTO `sys_role_menu` VALUES (2, 1048); -INSERT INTO `sys_role_menu` VALUES (2, 1049); -INSERT INTO `sys_role_menu` VALUES (2, 1050); -INSERT INTO `sys_role_menu` VALUES (2, 1051); -INSERT INTO `sys_role_menu` VALUES (2, 1052); -INSERT INTO `sys_role_menu` VALUES (2, 1053); -INSERT INTO `sys_role_menu` VALUES (2, 1054); -INSERT INTO `sys_role_menu` VALUES (2, 1055); -INSERT INTO `sys_role_menu` VALUES (2, 1056); -INSERT INTO `sys_role_menu` VALUES (2, 2009); -INSERT INTO `sys_role_menu` VALUES (2, 2010); -INSERT INTO `sys_role_menu` VALUES (2, 2075); -INSERT INTO `sys_role_menu` VALUES (2, 2078); -INSERT INTO `sys_role_menu` VALUES (2, 2079); -INSERT INTO `sys_role_menu` VALUES (2, 2080); -INSERT INTO `sys_role_menu` VALUES (2, 2081); -INSERT INTO `sys_role_menu` VALUES (2, 2082); -INSERT INTO `sys_role_menu` VALUES (2, 2083); -INSERT INTO `sys_role_menu` VALUES (2, 2084); -INSERT INTO `sys_role_menu` VALUES (2, 2085); -INSERT INTO `sys_role_menu` VALUES (2, 2086); -INSERT INTO `sys_role_menu` VALUES (2, 2087); -INSERT INTO `sys_role_menu` VALUES (2, 2088); -INSERT INTO `sys_role_menu` VALUES (2, 2089); -INSERT INTO `sys_role_menu` VALUES (2, 2091); -INSERT INTO `sys_role_menu` VALUES (2, 2092); -INSERT INTO `sys_role_menu` VALUES (2, 2094); -INSERT INTO `sys_role_menu` VALUES (2, 2097); -INSERT INTO `sys_role_menu` VALUES (2, 2098); -INSERT INTO `sys_role_menu` VALUES (2, 2099); -INSERT INTO `sys_role_menu` VALUES (2, 2100); -INSERT INTO `sys_role_menu` VALUES (2, 2101); -INSERT INTO `sys_role_menu` VALUES (2, 2102); -INSERT INTO `sys_role_menu` VALUES (2, 2103); -INSERT INTO `sys_role_menu` VALUES (2, 2104); -INSERT INTO `sys_role_menu` VALUES (2, 2105); -INSERT INTO `sys_role_menu` VALUES (2, 2106); -INSERT INTO `sys_role_menu` VALUES (2, 2107); -INSERT INTO `sys_role_menu` VALUES (2, 2108); -INSERT INTO `sys_role_menu` VALUES (2, 2109); -INSERT INTO `sys_role_menu` VALUES (2, 2111); -INSERT INTO `sys_role_menu` VALUES (2, 2112); -INSERT INTO `sys_role_menu` VALUES (2, 2113); -INSERT INTO `sys_role_menu` VALUES (2, 2114); -INSERT INTO `sys_role_menu` VALUES (2, 2118); -INSERT INTO `sys_role_menu` VALUES (2, 2119); -INSERT INTO `sys_role_menu` VALUES (2, 2120); -INSERT INTO `sys_role_menu` VALUES (2, 2121); -INSERT INTO `sys_role_menu` VALUES (2, 2122); -INSERT INTO `sys_role_menu` VALUES (2, 2123); -INSERT INTO `sys_role_menu` VALUES (2, 2124); -INSERT INTO `sys_role_menu` VALUES (2, 2125); -INSERT INTO `sys_role_menu` VALUES (2, 2126); -INSERT INTO `sys_role_menu` VALUES (2, 2128); -INSERT INTO `sys_role_menu` VALUES (2, 2129); -INSERT INTO `sys_role_menu` VALUES (2, 2130); -INSERT INTO `sys_role_menu` VALUES (2, 2131); -INSERT INTO `sys_role_menu` VALUES (2, 2132); -INSERT INTO `sys_role_menu` VALUES (2, 2133); -INSERT INTO `sys_role_menu` VALUES (2, 2138); -INSERT INTO `sys_role_menu` VALUES (2, 2140); -INSERT INTO `sys_role_menu` VALUES (2, 2141); -INSERT INTO `sys_role_menu` VALUES (2, 2144); -INSERT INTO `sys_role_menu` VALUES (3, 1); -INSERT INTO `sys_role_menu` VALUES (3, 4); -INSERT INTO `sys_role_menu` VALUES (3, 5); -INSERT INTO `sys_role_menu` VALUES (3, 108); -INSERT INTO `sys_role_menu` VALUES (3, 112); -INSERT INTO `sys_role_menu` VALUES (3, 115); -INSERT INTO `sys_role_menu` VALUES (3, 500); -INSERT INTO `sys_role_menu` VALUES (3, 501); -INSERT INTO `sys_role_menu` VALUES (3, 1030); -INSERT INTO `sys_role_menu` VALUES (3, 1031); -INSERT INTO `sys_role_menu` VALUES (3, 1032); -INSERT INTO `sys_role_menu` VALUES (3, 1034); -INSERT INTO `sys_role_menu` VALUES (3, 1039); -INSERT INTO `sys_role_menu` VALUES (3, 1042); -INSERT INTO `sys_role_menu` VALUES (3, 1048); -INSERT INTO `sys_role_menu` VALUES (3, 2009); -INSERT INTO `sys_role_menu` VALUES (3, 2010); -INSERT INTO `sys_role_menu` VALUES (3, 2075); -INSERT INTO `sys_role_menu` VALUES (3, 2078); -INSERT INTO `sys_role_menu` VALUES (3, 2080); -INSERT INTO `sys_role_menu` VALUES (3, 2081); -INSERT INTO `sys_role_menu` VALUES (3, 2082); -INSERT INTO `sys_role_menu` VALUES (3, 2083); -INSERT INTO `sys_role_menu` VALUES (3, 2084); -INSERT INTO `sys_role_menu` VALUES (3, 2085); -INSERT INTO `sys_role_menu` VALUES (3, 2086); -INSERT INTO `sys_role_menu` VALUES (3, 2087); -INSERT INTO `sys_role_menu` VALUES (3, 2088); -INSERT INTO `sys_role_menu` VALUES (3, 2089); -INSERT INTO `sys_role_menu` VALUES (3, 2091); -INSERT INTO `sys_role_menu` VALUES (3, 2092); -INSERT INTO `sys_role_menu` VALUES (3, 2094); -INSERT INTO `sys_role_menu` VALUES (3, 2097); -INSERT INTO `sys_role_menu` VALUES (3, 2098); -INSERT INTO `sys_role_menu` VALUES (3, 2099); -INSERT INTO `sys_role_menu` VALUES (3, 2100); -INSERT INTO `sys_role_menu` VALUES (3, 2101); -INSERT INTO `sys_role_menu` VALUES (3, 2102); -INSERT INTO `sys_role_menu` VALUES (3, 2103); -INSERT INTO `sys_role_menu` VALUES (3, 2104); -INSERT INTO `sys_role_menu` VALUES (3, 2105); -INSERT INTO `sys_role_menu` VALUES (3, 2106); -INSERT INTO `sys_role_menu` VALUES (3, 2107); -INSERT INTO `sys_role_menu` VALUES (3, 2108); -INSERT INTO `sys_role_menu` VALUES (3, 2109); -INSERT INTO `sys_role_menu` VALUES (3, 2111); -INSERT INTO `sys_role_menu` VALUES (3, 2112); -INSERT INTO `sys_role_menu` VALUES (3, 2113); -INSERT INTO `sys_role_menu` VALUES (3, 2118); -INSERT INTO `sys_role_menu` VALUES (3, 2119); -INSERT INTO `sys_role_menu` VALUES (3, 2120); -INSERT INTO `sys_role_menu` VALUES (3, 2123); -INSERT INTO `sys_role_menu` VALUES (3, 2124); -INSERT INTO `sys_role_menu` VALUES (3, 2125); -INSERT INTO `sys_role_menu` VALUES (3, 2126); -INSERT INTO `sys_role_menu` VALUES (3, 2127); -INSERT INTO `sys_role_menu` VALUES (3, 2128); -INSERT INTO `sys_role_menu` VALUES (3, 2129); -INSERT INTO `sys_role_menu` VALUES (3, 2130); -INSERT INTO `sys_role_menu` VALUES (3, 2131); -INSERT INTO `sys_role_menu` VALUES (3, 2132); -INSERT INTO `sys_role_menu` VALUES (3, 2133); -INSERT INTO `sys_role_menu` VALUES (3, 2138); -INSERT INTO `sys_role_menu` VALUES (3, 2140); -INSERT INTO `sys_role_menu` VALUES (3, 2141); -INSERT INTO `sys_role_menu` VALUES (3, 2144); -INSERT INTO `sys_role_menu` VALUES (4, 1); -INSERT INTO `sys_role_menu` VALUES (4, 5); -INSERT INTO `sys_role_menu` VALUES (4, 112); -INSERT INTO `sys_role_menu` VALUES (4, 115); -INSERT INTO `sys_role_menu` VALUES (4, 500); -INSERT INTO `sys_role_menu` VALUES (4, 501); -INSERT INTO `sys_role_menu` VALUES (4, 1039); -INSERT INTO `sys_role_menu` VALUES (4, 1041); -INSERT INTO `sys_role_menu` VALUES (4, 1042); -INSERT INTO `sys_role_menu` VALUES (4, 1044); -INSERT INTO `sys_role_menu` VALUES (4, 1048); -INSERT INTO `sys_role_menu` VALUES (4, 2080); -INSERT INTO `sys_role_menu` VALUES (4, 2081); -INSERT INTO `sys_role_menu` VALUES (4, 2082); -INSERT INTO `sys_role_menu` VALUES (4, 2083); -INSERT INTO `sys_role_menu` VALUES (4, 2084); -INSERT INTO `sys_role_menu` VALUES (4, 2085); -INSERT INTO `sys_role_menu` VALUES (4, 2086); -INSERT INTO `sys_role_menu` VALUES (4, 2087); -INSERT INTO `sys_role_menu` VALUES (4, 2088); -INSERT INTO `sys_role_menu` VALUES (4, 2089); -INSERT INTO `sys_role_menu` VALUES (4, 2091); -INSERT INTO `sys_role_menu` VALUES (4, 2092); -INSERT INTO `sys_role_menu` VALUES (4, 2094); -INSERT INTO `sys_role_menu` VALUES (4, 2097); -INSERT INTO `sys_role_menu` VALUES (4, 2098); -INSERT INTO `sys_role_menu` VALUES (4, 2099); -INSERT INTO `sys_role_menu` VALUES (4, 2101); -INSERT INTO `sys_role_menu` VALUES (4, 2104); -INSERT INTO `sys_role_menu` VALUES (4, 2113); -INSERT INTO `sys_role_menu` VALUES (4, 2119); -INSERT INTO `sys_role_menu` VALUES (4, 2120); -INSERT INTO `sys_role_menu` VALUES (4, 2124); -INSERT INTO `sys_role_menu` VALUES (4, 2125); -INSERT INTO `sys_role_menu` VALUES (4, 2126); -INSERT INTO `sys_role_menu` VALUES (4, 2127); -INSERT INTO `sys_role_menu` VALUES (4, 2128); -INSERT INTO `sys_role_menu` VALUES (4, 2129); -INSERT INTO `sys_role_menu` VALUES (4, 2130); -INSERT INTO `sys_role_menu` VALUES (4, 2131); -INSERT INTO `sys_role_menu` VALUES (4, 2132); -INSERT INTO `sys_role_menu` VALUES (4, 2133); -INSERT INTO `sys_role_menu` VALUES (4, 2138); -INSERT INTO `sys_role_menu` VALUES (4, 2140); -INSERT INTO `sys_role_menu` VALUES (4, 2141); -INSERT INTO `sys_role_menu` VALUES (4, 2144); -INSERT INTO `sys_role_menu` VALUES (5, 1); -INSERT INTO `sys_role_menu` VALUES (5, 5); -INSERT INTO `sys_role_menu` VALUES (5, 112); -INSERT INTO `sys_role_menu` VALUES (5, 2080); -INSERT INTO `sys_role_menu` VALUES (5, 2081); -INSERT INTO `sys_role_menu` VALUES (5, 2082); -INSERT INTO `sys_role_menu` VALUES (5, 2087); -INSERT INTO `sys_role_menu` VALUES (5, 2131); -INSERT INTO `sys_role_menu` VALUES (5, 2132); +-- +-- Dumping data for table `sys_role_menu` +-- -SET FOREIGN_KEY_CHECKS = 1; +LOCK TABLES `sys_role_menu` WRITE; + +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 4); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 5); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 100); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 101); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 102); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 103); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 104); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 105); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 108); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 111); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 112); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 115); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 116); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 117); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 500); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 501); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1000); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1001); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1002); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1003); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1004); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1005); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1006); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1007); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1008); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1009); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1010); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1011); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1012); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1013); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1014); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1015); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1016); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1017); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1018); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1019); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1020); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1021); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1022); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1023); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1024); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1030); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1031); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1032); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1033); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1034); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1039); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1040); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1041); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1042); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1043); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1044); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1045); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1048); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1049); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1050); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1051); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1052); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1053); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1054); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1055); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1056); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2009); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2010); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2078); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2080); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2081); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2082); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2083); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2084); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2085); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2086); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2087); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2088); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2089); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2091); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2092); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2094); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2097); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2098); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2099); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2100); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2101); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2102); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2103); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2104); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2105); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2106); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2107); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2108); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2109); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2111); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2113); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2114); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2118); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2119); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2120); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2121); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2122); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2123); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2124); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2125); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2126); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2128); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2129); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2130); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2131); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2137); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2142); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2143); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2145); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2146); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2147); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 4); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 5); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 108); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 112); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 115); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 500); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 501); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1030); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1031); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1032); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1034); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1039); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1042); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1048); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2009); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2010); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2078); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2080); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2081); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2082); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2083); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2084); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2085); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2086); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2087); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2088); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2089); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2091); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2092); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2094); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2097); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2098); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2099); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2100); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2101); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2102); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2103); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2104); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2105); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2106); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2107); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2108); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2109); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2111); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2113); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2118); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2119); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2120); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2123); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2124); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2125); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2126); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2127); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2128); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2129); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2130); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2131); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2137); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2143); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2147); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 5); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 112); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 115); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 500); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 501); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1039); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1041); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1042); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1044); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1048); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2080); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2081); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2082); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2083); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2084); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2085); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2086); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2087); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2088); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2089); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2091); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2092); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2094); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2097); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2098); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2099); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2101); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2104); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2113); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2119); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2120); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2124); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2125); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2126); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2127); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2128); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2129); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2130); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2131); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2147); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 1); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 5); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 112); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2080); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2081); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2082); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2087); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2131); +INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2132); + +UNLOCK TABLES; + +-- Dump completed on 2024-04-12 21:19:19 diff --git a/database/install/sys_user.sql b/database/install/sys_user.sql index 5d34f7a1..6e33172e 100644 --- a/database/install/sys_user.sql +++ b/database/install/sys_user.sql @@ -1,27 +1,10 @@ -- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `sys_user` -- DROP TABLE IF EXISTS `sys_user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `sys_user` ( `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID', `dept_id` bigint DEFAULT '0' COMMENT '部门ID', @@ -44,7 +27,6 @@ CREATE TABLE `sys_user` ( `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注', PRIMARY KEY (`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户信息表'; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `sys_user` @@ -52,17 +34,12 @@ CREATE TABLE `sys_user` ( LOCK TABLES `sys_user` WRITE; /*!40000 ALTER TABLE `sys_user` DISABLE KEYS */; -INSERT INTO `sys_user` VALUES (1,NULL,'supervisor','supervisor','sys','','','','','$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq','1','0','192.168.5.58',1709631361655,'admin',1697091656500,'supervisor',1709631361656,''),(2,NULL,'admin','admin','sys','','','','','$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq','1','0','192.168.2.219',1709713306413,'admin',1697091656500,'admin',1709713306416,''),(103,NULL,'manager','manager','sys','','','','','$2a$10$RND3fUw9Ai.WcggYSI57tu.u3OIlktdPxFzlWkmiHC1paV038t0I2','1','0','192.168.2.219',1701425631740,'admin',1698661521780,'manager',1701425631741,''),(104,NULL,'monitor','monitor','sys','','','','','$2a$10$t3zpKQ0olECotFyI1yO43.tCoS0EXoSRBDcqwl09xvrsmn14qFHHy','1','0','192.168.2.219',1699345510602,'admin',1698661684898,'monitor',1699345510603,''),(106,100,'admin1','admin1','sys','','','1','','$2a$10$HmaZLRdHqWJ.PFanzQoBiOVWcjy.gIj4o6C6KE49FO.AM4f/U6YP.','0','0','',0,'admin',1701424142061,'',0,NULL); -/*!40000 ALTER TABLE `sys_user` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +INSERT INTO `sys_user` VALUES (1, NULL, 'supervisor', 'supervisor', 'sys', '', '', '', '', '$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq', '1', '0', '127.0.0.1', 0, '', 0, '', 0, ''); +INSERT INTO `sys_user` VALUES (2, NULL, 'admin', 'admin', 'sys', '', '', '', '', '$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq', '1', '0', '127.0.0.1', 0, '', 0, '', 0, ''); +INSERT INTO `sys_user` VALUES (3, NULL, 'manager', 'manager', 'sys', '', '', '', '', '$2a$10$RND3fUw9Ai.WcggYSI57tu.u3OIlktdPxFzlWkmiHC1paV038t0I2', '1', '0', '127.0.0.1', 0, '', 0, '', 0, ''); +INSERT INTO `sys_user` VALUES (4, NULL, 'monitor', 'monitor', 'sys', '', '', '', '', '$2a$10$t3zpKQ0olECotFyI1yO43.tCoS0EXoSRBDcqwl09xvrsmn14qFHHy', '1', '0', '127.0.0.1', 0, '', 0, '', 0, ''); + +UNLOCK TABLES; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2024-03-06 17:27:00 diff --git a/database/install/sys_user_post.sql b/database/install/sys_user_post.sql index 09cc620a..660c4d76 100644 --- a/database/install/sys_user_post.sql +++ b/database/install/sys_user_post.sql @@ -1,51 +1,24 @@ -- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `sys_user_post` -- DROP TABLE IF EXISTS `sys_user_post`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `sys_user_post` ( `user_id` bigint(20) NOT NULL COMMENT '用户ID', `post_id` bigint(20) NOT NULL COMMENT '岗位ID', PRIMARY KEY (`user_id`,`post_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户与岗位关联表'; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `sys_user_post` -- LOCK TABLES `sys_user_post` WRITE; -/*!40000 ALTER TABLE `sys_user_post` DISABLE KEYS */; -INSERT INTO `sys_user_post` VALUES (1,1),(101,3),(103,2); -/*!40000 ALTER TABLE `sys_user_post` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +INSERT INTO `sys_user_post` VALUES (1,1),(2,2),(3,3),(4,3); + +UNLOCK TABLES; -- Dump completed on 2024-03-06 17:27:00 diff --git a/database/install/sys_user_role.sql b/database/install/sys_user_role.sql index 6164b359..514fa42d 100644 --- a/database/install/sys_user_role.sql +++ b/database/install/sys_user_role.sql @@ -1,51 +1,24 @@ -- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `sys_user_role` -- DROP TABLE IF EXISTS `sys_user_role`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `sys_user_role` ( `user_id` bigint(20) NOT NULL COMMENT '用户ID', `role_id` bigint(20) NOT NULL COMMENT '角色ID', PRIMARY KEY (`user_id`,`role_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户和角色关联表'; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `sys_user_role` -- LOCK TABLES `sys_user_role` WRITE; -/*!40000 ALTER TABLE `sys_user_role` DISABLE KEYS */; -INSERT INTO `sys_user_role` VALUES (1,1),(2,2),(100,2),(101,117),(102,2),(103,3),(104,4); -/*!40000 ALTER TABLE `sys_user_role` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +INSERT INTO `sys_user_role` VALUES (1,1),(2,2),(3,3),(4,4); + +UNLOCK TABLES; -- Dump completed on 2024-03-06 17:27:01 diff --git a/database/install/u_sub_user.sql b/database/install/u_sub_user.sql index b4588afb..dc60d478 100644 --- a/database/install/u_sub_user.sql +++ b/database/install/u_sub_user.sql @@ -46,7 +46,7 @@ CREATE TABLE `u_sub_user` ( `static_ip` varchar(50) DEFAULT NULL COMMENT 'staticIpstatic_ip指给4G UE分配的静态IP,没有可不带此字段名', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `imsi_ne` (`imsi`,`ne_id`) USING BTREE COMMENT 'imsi_ne唯一索引' -) ENGINE=InnoDB AUTO_INCREMENT=12123 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='UDM签约用户'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='UDM签约用户'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/user.sql b/database/install/user.sql deleted file mode 100644 index d2a8df4e..00000000 --- a/database/install/user.sql +++ /dev/null @@ -1,69 +0,0 @@ --- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) --- --- Host: 192.168.2.219 Database: omc_db --- ------------------------------------------------------ --- Server version 10.3.38-MariaDB - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `user` --- - -DROP TABLE IF EXISTS `user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `account_id` varchar(32) NOT NULL, - `name` varchar(10) DEFAULT NULL, - `real_name` varchar(128) DEFAULT NULL, - `sn` varchar(128) DEFAULT NULL, - `gender` varchar(128) DEFAULT NULL, - `email` varchar(128) DEFAULT NULL, - `id_card_number` varchar(128) DEFAULT NULL, - `description` varchar(128) DEFAULT NULL, - `telephone_number` varchar(128) DEFAULT NULL, - `phone` varchar(128) DEFAULT NULL, - `mobile` varchar(128) DEFAULT NULL, - `employee_number` varchar(128) DEFAULT NULL, - `employee_type` varchar(128) DEFAULT NULL, - `organize` varchar(128) DEFAULT NULL, - `supporter_corp_name` varchar(128) DEFAULT NULL, - `start_time` varchar(128) DEFAULT NULL, - `end_time` varchar(128) DEFAULT NULL, - `password` varchar(256) DEFAULT NULL, - `password_sha512` varchar(1024) DEFAULT NULL, - `change_password_flag` tinyint(4) unsigned zerofill DEFAULT 0000, - `password_expiration` datetime DEFAULT NULL, - `status` enum('Active','Closed','Locked','Pending') DEFAULT 'Active', - `user_expiration` datetime DEFAULT NULL, - `group_name` varchar(16) DEFAULT 'omc', - `profile` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `create_time` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `update_time` datetime DEFAULT NULL, - `unit` varchar(128) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `idx_uni_user_acc_id` (`account_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=202 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-旧前端使用'; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-03-06 17:26:59 diff --git a/database/install/zinstall.sql b/database/install/zinstall.sql index a0ee0ca8..f7cdc98a 100644 --- a/database/install/zinstall.sql +++ b/database/install/zinstall.sql @@ -1,509 +1,5 @@ SET FOREIGN_KEY_CHECKS=0; -INSERT - IGNORE INTO `omc_db`.`user` ( - `id`, - `account_id`, - `name`, - `real_name`, - `sn`, - `gender`, - `email`, - `id_card_number`, - `description`, - `telephone_number`, - `phone`, - `mobile`, - `employee_number`, - `employee_type`, - `organize`, - `supporter_corp_name`, - `start_time`, - `end_time`, - `password`, - `password_sha512`, - `change_password_flag`, - `password_expiration`, - `status`, - `user_expiration`, - `group_name`, - `profile` - ) -VALUES ( - 1, - 'admin', - 'admin', - 'administrator', - '', - '', - 'admin@aa.com', - NULL, - NULL, - NULL, - '312', - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - '$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq', - '324584ab0b03a5af1899c1801485de8a455a114d5f6ee08a48dbdf7e8f1a047eaaa1789e881f9eb268113f6c6814fa20f43183ffa6e014765f2aa8733c526048', - 0000, - NULL, - 'Active', - NULL, - 'admin', - '{\"color\":{\"critical\":\"#e8994a\",\"event\":\"#c5d2dc\",\"major\":\"#494040\",\"minor\":\"#5f70a8\",\"sound\":\"custom\",\"warning\":\"#b9e1dd\"},\"sound\":\"custom\",\"custom\":\"hrxz.com-exz2s3uxhc47391.mp3\"}' - ); - --- add default ne info -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 1, - 'OMC', - '001', - '4400HX101', - 'OMC_001', - '172.16.5.100', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 2, - 'IMS', - '001', - '4400HX1IMS001', - 'IMS_001', - '172.16.5.110', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 3, - 'AMF', - '001', - '4400HX1AMF001', - 'AMF_001', - '172.16.5.120', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 4, - 'AUSF', - '001', - '4400HX1AUF001', - 'AUSF_001', - '172.16.5.130', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 5, - 'UDM', - '001', - '4400HX1UDM001', - 'UDM_001', - '172.16.5.140', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 6, - 'SMF', - '001', - '4400HX1SMF001', - 'SMF_001', - '172.16.5.150', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 7, - 'PCF', - '001', - '4400HX1PCF001', - 'PCF_001', - '172.16.5.160', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 8, - 'NSSF', - '001', - '4400HX1NSF001', - 'NSSF_001', - '172.16.5.170', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 9, - 'NRF', - '001', - '4400HX1NRF001', - 'NRF_001', - '172.16.5.180', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 10, - 'UPF', - '001', - '4400HX1UPF001', - 'UPF_001', - '172.16.5.190', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 11, - 'LMF', - '001', - '4400HX1LMF001', - 'LMF_001', - '172.16.5.200', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 12, - 'NEF', - '001', - '4400HX1NEF001', - 'NEF_001', - '172.16.5.210', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 13, - 'MME', - '001', - '4400HX1MME001', - 'MME_001', - '172.16.5.220', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); - -INSERT - IGNORE INTO `omc_db`.`ne_info` ( - `id`, - `ne_type`, - `ne_id`, - `rm_uid`, - `ne_name`, - `ip`, - `port`, - `pv_flag`, - `province`, - `vendor_name`, - `dn`, - `ne_address`, - `status` - ) -VALUES ( - 14, - 'N3IWF', - '001', - '4400HX1IWF001', - 'N3IWF_001', - '172.16.5.230', - 33030, - 'PNF', - '-', - '-', - '-', - '-', - 0 - ); +-- SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/database/upgrade/upg_alarm_event.sql b/database/upgrade/upg_alarm_event.sql index 9d4365b0..eb1b54b7 100644 --- a/database/upgrade/upg_alarm_event.sql +++ b/database/upgrade/upg_alarm_event.sql @@ -57,7 +57,7 @@ CREATE TABLE IF NOT EXISTS `alarm_event` ( UNIQUE INDEX `idx_uni_aid_ne_aseq`(`ne_type`, `ne_id`, `alarm_id`, `alarm_seq`) USING BTREE, INDEX `idx_event_time`(`event_time`) USING BTREE, INDEX `idx_severity_status`(`alarm_status`, `orig_severity`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 228788 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- Move event alarm from table alarm to alarm_event START TRANSACTION; diff --git a/database/install/sys_backup.sql b/database/upgrade/upg_monitor_base.sql similarity index 59% rename from database/install/sys_backup.sql rename to database/upgrade/upg_monitor_base.sql index 0a9d1765..842711ec 100644 --- a/database/install/sys_backup.sql +++ b/database/upgrade/upg_monitor_base.sql @@ -16,25 +16,24 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `sys_backup` +-- Table structure for table `monitor_base` -- -DROP TABLE IF EXISTS `sys_backup`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sys_backup` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', - `created_at` datetime DEFAULT NULL COMMENT '创建时间', - `updated_at` datetime DEFAULT NULL COMMENT '更新时间', - `backup_type` varchar(50) DEFAULT NULL COMMENT '备份类型 0文件资源 1数据库', - `backup_way` varchar(50) DEFAULT NULL COMMENT '备份方式 0手动备份 1周期备份', - `name` varchar(50) DEFAULT NULL COMMENT '文件名', - `path` varchar(200) DEFAULT NULL COMMENT '文件路径', - `backup_time` datetime DEFAULT NULL COMMENT '备份时间', - `backup_medium` varchar(200) DEFAULT NULL COMMENT '备份介质', - `backup_value` varchar(50) DEFAULT NULL COMMENT '备份内容', +CREATE TABLE IF NOT EXISTS `monitor_base` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `cpu` float DEFAULT '0' COMMENT 'cpu使用率', + `load_usage` float DEFAULT '0' COMMENT 'cpu平均使用率', + `cpu_load1` float DEFAULT '0' COMMENT 'cpu使用1分钟', + `cpu_load5` float DEFAULT '0' COMMENT 'cpu使用5分钟', + `cpu_load15` float DEFAULT '0' COMMENT 'cpu使用15分钟', + `memory` float DEFAULT '0' COMMENT '内存使用率', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-旧前端使用的系统文件数据备份'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_基本信息'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -46,4 +45,4 @@ CREATE TABLE `sys_backup` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-03-06 17:26:58 +-- Dump completed on 2024-03-06 17:26:56 diff --git a/database/install/security_log.sql b/database/upgrade/upg_monitor_io.sql similarity index 63% rename from database/install/security_log.sql rename to database/upgrade/upg_monitor_io.sql index f3e9436b..ff5914a2 100644 --- a/database/install/security_log.sql +++ b/database/upgrade/upg_monitor_io.sql @@ -16,23 +16,23 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `security_log` +-- Table structure for table `monitor_io` -- -DROP TABLE IF EXISTS `security_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `security_log` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `account_name` varchar(32) NOT NULL, - `account_type` varchar(16) NOT NULL COMMENT 'group_name', - `op_ip` varchar(64) DEFAULT NULL, - `op_type` tinyint(4) DEFAULT NULL COMMENT '// 0-Login 1-Logout 2-Add 3-Update 4-Delete 5-Lock 6-Unlock', - `op_content` text DEFAULT NULL, - `op_result` tinyint(4) DEFAULT NULL, - `op_time` datetime DEFAULT NULL, +CREATE TABLE IF NOT EXISTS `monitor_io` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '磁盘名', + `read` int DEFAULT '0' COMMENT '读取K', + `write` int DEFAULT '0' COMMENT '写入K', + `count` int DEFAULT '0' COMMENT '读写次数', + `time` int DEFAULT '0' COMMENT '读写延迟', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=646 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_磁盘IO'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -44,4 +44,4 @@ CREATE TABLE `security_log` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-03-06 17:26:58 +-- Dump completed on 2024-03-06 17:26:56 diff --git a/database/install/session.sql b/database/upgrade/upg_monitor_network.sql similarity index 65% rename from database/install/session.sql rename to database/upgrade/upg_monitor_network.sql index a9e19714..f08b89b4 100644 --- a/database/install/session.sql +++ b/database/upgrade/upg_monitor_network.sql @@ -16,25 +16,21 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `session` +-- Table structure for table `monitor_network` -- -DROP TABLE IF EXISTS `session`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `session` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `account_id` varchar(32) DEFAULT NULL, - `name` varchar(32) DEFAULT NULL, - `host` varchar(32) DEFAULT NULL, - `access_token` varchar(255) DEFAULT NULL, - `expires` int(11) DEFAULT NULL, - `status` enum('online','offline') DEFAULT 'online', - `login_time` datetime DEFAULT current_timestamp(), - `shake_time` datetime DEFAULT NULL, - `logout_time` datetime DEFAULT NULL, +CREATE TABLE IF NOT EXISTS `monitor_network` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网卡名', + `up` float DEFAULT '0' COMMENT '上行', + `down` float DEFAULT '0' COMMENT '下行', + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网元ID', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1194 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监控_网络IO'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -46,4 +42,4 @@ CREATE TABLE `session` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-03-06 17:26:58 +-- Dump completed on 2024-03-06 17:26:56 diff --git a/database/upgrade/upg_ne_host.sql b/database/upgrade/upg_ne_host.sql index 0c42833f..b391a74e 100644 --- a/database/upgrade/upg_ne_host.sql +++ b/database/upgrade/upg_ne_host.sql @@ -1,14 +1,14 @@ SET FOREIGN_KEY_CHECKS=0; -CREATE TABLE IF NOT EXISTS `omc_db`.`ne_host` ( +CREATE TABLE IF NOT EXISTS `ne_host` ( `host_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主机主键', `host_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机类型 ssh telnet', `group_id` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '分组(0默认 1网元 2系统)', - `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题名称', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题名称', `addr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机地址', `port` int NULL DEFAULT 22 COMMENT 'SSH端口', `user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机用户名', - `auth_mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '认证模式(0密码 1主机私钥)', + `auth_mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '认证模式(0密码 1主机私钥 2已免密)', `password` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证密码', `private_key` varchar(6000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证私钥', `pass_phrase` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证私钥密码', @@ -21,39 +21,4 @@ CREATE TABLE IF NOT EXISTS `omc_db`.`ne_host` ( UNIQUE INDEX `uk_type_group_title`(`host_type` ASC, `group_id` ASC, `title` ASC) USING BTREE COMMENT '同组内名称唯一' ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元主机表' ROW_FORMAT = DYNAMIC; - --- 初始记录 -INSERT IGNORE INTO `ne_host` VALUES (1, 'ssh', '1', 'OMC_001_22', '172.16.5.100', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (2, 'telnet', '1', 'OMC_001_4100', '172.16.5.100', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (3, 'ssh', '1', 'IMS_001_22', '172.16.5.110', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708314682742, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (4, 'telnet', '1', 'IMS_001_4100', '172.16.5.110', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (5, 'ssh', '1', 'AMF_001_22', '172.16.5.120', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708314682742, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (6, 'telnet', '1', 'AMF_001_4100', '172.16.5.120', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (7, 'ssh', '1', 'AUSF_001_22', '172.16.5.130', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (8, 'telnet', '1', 'AUSF_001_4100', '172.16.5.130', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (9, 'ssh', '1', 'UDM_001_22', '172.16.5.140', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (10, 'telnet', '1', 'UDM_001_4100', '172.16.5.140', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (11, 'ssh', '1', 'SMF_001_22', '172.16.5.150', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (12, 'telnet', '1', 'SMF_001_4100', '172.16.5.150', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (13, 'ssh', '1', 'PCF_001_22', '172.16.5.160', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (14, 'telnet', '1', 'PCF_001_4100', '172.16.5.160', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (15, 'ssh', '1', 'NSSF_001_22', '172.16.5.170', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (16, 'telnet', '1', 'NSSF_001_4100', '172.16.5.170', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (17, 'ssh', '1', 'NRF_001_22', '172.16.5.180', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (18, 'telnet', '1', 'NRF_001_4100', '172.16.5.180', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (19, 'ssh', '1', 'UPF_001_22', '172.16.5.190', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (20, 'telnet', '1', 'UPF_001_4100', '172.16.5.190', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (21, 'telnet', '1', 'UPF_001_5002', '172.16.5.190', 5002, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (22, 'ssh', '1', 'LMF_001_22', '172.16.5.200', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (23, 'telnet', '1', 'LMF_001_4100', '172.16.5.200', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (24, 'ssh', '1', 'NEF_001_22', '172.16.5.210', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (25, 'telnet', '1', 'NEF_001_4100', '172.16.5.210', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (26, 'ssh', '1', 'MME_001_22', '172.16.5.220', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (27, 'telnet', '1', 'MME_001_4100', '172.16.5.220', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (28, 'ssh', '1', 'N3IWF_001_22', '172.16.5.230', 22, 'agtuser', '0', '1I8tB3dTRd5IjVZWRp+m9ppxzQ323U6XJZUJE510hus=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); -INSERT IGNORE INTO `ne_host` VALUES (29, 'telnet', '1', 'N3IWF_001_4100', '172.16.5.230', 4100, 'admin', '0', 'YYxSAY9Zng3EuB3dngRqNoPIh8GK3GhesFqIznv5qAA=', NULL, NULL, NULL, 'admin', 1708333292882, NULL, 0); - --- 更新记录 - - SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_ne_host_cmd.sql b/database/upgrade/upg_ne_host_cmd.sql index 63e4e51c..53a0cf9c 100644 --- a/database/upgrade/upg_ne_host_cmd.sql +++ b/database/upgrade/upg_ne_host_cmd.sql @@ -1,6 +1,6 @@ SET FOREIGN_KEY_CHECKS=0; -CREATE TABLE IF NOT EXISTS `omc_db`.`ne_host_cmd` ( +CREATE TABLE IF NOT EXISTS `ne_host_cmd` ( `cmd_id` bigint NOT NULL AUTO_INCREMENT COMMENT '命令主键', `cmd_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '命令类型', `group_id` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '分组(0默认 1快速命令)', @@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS `omc_db`.`ne_host_cmd` ( `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`cmd_id`) USING BTREE, UNIQUE INDEX `uk_type_group_title`(`cmd_type` ASC, `group_id` ASC, `title` ASC) USING BTREE COMMENT '同组内名称唯一' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元主机命令表' ROW_FORMAT = DYNAMIC; +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元主机命令表' ROW_FORMAT = DYNAMIC; -- 初始记录 diff --git a/database/upgrade/upg_ne_info.sql b/database/upgrade/upg_ne_info.sql index c881de3f..0647b3d8 100644 --- a/database/upgrade/upg_ne_info.sql +++ b/database/upgrade/upg_ne_info.sql @@ -1,24 +1,43 @@ SET FOREIGN_KEY_CHECKS=0; -ALTER TABLE `omc_db`.`ne_info` COMMENT = '网元信息表'; +-- ---------------------------- +-- Table structure for ne_info +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `ne_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `rm_uid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `port` int NULL DEFAULT 0 COMMENT '端口', + `pv_flag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'PNF' COMMENT '\'PNF\',\'VNF\'', + `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '省份地域', + `vendor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-', + `dn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', + `ne_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'MAC地址', + `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet,telnet)', + `status` int NULL DEFAULT 0 COMMENT '0离线 1在线 2配置待下发', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `ux_netype_neid`(`ne_type` ASC, `ne_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元信息表 对应一个网元版本、网元授权、网元主机' ROW_FORMAT = DYNAMIC; -ALTER TABLE `omc_db`.`ne_info` ADD COLUMN IF NOT EXISTS `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet,telnet)' AFTER `update_time`; - -ALTER TABLE `omc_db`.`ne_info` MODIFY COLUMN `status` int NULL DEFAULT 0 COMMENT '0: 在线 1: 下线 2: 备用 3: 待下发配置' AFTER `ne_address`; - --- 初始网元主机绑定 -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'OMC', `host_ids` = '1,2' WHERE `id` = 1; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'IMS', `host_ids` = '3,4' WHERE `id` = 2; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'AMF', `host_ids` = '5,6' WHERE `id` = 3; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'AUSF', `host_ids` = '7,8' WHERE `id` = 4; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'SMF', `host_ids` = '11,12' WHERE `id` = 6; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'PCF', `host_ids` = '13,14' WHERE `id` = 7; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'NSSF', `host_ids` = '15,16' WHERE `id` = 8; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'NRF', `host_ids` = '17,18' WHERE `id` = 9; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'UPF', `host_ids` = '19,20,21' WHERE `id` = 10; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'LMF', `host_ids` = '22,23' WHERE `id` = 11; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'NEF', `host_ids` = '24,25' WHERE `id` = 12; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'MME', `host_ids` = '26,27' WHERE `id` = 13; -UPDATE `omc_db`.`ne_info` SET `ne_type` = 'N3IWF', `host_ids` = '28,29' WHERE `id` = 14; +-- 20240511前旧表更新 +ALTER TABLE `ne_info` COMMENT = '网元信息表 对应一个网元版本、网元授权、网元主机'; +ALTER TABLE `ne_info` ADD COLUMN IF NOT EXISTS `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注' AFTER `status`; +ALTER TABLE `ne_info` ADD COLUMN IF NOT EXISTS `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者' AFTER `remark`; +ALTER TABLE `ne_info` ADD COLUMN IF NOT EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; +ALTER TABLE `ne_info` ADD COLUMN IF NOT EXISTS `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者' AFTER `create_time`; +ALTER TABLE `ne_info` MODIFY COLUMN `pv_flag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'PNF' COMMENT '\'PNF\',\'VNF\'' AFTER `port`; +ALTER TABLE `ne_info` MODIFY COLUMN `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省份地域' AFTER `pv_flag`; +ALTER TABLE `ne_info` MODIFY COLUMN `ne_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'MAC地址' AFTER `dn`; +ALTER TABLE `ne_info` MODIFY COLUMN `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet,telnet)' AFTER `ne_address`; +ALTER TABLE `ne_info` MODIFY COLUMN `status` int NULL DEFAULT 0 COMMENT '0离线 1在线 2配置待下发' AFTER `host_ids`; +ALTER TABLE `ne_info` MODIFY COLUMN `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; SET FOREIGN_KEY_CHECKS=1; diff --git a/database/upgrade/upg_ne_license.sql b/database/upgrade/upg_ne_license.sql new file mode 100644 index 00000000..a7f4f2ec --- /dev/null +++ b/database/upgrade/upg_ne_license.sql @@ -0,0 +1,52 @@ +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for ne_license +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `ne_license` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID', + `activation_request_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '激活申请代码', + `license_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '激活授权文件', + `serial_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '序列号', + `expiry_date` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '许可证到期日期', + `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态 0无效 1有效', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和网元ID' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元授权激活信息' ROW_FORMAT = DYNAMIC; + +-- 20240511前旧表更新 +ALTER TABLE `ne_license` COMMENT = '网元授权激活信息'; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `activation_request_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '激活申请代码' AFTER `ne_id`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `license_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '激活授权文件' AFTER `activation_request_code`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `serial_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '序列号' AFTER `license_path`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `expiry_date` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '许可证到期日期' AFTER `serial_num`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注' AFTER `status`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者' AFTER `remark`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者' AFTER `create_time`; +ALTER TABLE `ne_license` ADD COLUMN IF NOT EXISTS `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; +ALTER TABLE `ne_license` MODIFY COLUMN `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型' AFTER `id`; +ALTER TABLE `ne_license` MODIFY COLUMN `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID' AFTER `ne_type`; +ALTER TABLE `ne_license` MODIFY COLUMN `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态 0无效 1有效' AFTER `expiry_date`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `serial_no`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `capcity`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `used`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `feature_enabled`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `expiration_date`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `path`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `file_name`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `comment`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `created_at`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `updated_at`; +ALTER TABLE `ne_license` DROP COLUMN IF EXISTS `deleted_at`; +ALTER TABLE `ne_license` ADD UNIQUE INDEX IF NOT EXISTS `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和网元ID'; + + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/upgrade/upg_ne_software.sql b/database/upgrade/upg_ne_software.sql new file mode 100644 index 00000000..5406340b --- /dev/null +++ b/database/upgrade/upg_ne_software.sql @@ -0,0 +1,39 @@ +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for ne_software +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `ne_software` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包名称', + `path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '包路径', + `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包版本', + `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '包说明', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', + `create_time` bigint DEFAULT '0' COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者', + `update_time` bigint DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `uk_type_name_version` (`ne_type`,`name`,`version`) USING BTREE COMMENT '唯一网元类型和文件名版本是否唯一' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='网元软件包'; + +-- 20240511前旧表更新 +ALTER TABLE `ne_software` COMMENT = '网元软件包'; +ALTER TABLE `ne_software` ADD COLUMN IF NOT EXISTS `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包名称' AFTER `ne_type`; +ALTER TABLE `ne_software` ADD COLUMN IF NOT EXISTS `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '包说明' AFTER `version`; +ALTER TABLE `ne_software` ADD COLUMN IF NOT EXISTS `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者' AFTER `description`; +ALTER TABLE `ne_software` ADD COLUMN IF NOT EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; +ALTER TABLE `ne_software` ADD COLUMN IF NOT EXISTS `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者' AFTER `create_time`; +ALTER TABLE `ne_software` MODIFY COLUMN `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型' AFTER `id`; +ALTER TABLE `ne_software` MODIFY COLUMN `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '包路径' AFTER `name`; +ALTER TABLE `ne_software` MODIFY COLUMN `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '包版本' AFTER `path`; +ALTER TABLE `ne_software` MODIFY COLUMN `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; +ALTER TABLE `ne_software` DROP COLUMN IF EXISTS `file_name`; +ALTER TABLE `ne_software` DROP COLUMN IF EXISTS `md5_sum`; +ALTER TABLE `ne_software` DROP COLUMN IF EXISTS `status`; +ALTER TABLE `ne_software` DROP COLUMN IF EXISTS `comment`; +ALTER TABLE `ne_software` DROP COLUMN IF EXISTS `patch_time`; + ALTER TABLE `ne_software` ADD UNIQUE INDEX IF NOT EXISTS `uk_type_name_version`(`ne_type` ASC, `name` ASC, `version` ASC) USING BTREE COMMENT '唯一网元类型和文件名版本是否唯一'; + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/upgrade/upg_ne_version.sql b/database/upgrade/upg_ne_version.sql new file mode 100644 index 00000000..6189fdff --- /dev/null +++ b/database/upgrade/upg_ne_version.sql @@ -0,0 +1,51 @@ +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for ne_version +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `ne_version` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型', + `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID', + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前包名', + `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前版本', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前软件包', + `pre_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本包名', + `pre_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本', + `pre_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上一版本软件包', + `new_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本报名', + `new_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本', + `new_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '新版软件包', + `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '当前状态 0无 1当前版本 2上一版本 3有新版本', + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和ID' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网元版本信息' ROW_FORMAT = DYNAMIC; + +-- 20240511前旧表更新 +ALTER TABLE `ne_version` COMMENT = '网元版本信息'; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前包名' AFTER `ne_id`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前软件包' AFTER `version`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `pre_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本包名' AFTER `path`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `pre_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上一版本软件包' AFTER `pre_version`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `new_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本报名' AFTER `pre_path`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `new_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '新版软件包' AFTER `new_version`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者' AFTER `status`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; +ALTER TABLE `ne_version` ADD COLUMN IF NOT EXISTS `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者' AFTER `create_time`; +ALTER TABLE `ne_version` MODIFY COLUMN `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型' AFTER `id`; +ALTER TABLE `ne_version` MODIFY COLUMN `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID' AFTER `ne_type`; +ALTER TABLE `ne_version` MODIFY COLUMN `version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '当前版本' AFTER `name`; +ALTER TABLE `ne_version` MODIFY COLUMN `pre_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '上一版本' AFTER `pre_name`; +ALTER TABLE `ne_version` MODIFY COLUMN `new_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '新版本' AFTER `new_name`; +ALTER TABLE `ne_version` MODIFY COLUMN `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前状态 1当前版本 2上一版本 3有新版本' AFTER `new_path`; +ALTER TABLE `ne_version` MODIFY COLUMN `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; +ALTER TABLE `ne_version` DROP COLUMN IF EXISTS `file_path`; +ALTER TABLE `ne_version` DROP COLUMN IF EXISTS `pre_file`; +ALTER TABLE `ne_version` DROP COLUMN IF EXISTS `new_file`; +ALTER TABLE `ne_version` ADD UNIQUE INDEX IF NOT EXISTS `uk_type_id`(`ne_type` ASC, `ne_id` ASC) USING BTREE COMMENT '唯一网元类型和ID'; + +SET FOREIGN_KEY_CHECKS=1; diff --git a/database/upgrade/upg_sys_config.sql b/database/upgrade/upg_sys_config.sql index 061d5a79..67004282 100644 --- a/database/upgrade/upg_sys_config.sql +++ b/database/upgrade/upg_sys_config.sql @@ -23,7 +23,7 @@ INSERT IGNORE INTO `sys_config` VALUES (2, 'config.sys.account.captchaEnabled', INSERT IGNORE INTO `sys_config` VALUES (3, 'config.sys.account.registerUser', 'sys.account.registerUser', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.account.registerUserRemark'); INSERT IGNORE INTO `sys_config` VALUES (4, 'config.sys.user.maxRetryCount', 'sys.user.maxRetryCount', '5', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.user.maxRetryCountRemark'); INSERT IGNORE INTO `sys_config` VALUES (5, 'config.sys.user.lockTime', 'sys.user.lockTime', '10', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.user.lockTimeRemark'); -INSERT IGNORE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.agrandtech.com', 'Y', 'supervisor', 1698110000000, 'admin', 1700809804330, 'config.sys.officialUrlRemark'); +INSERT IGNORE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark'); INSERT IGNORE INTO `sys_config` VALUES (7, 'config.sys.helpDoc', 'sys.helpDoc', '/static/helpDoc/{language}_doc.pdf', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.helpDocRemark'); INSERT IGNORE INTO `sys_config` VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', 'supervisor', 1705410000000, NULL, 0, 'sys.account.captchaTypeRemark'); INSERT IGNORE INTO `sys_config` VALUES (10, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.monitor.sysResource.storeDaysRemark'); @@ -31,10 +31,10 @@ INSERT IGNORE INTO `sys_config` VALUES (102, 'config.sys.logo.type', 'sys.logo.t INSERT IGNORE INTO `sys_config` VALUES (103, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.logo.filePathIconRemark'); INSERT IGNORE INTO `sys_config` VALUES (104, 'config.sys.logo.filePathBrand', 'sys.logo.filePathBrand', '/static/logo/{language}_brand.png', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.logo.filePathBrandRemark'); INSERT IGNORE INTO `sys_config` VALUES (105, 'config.sys.loginBackground', 'sys.loginBackground', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.loginBackgroundRemark'); -INSERT IGNORE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1698110000000, NULL, 0, 'config.sys.titleRemark'); -INSERT IGNORE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1698110000000, NULL, 0, 'config.sys.copyrightRemark'); -INSERT IGNORE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1698110000000, NULL, 0, 'config.sys.i18nOpenRemark'); -INSERT IGNORE INTO `sys_config` VALUES (109, 'Internationalization Default Language', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1698110000000, 'supervisor', 1702632906566, 'config.sys.i18nDefaultRemark'); +INSERT IGNORE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark'); +INSERT IGNORE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark'); +INSERT IGNORE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark'); +INSERT IGNORE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark'); INSERT IGNORE INTO `sys_config` VALUES (110, 'config.sys.lockTime', 'sys.lockTime', '0', 'Y', 'supervisor', 1704960008300, 'admin', 1706838764703, 'config.sys.lockTimeRemark'); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_sys_dept.sql b/database/upgrade/upg_sys_dept.sql index 3459e6cd..d7878af8 100644 --- a/database/upgrade/upg_sys_dept.sql +++ b/database/upgrade/upg_sys_dept.sql @@ -1,126 +1,25 @@ SET FOREIGN_KEY_CHECKS=0; -CREATE TABLE IF NOT EXISTS `omc_db`.`sys_dept` ( - `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id', - `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父部门id 默认0', - `ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '祖级列表', - `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称', - `order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序', - `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', - `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', - `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '部门状态(0停用 1正常)', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间', - `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间', - PRIMARY KEY (`dept_id`) USING BTREE - ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic; +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE IF NOT EXISTS `sys_dept` ( + `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id', + `parent_id` bigint(20) DEFAULT 0 COMMENT '父部门id 默认0', + `ancestors` varchar(50) DEFAULT '' COMMENT '祖级列表', + `dept_name` varchar(128) DEFAULT '' COMMENT '部门名称', + `order_num` int(11) DEFAULT 0 COMMENT '显示顺序', + `leader` varchar(20) DEFAULT NULL COMMENT '负责人', + `phone` varchar(11) DEFAULT NULL COMMENT '联系电话', + `email` varchar(50) DEFAULT NULL COMMENT '邮箱', + `status` char(1) DEFAULT '0' COMMENT '部门状态(0停用 1正常)', + `del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', + `create_by` varchar(50) DEFAULT '' COMMENT '创建者', + `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) DEFAULT '' COMMENT '更新者', + `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`dept_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表'; --- -- add default dept - -INSERT - IGNORE INTO `omc_db`.`sys_dept` ( - `dept_id`, - `parent_id`, - `ancestors`, - `dept_name`, - `order_num`, - `leader`, - `phone`, - `email`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time` - ) -VALUES ( - 100, - 0, - '0', - '系统维护部', - 0, - 'admin', - '', - '', - '1', - '0', - 'admin', - 1697091866188, - '', - NULL - ); - -INSERT - IGNORE INTO `omc_db`.`sys_dept` ( - `dept_id`, - `parent_id`, - `ancestors`, - `dept_name`, - `order_num`, - `leader`, - `phone`, - `email`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time` - ) -VALUES ( - 101, - 100, - '0,100', - '运维一部', - 1, - 'admin', - '', - '', - '1', - '0', - 'admin', - 1697091866192, - '', - NULL - ); - --- for cn/en locale -UPDATE `omc_db`.`sys_dept` -SET - `parent_id` = 0, - `ancestors` = '0', - `dept_name` = 'dept.root', - `order_num` = 0, - `leader` = 'supervisor', - `phone` = NULL, - `email` = NULL, - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1699348237468, - `update_by` = NULL, - `update_time` = 0 -WHERE `dept_id` = 100; - -UPDATE `omc_db`.`sys_dept` -SET - `parent_id` = 100, - `ancestors` = '0,100', - `dept_name` = 'dept.root.item1', - `order_num` = 1, - `leader` = 'supervisor', - `phone` = NULL, - `email` = NULL, - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1699348237468, - `update_by` = NULL, - `update_time` = 0 -WHERE `dept_id` = 101; +INSERT IGNORE INTO `sys_dept` VALUES (1, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0); +INSERT IGNORE INTO `sys_dept` VALUES (2, 1, '0,1', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_sys_dict_data0.sql b/database/upgrade/upg_sys_dict_data0.sql index b4ed3b4b..9f84fa5d 100644 --- a/database/upgrade/upg_sys_dict_data0.sql +++ b/database/upgrade/upg_sys_dict_data0.sql @@ -37,7 +37,6 @@ CREATE TABLE IF NOT EXISTS `sys_dict_data` ( PRIMARY KEY (`dict_code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 10000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic; -ALTER TABLE `sys_dict_data` AUTO_INCREMENT = 10000; -- ---------------------------- -- Records of sys_dict_data @@ -163,10 +162,18 @@ INSERT IGNORE INTO `sys_dict_data` VALUES (118, 0, 'dictData.ne_info_status.0', INSERT IGNORE INTO `sys_dict_data` VALUES (119, 1, 'dictData.ne_info_status.1', '1', 'ne_info_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1709642164831, ''); INSERT IGNORE INTO `sys_dict_data` VALUES (120, 2, 'dictData.ne_info_status.2', '2', 'ne_info_status', '', 'warning', '1', 'supervisor', 1706620000000, '', 0, ''); INSERT IGNORE INTO `sys_dict_data` VALUES (121, 3, 'dictData.ne_info_status.3', '3', 'ne_info_status', '', '', '1', 'supervisor', 1706620000000, 'supervisor', 1709642169871, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (122, 0, 'ne_license_status.0', '0', 'ne_license_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (123, 1, 'ne_license_status.1', '1', 'ne_license_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (122, 0, 'ne_license_status.0', '0', 'ne_license_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (123, 1, 'ne_license_status.1', '1', 'ne_license_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (122, 0, 'dictData.ne_license_status.0', '0', 'ne_license_status', '', 'warning', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (123, 1, 'dictData.ne_license_status.1', '1', 'ne_license_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); INSERT IGNORE INTO `sys_dict_data` VALUES (124, 2, 'dictData.ne_host_authMode.2', '2', 'ne_host_authMode', '', '', '1', 'supervisor', 1706620000000, '', 0, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (125, 0, 'dictData.ne_version_status.0', '0', 'ne_version_status', '', 'default', '1', 'supervisor', 1706620000000, 'supervisor', 1712720196537, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (126, 1, 'dictData.ne_version_status.1', '1', 'ne_version_status', '', 'success', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (127, 1, 'dictData.ne_version_status.2', '2', 'ne_version_status', '', 'purple', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); +INSERT IGNORE INTO `sys_dict_data` VALUES (128, 1, 'dictData.ne_version_status.3', '3', 'ne_version_status', '', 'processing', '1', 'supervisor', 1706620000000, 'supervisor', 1712720201349, ''); + +-- 指定记录条件更新 +UPDATE `sys_dict_data` SET `tag_type` = 'error' WHERE `dict_code` = 118; +UPDATE `sys_dict_data` SET `tag_type` = 'processing' WHERE `dict_code` = 119; +UPDATE `sys_dict_data` SET `tag_type` = 'warning' WHERE `dict_code` = 120; +UPDATE `sys_dict_data` SET `tag_type` = '' WHERE `dict_code` = 121; SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/upgrade/upg_sys_dict_data1_i18n_zh.sql b/database/upgrade/upg_sys_dict_data1_i18n_zh.sql index 8eaece9a..05f0c2c9 100644 --- a/database/upgrade/upg_sys_dict_data1_i18n_zh.sql +++ b/database/upgrade/upg_sys_dict_data1_i18n_zh.sql @@ -17,643 +17,641 @@ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -INSERT IGNORE INTO `sys_dict_data` VALUES (1000, 1000, 'i18n', '中文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1001, 1001, 'hello', '你好', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1002, 1002, 'menu.system', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1003, 1003, 'menu.monitor', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1004, 1004, 'menu.tools', '工具', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1005, 1005, 'menu.config', '配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1006, 1006, 'menu.ueUser', '终端', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1007, 1007, 'menu.systemRemark', '系统管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1008, 1008, 'menu.monitorRemark', '系统监控目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1009, 1009, 'menu.toolsRemark', '系统工具目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1010, 1010, 'menu.configRemark', 'OMC配置管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1011, 1011, 'menu.ueUserRemark', '网元终端信息目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1012, 1012, 'menu.security.user', '用户管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1013, 1013, 'menu.security.role', '角色管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1014, 1014, 'menu.security.roleUser', '分配角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1015, 1015, 'menu.system.menu', '菜单管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1016, 1016, 'menu.security.dept', '部门管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1017, 1017, 'menu.security.post', '岗位管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1018, 1018, 'menu.system.dictType', '字典管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1019, 1019, 'menu.system.dictData', '字典数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1020, 1020, 'menu.system.paramSet', '参数设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1021, 1021, 'menu.system.systemLog', '系统日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1022, 1022, 'menu.system.systemInfo', '系统信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1023, 1023, 'menu.system.cacheInfo', '缓存信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1024, 1024, 'menu.system.cache', '缓存管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1025, 1025, 'menu.security.onlineUser', '在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1026, 1026, 'menu.system.job', '调度任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1027, 1027, 'menu.system.jobLog', '调度日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1028, 1028, 'menu.tools.help', '帮助文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1029, 1029, 'menu.log.operat', '操作日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1030, 1030, 'menu.log.login', '安全日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1031, 1031, 'menu.security.userRemark', '用户管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1032, 1032, 'menu.security.roleRemark', '角色管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1033, 1033, 'menu.security.roleUserRemark', '分配角色内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1034, 1034, 'menu.system.menuRemark', '菜单管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1035, 1035, 'menu.security.deptRemark', '部门管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1036, 1036, 'menu.security.postRemark', '岗位管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1037, 1037, 'menu.system.dictTypeRemark', '字典管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1038, 1038, 'menu.system.dictDataRemark', '字典数据内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1039, 1039, 'menu.system.paramSetRemark', '参数设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1040, 1040, 'menu.system.systemLogRemark', '系统日志目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1041, 1041, 'menu.system.systemInfoRemark', '系统信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1042, 1042, 'menu.system.cacheInfoRemark', '缓存信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1043, 1043, 'menu.system.cacheRemark', '缓存列表菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1044, 1044, 'menu.security.onlineUserRemark', '在线用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1045, 1045, 'menu.system.jobRemark', '调度任务菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1046, 1046, 'menu.system.jobLogRemark', '调度日志内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1047, 1047, 'menu.tools.helpRemark', '帮助文档菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1048, 1048, 'menu.log.operatRemark', '操作日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1049, 1049, 'menu.log.loginRemark', '登录日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1050, 1050, 'menu.common.query', '查询', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1051, 1051, 'menu.common.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1052, 1052, 'menu.common.edit', '修改', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1053, 1053, 'menu.common.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1054, 1054, 'menu.common.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1055, 1055, 'menu.common.import', '导入', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1056, 1056, 'menu.common.reset', '重置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1057, 1057, 'menu.common.unlock', '账户解锁', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1058, 1058, 'menu.forcedQuit.batch ', '批量强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1059, 1059, 'menu.forcedQuit.single', '单条强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1060, 1060, 'menu.ueUser.authUDM', 'UDM鉴权用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1061, 1061, 'menu.ueUser.subUDM', 'UDM签约用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1062, 1062, 'menu.ueUser.authUDMRemark', 'UDM鉴权用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1063, 1063, 'menu.ueUser.subUDMRemark', 'UDM签约用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1064, 1064, 'menu.config.neManage', '网元管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1065, 1065, 'menu.config.configNE', '参数配置Original', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1066, 1066, 'menu.config.neManageRemark', '网元管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1067, 1067, 'menu.config.configNERemark', '参数配置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1068, 1068, 'menu.config.backupManage', '备份管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1069, 1069, 'menu.config.softwareManage', '软件管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1070, 1070, 'menu.ueUser.onlineIMS', 'IMS在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1071, 1071, 'menu.ueUser.onlineUE', 'UE在线信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1072, 1072, 'menu.ueUser.base5G', '基站信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1073, 1073, 'menu.trace', '跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1074, 1074, 'menu.trace.task', '跟踪任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1075, 1075, 'menu.trace.analysis', '信令分析', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1076, 1076, 'menu.trace.pcap', '信令抓包', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1077, 1077, 'menu.fault', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1078, 1078, 'menu.config.backupManageRemark', '备份管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1079, 1079, 'menu.config.softwareManageRemark', '软件管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1080, 1080, 'menu.ueUser.onlineIMSRemark', 'IMS在线用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1081, 1081, 'menu.ueUser.onlineUERemark', 'UE在线信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1082, 1082, 'menu.ueUser.base5GRemark', '5G基站信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1083, 1083, 'menu.traceRemark', '跟踪管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1084, 1084, 'menu.trace.taskRemark', '跟踪任务菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1085, 1085, 'menu.trace.analysisRemark', '信令分析菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1086, 1086, 'menu.trace.pcapRemark', '信令抓包菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1087, 1087, 'menu.faultRemark', '故障管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1088, 1088, 'menu.fault.active', '活动告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1089, 1089, 'menu.log', '日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1090, 1090, 'menu.log.operatOld', '操作日志(旧)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1091, 1091, 'menu.log.mml', 'MML日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1092, 1092, 'menu.log.alarm', '告警日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1093, 1093, 'menu.log.securityOld', '安全日志(旧)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1094, 1094, 'menu.log.forwarding', '告警前转日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1095, 1095, 'menu.log.set', '日志设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1096, 1096, 'menu.monitor.sessionUser', '用户会话', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1097, 1097, 'menu.fault.history', '历史告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1098, 1098, 'menu.fault.set', '设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1099, 1099, 'menu.perf', '性能', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1100, 1100, 'menu.fault.activemRemark', '活动告警菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1101, 1101, 'menu.logRemark', '日志管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1102, 1102, 'menu.log.operatOldRemark', '操作日志旧layui菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1103, 1103, 'menu.log.mmlRemark', '操作MML日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1104, 1104, 'menu.log.alarmRemark', '告警日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1105, 1105, 'menu.log.securityOldRemark', '安全日志旧layui菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1106, 1106, 'menu.log.forwardingRemark', '告警前转日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1107, 1107, 'menu.log.setRemark', '日志设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1108, 1108, 'menu.monitor.sessionUserRemark', '用户会话旧layui菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1109, 1109, 'menu.fault.historyRemark', '历史告警菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1110, 1110, 'menu.fault.setRemark', '故障通用设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1111, 1111, 'menu.perfRemark', '性能目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1112, 1112, 'menu.perf.task', '任务管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1113, 1113, 'menu.perf.data', '性能数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1114, 1114, 'menu.perf.report', '性能报表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1115, 1115, 'menu.perf.threshold', '性能门限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1116, 1116, 'menu.perf.kpi', '黄金指标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1117, 1117, 'menu.perf.customTarget', '自定义指标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1118, 1118, 'menu.perf.set', '性能通用设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1119, 1119, 'menu.mml', 'MML', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1120, 1120, 'menu.mml.ne', '网元操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1121, 1121, 'menu.mml.udm', 'UDM操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1122, 1122, 'menu.mml.set', 'MML设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1123, 1123, 'menu.mml.omc', 'OMC操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1124, 1124, 'menu.perf.taskRemark', '任务管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1125, 1125, 'menu.perf.dataRemark', '性能数据菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1126, 1126, 'menu.perf.reportRemark', '性能报表菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1127, 1127, 'menu.perf.thresholdRemark', '性能门限菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1128, 1128, 'menu.perf.kpiRemark', '黄金指标菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1129, 1129, 'menu.perf.customTargetRemark', '自定义指标菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1130, 1130, 'menu.perf.setRemark', '性能通用设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1131, 1131, 'menu.mmlRemark', 'MML管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1132, 1132, 'menu.mml.neRemark', '网元操作菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1133, 1133, 'menu.mml.udmRemark', '网元UDM用户数据菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1134, 1134, 'menu.mml.setRemark', 'MML设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1135, 1135, 'menu.mml.omcRemark', 'OMC操作菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1136, 1136, 'menu.config.licenseManage', '许可证管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1137, 1137, 'menu.security', '安全', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1138, 1138, 'menu.system.systemSet', '系统设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1139, 1139, 'menu.system.systemResource', '系统资源', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1140, 1140, 'menu.config.configNEForm', '参数配置Form', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1141, 1141, 'menu.config.configNETree', '参数配置Tree', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1142, 1142, 'menu.config.configNETreeTable', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1143, 1143, 'menu.config.licenseManageRemark', '许可证管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1144, 1144, 'menu.securityRemark', '安全管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1145, 1145, 'menu.system.systemSetRemark', '系统设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1146, 1146, 'menu.system.systemResourceRemark', '系统资源 cpu io network菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1147, 1147, 'menu.config.configNEFormRemark', '参数配置Form菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1148, 1148, 'menu.config.configNETreeRemark', '参数配置Tree菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1149, 1149, 'menu.config.configNETreeTableRemark', '参数配置TreeTable菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1150, 1150, 'menu.noData', '没有可访问菜单数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1151, 1151, 'menu.errNameExists', '操作菜单【{name}】失败,菜单名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1152, 1152, 'menu.errPathExists', '操作菜单【{name}】失败,菜单路由地址已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1153, 1153, 'menu.errFramePath', '操作菜单【{name}】失败,非内部地址请以http(s)://开头', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1154, 1154, 'menu.errParentStatus', '上级菜单未启用!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1155, 1155, 'menu.errHasChildUse', '操作菜单【{name}】失败,存在使用子菜单数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1156, 1156, 'menu.errHasRoleUse', '操作菜单【{name}】失败,菜单已分配给角色数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1400, 1400, 'dictData.sex.un', '未选择', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1401, 1401, 'dictData.sex.male', '男', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1402, 1402, 'dictData.sex.female', '女', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1403, 1403, 'dictData.show', '显示', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1404, 1404, 'dictData.hide', '隐藏', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1405, 1405, 'dictData.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1406, 1406, 'dictData.disable', '停用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1407, 1407, 'dictData.yes', '是', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1408, 1408, 'dictData.no', '否', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1409, 1409, 'dictData.success', '成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1410, 1410, 'dictData.fail', '失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1411, 1411, 'dictData.jobStatus.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1412, 1412, 'dictData.jobStatus.pause', '暂停', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1413, 1413, 'dictData.jobGroup.Default', '默认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1414, 1414, 'dictData.jobGroup.System', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1415, 1415, 'dictData.operType.other', '其他', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1416, 1416, 'dictData.operType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1417, 1417, 'dictData.operType.edit', '修改', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1418, 1418, 'dictData.operType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1419, 1419, 'dictData.operType.auth', '授权', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1420, 1420, 'dictData.operType.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1421, 1421, 'dictData.operType.import', '导入', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1422, 1422, 'dictData.operType.forced quit', '强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1423, 1423, 'dictData.operType.clear', '清空', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1424, 1424, 'dictData.trace.interface', '接口跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1425, 1425, 'dictData.trace.device', '设备跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1426, 1426, 'dictData.trace.user', '用户跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1427, 1427, 'dictData.logType.download', '下载', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1428, 1428, 'dictData.logType.activation', '激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1429, 1429, 'dictData.logType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1430, 1430, 'dictData.logType.other', '其他', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1431, 1431, 'dictData.logType.back', '回退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1432, 1432, 'dictData.logType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1433, 1433, 'dictData.logType.distribute', '分配', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1434, 1434, 'dictData.logType.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1435, 1435, 'dictData.logType.query', '查询', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1436, 1436, 'dictData.logType.setup', '设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1437, 1437, 'dictData.logType.update', '更新', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1438, 1438, 'dictData.logType.upload', '上传', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1439, 1439, 'dictData.logType.view', '查看', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1440, 1440, 'dictData.logType.login', '登录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1441, 1441, 'dictData.logType.logout', '登出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1442, 1442, 'dictData.securityLogType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1443, 1443, 'dictData.securityLogType.update', '更新', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1444, 1444, 'dictData.securityLogType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1445, 1445, 'dictData.securityLogType.lock', '锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1446, 1446, 'dictData.securityLogType.unlock', '解锁', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1447, 1447, 'dictData.securityLogType.reset', '重置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1448, 1448, 'dictData.securityLogType.deactivate', '停用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1449, 1449, 'dictData.jobSaveLog.no', '不记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1450, 1450, 'dictData.jobSaveLog.yes', '记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1451, 1451, 'dictData.neVersionStatus.upload', '已上传', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1452, 1452, 'dictData.neVersionStatus.inactive', '未激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1453, 1453, 'dictData.neVersionStatus.active', '已激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1454, 1454, 'dictData.alarmStatus.history', '历史告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1455, 1455, 'dictData.alarmStatus.active', '活动告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1456, 1456, 'dictData.export.code', '数据代码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1457, 1457, 'dictData.export.sort', '数据排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1458, 1458, 'dictData.export.label', '数据标签', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1459, 1459, 'dictData.export.value', '数据键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1460, 1460, 'dictData.export.type', '数据排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1461, 1461, 'dictData.export.status', '数据状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1462, 1462, 'dictData.datascope.all', '全部数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1463, 1463, 'dictData.datascope.custom', '自定数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1464, 1464, 'dictData.datascope.dept', '部门数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1465, 1465, 'dictData.datascope.deptAndChid', '部门及以下数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1466, 1466, 'dictData.datascope.self', '仅本人数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1467, 1467, 'dictData.noData', '没有可访问字典编码数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1468, 1468, 'dictData.errLabelExists', '操作数据【{name}】失败,该字典类型下标签名已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1500, 1500, 'dictType.sys_user_sex', '用户性别', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1501, 1501, 'dictType.sys_show_hide', '菜单状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1502, 1502, 'dictType.sys_normal_disable', '系统开关', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1503, 1503, 'dictType.sys_job_status', '任务状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1504, 1504, 'dictType.sys_job_group', '任务分组', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1505, 1505, 'dictType.sys_yes_no', '系统是否', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1506, 1506, 'dictType.sys_oper_type', '操作类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1507, 1507, 'dictType.sys_common_status', '系统状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1508, 1508, 'dictType.trace_type', '跟踪类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1509, 1509, 'dictType.operation_log_type', '操作日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1510, 1510, 'dictType.alarm_status', '告警日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1511, 1511, 'dictType.security_log_type', '安全日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1512, 1512, 'dictType.ne_version_status', '网元软件版本状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1513, 1513, 'dictType.i18n_en', '多语言-英文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1514, 1514, 'dictType.i18n_zh', '多语言-中文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1515, 1515, 'dictType.sys_user_sex_remark', '用户性别列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1516, 1516, 'dictType.sys_show_hide_remark', '菜单状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1517, 1517, 'dictType.sys_normal_disable_remark', '系统开关列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1518, 1518, 'dictType.sys_job_status_remark', '任务状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1519, 1519, 'dictType.sys_job_group_remark', '任务分组列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1520, 1520, 'dictType.sys_yes_no_remark', '系统是否列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1521, 1521, 'dictType.sys_oper_type_remark', '操作类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1522, 1522, 'dictType.sys_common_status_remark', '登录状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1523, 1523, 'dictType.trace_type_remark', '跟踪类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1524, 1524, 'dictType.operation_log_type_remark', '操作日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1525, 1525, 'dictType.alarm_status_remark', 'alarm_status', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1526, 1526, 'dictType.security_log_type_remark', '安全日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1527, 1527, 'dictType.ne_version_status_remark', '网元软件版本状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1528, 1528, 'dictType.i18n_en_remark', 'Internationalization - English', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1529, 1529, 'dictType.i18n_zh_remark', 'Internationalization - Chinese', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1530, 1530, 'dictType.export.id', '字典编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1531, 1531, 'dictType.export.name', '字典名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1532, 1532, 'dictType.export.type', '字典类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1533, 1533, 'dictType.export.status', '字典状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1534, 1534, 'dictType.sys_role_datascope', '系统角色数据范围', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1535, 1535, 'dictType.sys_role_datascope_remark', '系统角色数据范围映射', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1536, 1536, 'dictType.noData', '没有可访问字典类型数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1537, 1537, 'dictType.errNameExists', '操作字典【{name}】失败,字典名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1538, 1538, 'dictType.errTypeExists', '操作字典【{name}】失败,字典类型已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1600, 1600, 'dept.root', '系统维护部', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1601, 1601, 'dept.root.item1', '运维一部', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1602, 1602, 'dept.noData', '没有可访问部门数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1603, 1603, 'dept.errParentDelFlag', '上级部门【{name}】已删除,不允许新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1604, 1604, 'dept.errParentStatus', '上级部门【{name}】停用,不允许新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1605, 1605, 'dept.errNameExists', '操作部门【{name}】失败,部门名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1606, 1606, 'dept.errParentID', '操作部门【{name}】失败,上级部门不能是自己', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1607, 1607, 'dept.errHasChildUse', '操作失败,该部门包含未停用的子部门数量:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1608, 1608, 'dept.errHasUserUse', '不允许删除,部门已分配给用户数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1630, 1630, 'config.sys.user.initPassword', '用户管理-账号初始密码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1631, 1631, 'config.sys.account.captchaEnabled', '账号自助-验证码开关', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1632, 1632, 'config.sys.account.registerUser', '账号自助-是否开启用户注册功能', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1633, 1633, 'config.sys.user.maxRetryCount', '用户管理-密码最大错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1634, 1634, 'config.sys.user.lockTime', '用户管理-密码锁定时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1635, 1635, 'config.monitor.sysResource.storeDays', '监控-系统资源-数据保留时长', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1636, 1636, 'config.sys.logo.type', '系统设置-LOGO类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1637, 1637, 'config.sys.logo.filePathIcon', '系统设置-LOGO文件icon', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1638, 1638, 'config.sys.logo.filePathBrand', '系统设置-LOGO文件brand', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1639, 1639, 'config.sys.loginBackground', '系统设置-登录界面背景', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1640, 1640, 'config.sys.title', '系统设置-系统名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1641, 1641, 'config.sys.copyright', '系统设置-版权声明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1642, 1642, 'config.sys.user.initPasswordRemark', '导入用户初始化密码 123456', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1643, 1643, 'config.sys.account.captchaEnabledRemark', '是否开启验证码功能(true开启,false关闭)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1644, 1644, 'config.sys.account.registerUserRemark', '是否开启注册用户功能(true开启,false关闭)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1645, 1645, 'config.sys.user.maxRetryCountRemark', '密码最大错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1646, 1646, 'config.sys.user.lockTimeRemark', '密码锁定时间,单位分钟(默认10分钟)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1647, 1647, 'config.monitor.sysResource.storeDaysRemark', '监控-系统资源-数据保留时长,单位天。根据当前日期,删除超过保留时长的日期数据信息。', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1648, 1648, 'config.sys.logo.typeRemark', '全图:brand\r\n小图:icon', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1649, 1649, 'config.sys.logo.filePathIconRemark', '文件支持网络地址图片和内部上传的文件路径', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1650, 1650, 'config.sys.logo.filePathBrandRemark', '文件支持网络地址图片和内部上传的文件路径', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1651, 1651, 'config.sys.loginBackgroundRemark', '文件支持网络地址图片和内部上传的文件路径,默认背景用#号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1652, 1652, 'config.sys.titleRemark', '系统名称长度限制11位字符串', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1653, 1653, 'config.sys.copyrightRemark', '底脚固定条,左侧放置版权声明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1654, 1654, 'config..export.id', '参数编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1655, 1655, 'config..export.name', '参数名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1656, 1656, 'config..export.key', '参数键名', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1657, 1657, 'config..export.value', '参数键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1658, 1658, 'config..export.type', '系统内置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1659, 1659, 'config..export.remark', '参数说明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1000, 1000, 'i18n', '中文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1001, 1001, 'hello', '你好', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1002, 1002, 'menu.system', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1003, 1003, 'menu.monitor', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1004, 1004, 'menu.tools', '工具', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1005, 1005, 'menu.config', '配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1006, 1006, 'menu.ueUser', '终端', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1007, 1007, 'menu.systemRemark', '系统管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1008, 1008, 'menu.monitorRemark', '系统监控目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1009, 1009, 'menu.toolsRemark', '系统工具目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1010, 1010, 'menu.configRemark', 'OMC配置管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1011, 1011, 'menu.ueUserRemark', '网元终端信息目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1012, 1012, 'menu.security.user', '用户管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1013, 1013, 'menu.security.role', '角色管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1014, 1014, 'menu.security.roleUser', '分配角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1015, 1015, 'menu.system.menu', '菜单管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1016, 1016, 'menu.security.dept', '部门管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1017, 1017, 'menu.security.post', '岗位管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1018, 1018, 'menu.system.dictType', '字典管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1019, 1019, 'menu.system.dictData', '字典数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1020, 1020, 'menu.system.paramSet', '参数设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1021, 1021, 'menu.system.systemLog', '系统日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1022, 1022, 'menu.system.systemInfo', '系统信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1023, 1023, 'menu.system.cacheInfo', '缓存信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1024, 1024, 'menu.system.cache', '缓存管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1025, 1025, 'menu.security.onlineUser', '在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1026, 1026, 'menu.system.job', '调度任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1027, 1027, 'menu.system.jobLog', '调度日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1028, 1028, 'menu.tools.help', '帮助文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1029, 1029, 'menu.log.operat', '操作日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1030, 1030, 'menu.log.login', '安全日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1031, 1031, 'menu.security.userRemark', '用户管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1032, 1032, 'menu.security.roleRemark', '角色管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1033, 1033, 'menu.security.roleUserRemark', '分配角色内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1034, 1034, 'menu.system.menuRemark', '菜单管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1035, 1035, 'menu.security.deptRemark', '部门管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1036, 1036, 'menu.security.postRemark', '岗位管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1037, 1037, 'menu.system.dictTypeRemark', '字典管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1038, 1038, 'menu.system.dictDataRemark', '字典数据内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1039, 1039, 'menu.system.paramSetRemark', '参数设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1040, 1040, 'menu.system.systemLogRemark', '系统日志目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1041, 1041, 'menu.system.systemInfoRemark', '系统信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1042, 1042, 'menu.system.cacheInfoRemark', '缓存信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1043, 1043, 'menu.system.cacheRemark', '缓存列表菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1044, 1044, 'menu.security.onlineUserRemark', '在线用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1045, 1045, 'menu.system.jobRemark', '调度任务菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1046, 1046, 'menu.system.jobLogRemark', '调度日志内嵌隐藏菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1047, 1047, 'menu.tools.helpRemark', '帮助文档菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1048, 1048, 'menu.log.operatRemark', '操作日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1049, 1049, 'menu.log.loginRemark', '登录日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1050, 1050, 'menu.common.query', '查询', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1051, 1051, 'menu.common.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1052, 1052, 'menu.common.edit', '修改', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1053, 1053, 'menu.common.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1054, 1054, 'menu.common.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1055, 1055, 'menu.common.import', '导入', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1056, 1056, 'menu.common.reset', '重置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1057, 1057, 'menu.common.unlock', '账户解锁', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1058, 1058, 'menu.forcedQuit.batch ', '批量强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1059, 1059, 'menu.forcedQuit.single', '单条强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1060, 1060, 'menu.ueUser.authUDM', 'UDM鉴权用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1061, 1061, 'menu.ueUser.subUDM', 'UDM签约用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1062, 1062, 'menu.ueUser.authUDMRemark', 'UDM鉴权用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1063, 1063, 'menu.ueUser.subUDMRemark', 'UDM签约用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1064, 1064, 'menu.config.neManage', '网元管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1065, 1065, 'menu.config.configNE', '参数配置Original', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1066, 1066, 'menu.config.neManageRemark', '网元管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1067, 1067, 'menu.config.configNERemark', '参数配置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1068, 1068, 'menu.config.backupManage', '备份管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1069, 1069, 'menu.config.softwareManage', '软件管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1070, 1070, 'menu.ueUser.onlineIMS', 'IMS在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1071, 1071, 'menu.ueUser.onlineUE', 'UE在线信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1072, 1072, 'menu.ueUser.base5G', '基站信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1073, 1073, 'menu.trace', '跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1074, 1074, 'menu.trace.task', '跟踪任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1075, 1075, 'menu.trace.analysis', '信令分析', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1076, 1076, 'menu.trace.pcap', '信令抓包', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1077, 1077, 'menu.fault', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1078, 1078, 'menu.config.backupManageRemark', '备份管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1079, 1079, 'menu.config.softwareManageRemark', '软件管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1080, 1080, 'menu.ueUser.onlineIMSRemark', 'IMS在线用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1081, 1081, 'menu.ueUser.onlineUERemark', 'UE在线信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1082, 1082, 'menu.ueUser.base5GRemark', '5G基站信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1083, 1083, 'menu.traceRemark', '跟踪管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1084, 1084, 'menu.trace.taskRemark', '跟踪任务菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1085, 1085, 'menu.trace.analysisRemark', '信令分析菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1086, 1086, 'menu.trace.pcapRemark', '信令抓包菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1087, 1087, 'menu.faultRemark', '故障管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1088, 1088, 'menu.fault.active', '活动告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1089, 1089, 'menu.log', '日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1091, 1091, 'menu.log.mml', 'MML日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1092, 1092, 'menu.log.alarm', '告警日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1094, 1094, 'menu.log.forwarding', '告警前转日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1095, 1095, 'menu.log.set', '日志设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1097, 1097, 'menu.fault.history', '历史告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1098, 1098, 'menu.fault.set', '设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1099, 1099, 'menu.perf', '性能', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1100, 1100, 'menu.fault.activemRemark', '活动告警菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1101, 1101, 'menu.logRemark', '日志管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1103, 1103, 'menu.log.mmlRemark', '操作MML日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1104, 1104, 'menu.log.alarmRemark', '告警日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1106, 1106, 'menu.log.forwardingRemark', '告警前转日志菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1107, 1107, 'menu.log.setRemark', '日志设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1109, 1109, 'menu.fault.historyRemark', '历史告警菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1110, 1110, 'menu.fault.setRemark', '故障通用设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1111, 1111, 'menu.perfRemark', '性能目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1112, 1112, 'menu.perf.task', '任务管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1113, 1113, 'menu.perf.data', '性能数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1114, 1114, 'menu.perf.report', '性能报表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1115, 1115, 'menu.perf.threshold', '性能门限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1116, 1116, 'menu.perf.kpi', '黄金指标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1117, 1117, 'menu.perf.customTarget', '自定义指标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1118, 1118, 'menu.perf.set', '性能通用设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1119, 1119, 'menu.mml', 'MML', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1120, 1120, 'menu.mml.ne', '网元操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1121, 1121, 'menu.mml.udm', 'UDM操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1122, 1122, 'menu.mml.set', 'MML设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1123, 1123, 'menu.mml.omc', 'OMC操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1124, 1124, 'menu.perf.taskRemark', '任务管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1125, 1125, 'menu.perf.dataRemark', '性能数据菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1126, 1126, 'menu.perf.reportRemark', '性能报表菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1127, 1127, 'menu.perf.thresholdRemark', '性能门限菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1128, 1128, 'menu.perf.kpiRemark', '黄金指标菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1129, 1129, 'menu.perf.customTargetRemark', '自定义指标菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1130, 1130, 'menu.perf.setRemark', '性能通用设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1131, 1131, 'menu.mmlRemark', 'MML管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1132, 1132, 'menu.mml.neRemark', '网元操作菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1133, 1133, 'menu.mml.udmRemark', '网元UDM用户数据菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1134, 1134, 'menu.mml.setRemark', 'MML设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1135, 1135, 'menu.mml.omcRemark', 'OMC操作菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1136, 1136, 'menu.config.licenseManage', '许可证管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1137, 1137, 'menu.security', '安全', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1138, 1138, 'menu.system.systemSet', '系统设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1139, 1139, 'menu.system.systemResource', '系统资源', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1140, 1140, 'menu.config.configNEForm', '参数配置Form', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1141, 1141, 'menu.config.configNETree', '参数配置Tree', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1142, 1142, 'menu.config.configNETreeTable', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1143, 1143, 'menu.config.licenseManageRemark', '许可证管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1144, 1144, 'menu.securityRemark', '安全管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1145, 1145, 'menu.system.systemSetRemark', '系统设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1146, 1146, 'menu.system.systemResourceRemark', '系统资源 cpu io network菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1147, 1147, 'menu.config.configNEFormRemark', '参数配置Form菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1148, 1148, 'menu.config.configNETreeRemark', '参数配置Tree菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1149, 1149, 'menu.config.configNETreeTableRemark', '参数配置TreeTable菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1150, 1150, 'menu.noData', '没有可访问菜单数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1151, 1151, 'menu.errNameExists', '操作菜单【{name}】失败,菜单名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1152, 1152, 'menu.errPathExists', '操作菜单【{name}】失败,菜单路由地址已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1153, 1153, 'menu.errFramePath', '操作菜单【{name}】失败,非内部地址请以http(s)://开头', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1154, 1154, 'menu.errParentStatus', '上级菜单未启用!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1155, 1155, 'menu.errHasChildUse', '操作菜单【{name}】失败,存在使用子菜单数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1156, 1156, 'menu.errHasRoleUse', '操作菜单【{name}】失败,菜单已分配给角色数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1400, 1400, 'dictData.sex.un', '未选择', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1401, 1401, 'dictData.sex.male', '男', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1402, 1402, 'dictData.sex.female', '女', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1403, 1403, 'dictData.show', '显示', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1404, 1404, 'dictData.hide', '隐藏', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1405, 1405, 'dictData.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1406, 1406, 'dictData.disable', '停用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1407, 1407, 'dictData.yes', '是', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1408, 1408, 'dictData.no', '否', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1409, 1409, 'dictData.success', '成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1410, 1410, 'dictData.fail', '失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1411, 1411, 'dictData.jobStatus.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1412, 1412, 'dictData.jobStatus.pause', '暂停', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1413, 1413, 'dictData.jobGroup.Default', '默认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1414, 1414, 'dictData.jobGroup.System', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1415, 1415, 'dictData.operType.other', '其他', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1416, 1416, 'dictData.operType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1417, 1417, 'dictData.operType.edit', '修改', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1418, 1418, 'dictData.operType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1419, 1419, 'dictData.operType.auth', '授权', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1420, 1420, 'dictData.operType.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1421, 1421, 'dictData.operType.import', '导入', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1422, 1422, 'dictData.operType.forced quit', '强退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1423, 1423, 'dictData.operType.clear', '清空', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1424, 1424, 'dictData.trace.interface', '接口跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1425, 1425, 'dictData.trace.device', '设备跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1426, 1426, 'dictData.trace.user', '用户跟踪', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1427, 1427, 'dictData.logType.download', '下载', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1428, 1428, 'dictData.logType.activation', '激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1429, 1429, 'dictData.logType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1430, 1430, 'dictData.logType.other', '其他', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1431, 1431, 'dictData.logType.back', '回退', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1432, 1432, 'dictData.logType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1433, 1433, 'dictData.logType.distribute', '分配', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1434, 1434, 'dictData.logType.export', '导出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1435, 1435, 'dictData.logType.query', '查询', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1436, 1436, 'dictData.logType.setup', '设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1437, 1437, 'dictData.logType.update', '更新', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1438, 1438, 'dictData.logType.upload', '上传', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1439, 1439, 'dictData.logType.view', '查看', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1440, 1440, 'dictData.logType.login', '登录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1441, 1441, 'dictData.logType.logout', '登出', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1442, 1442, 'dictData.securityLogType.add', '新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1443, 1443, 'dictData.securityLogType.update', '更新', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1444, 1444, 'dictData.securityLogType.delete', '删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1445, 1445, 'dictData.securityLogType.lock', '锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1446, 1446, 'dictData.securityLogType.unlock', '解锁', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1447, 1447, 'dictData.securityLogType.reset', '重置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1448, 1448, 'dictData.securityLogType.deactivate', '停用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1449, 1449, 'dictData.jobSaveLog.no', '不记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1450, 1450, 'dictData.jobSaveLog.yes', '记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1451, 1451, 'dictData.neVersionStatus.upload', '已上传', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1452, 1452, 'dictData.neVersionStatus.inactive', '未激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1453, 1453, 'dictData.neVersionStatus.active', '已激活', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1454, 1454, 'dictData.alarmStatus.history', '历史告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1455, 1455, 'dictData.alarmStatus.active', '活动告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1456, 1456, 'dictData.export.code', '数据代码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1457, 1457, 'dictData.export.sort', '数据排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1458, 1458, 'dictData.export.label', '数据标签', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1459, 1459, 'dictData.export.value', '数据键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1460, 1460, 'dictData.export.type', '数据排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1461, 1461, 'dictData.export.status', '数据状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1462, 1462, 'dictData.datascope.all', '全部数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1463, 1463, 'dictData.datascope.custom', '自定数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1464, 1464, 'dictData.datascope.dept', '部门数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1465, 1465, 'dictData.datascope.deptAndChid', '部门及以下数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1466, 1466, 'dictData.datascope.self', '仅本人数据权限', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1467, 1467, 'dictData.noData', '没有可访问字典编码数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1468, 1468, 'dictData.errLabelExists', '操作数据【{name}】失败,该字典类型下标签名已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1500, 1500, 'dictType.sys_user_sex', '用户性别', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1501, 1501, 'dictType.sys_show_hide', '菜单状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1502, 1502, 'dictType.sys_normal_disable', '系统开关', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1503, 1503, 'dictType.sys_job_status', '任务状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1504, 1504, 'dictType.sys_job_group', '任务分组', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1505, 1505, 'dictType.sys_yes_no', '系统是否', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1506, 1506, 'dictType.sys_oper_type', '操作类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1507, 1507, 'dictType.sys_common_status', '系统状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1508, 1508, 'dictType.trace_type', '跟踪类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1509, 1509, 'dictType.operation_log_type', '操作日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1510, 1510, 'dictType.alarm_status', '告警日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1511, 1511, 'dictType.security_log_type', '安全日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1512, 1512, 'dictType.ne_version_status', '网元软件版本状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1513, 1513, 'dictType.i18n_en', '多语言-英文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1514, 1514, 'dictType.i18n_zh', '多语言-中文', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1515, 1515, 'dictType.sys_user_sex_remark', '用户性别列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1516, 1516, 'dictType.sys_show_hide_remark', '菜单状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1517, 1517, 'dictType.sys_normal_disable_remark', '系统开关列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1518, 1518, 'dictType.sys_job_status_remark', '任务状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1519, 1519, 'dictType.sys_job_group_remark', '任务分组列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1520, 1520, 'dictType.sys_yes_no_remark', '系统是否列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1521, 1521, 'dictType.sys_oper_type_remark', '操作类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1522, 1522, 'dictType.sys_common_status_remark', '登录状态列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1523, 1523, 'dictType.trace_type_remark', '跟踪类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1524, 1524, 'dictType.operation_log_type_remark', '操作日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1525, 1525, 'dictType.alarm_status_remark', 'alarm_status', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1526, 1526, 'dictType.security_log_type_remark', '安全日志类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1527, 1527, 'dictType.ne_version_status_remark', '网元软件版本状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1528, 1528, 'dictType.i18n_en_remark', 'Internationalization - English', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1529, 1529, 'dictType.i18n_zh_remark', 'Internationalization - Chinese', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1530, 1530, 'dictType.export.id', '字典编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1531, 1531, 'dictType.export.name', '字典名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1532, 1532, 'dictType.export.type', '字典类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1533, 1533, 'dictType.export.status', '字典状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1534, 1534, 'dictType.sys_role_datascope', '系统角色数据范围', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1535, 1535, 'dictType.sys_role_datascope_remark', '系统角色数据范围映射', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1536, 1536, 'dictType.noData', '没有可访问字典类型数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1537, 1537, 'dictType.errNameExists', '操作字典【{name}】失败,字典名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1538, 1538, 'dictType.errTypeExists', '操作字典【{name}】失败,字典类型已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1600, 1600, 'dept.root', '系统维护部', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1601, 1601, 'dept.root.item1', '运维一部', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1602, 1602, 'dept.noData', '没有可访问部门数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1603, 1603, 'dept.errParentDelFlag', '上级部门【{name}】已删除,不允许新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1604, 1604, 'dept.errParentStatus', '上级部门【{name}】停用,不允许新增', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1605, 1605, 'dept.errNameExists', '操作部门【{name}】失败,部门名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1606, 1606, 'dept.errParentID', '操作部门【{name}】失败,上级部门不能是自己', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1607, 1607, 'dept.errHasChildUse', '操作失败,该部门包含未停用的子部门数量:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1608, 1608, 'dept.errHasUserUse', '不允许删除,部门已分配给用户数:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1630, 1630, 'config.sys.user.initPassword', '用户管理-账号初始密码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1631, 1631, 'config.sys.account.captchaEnabled', '账号自助-验证码开关', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1632, 1632, 'config.sys.account.registerUser', '账号自助-是否开启用户注册功能', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1633, 1633, 'config.sys.user.maxRetryCount', '用户管理-密码最大错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1634, 1634, 'config.sys.user.lockTime', '用户管理-密码锁定时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1635, 1635, 'config.monitor.sysResource.storeDays', '监控-系统资源-数据保留时长', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1636, 1636, 'config.sys.logo.type', '系统设置-LOGO类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1637, 1637, 'config.sys.logo.filePathIcon', '系统设置-LOGO文件icon', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1638, 1638, 'config.sys.logo.filePathBrand', '系统设置-LOGO文件brand', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1639, 1639, 'config.sys.loginBackground', '系统设置-登录界面背景', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1640, 1640, 'config.sys.title', '系统设置-系统名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1641, 1641, 'config.sys.copyright', '系统设置-版权声明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1642, 1642, 'config.sys.user.initPasswordRemark', '导入用户初始化密码 123456', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1643, 1643, 'config.sys.account.captchaEnabledRemark', '是否开启验证码功能(true开启,false关闭)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1644, 1644, 'config.sys.account.registerUserRemark', '是否开启注册用户功能(true开启,false关闭)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1645, 1645, 'config.sys.user.maxRetryCountRemark', '密码最大错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1646, 1646, 'config.sys.user.lockTimeRemark', '密码锁定时间,单位分钟(默认10分钟)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1647, 1647, 'config.monitor.sysResource.storeDaysRemark', '监控-系统资源-数据保留时长,单位天。根据当前日期,删除超过保留时长的日期数据信息。', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1648, 1648, 'config.sys.logo.typeRemark', '全图:brand\r\n小图:icon', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1649, 1649, 'config.sys.logo.filePathIconRemark', '文件支持网络地址图片和内部上传的文件路径', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1650, 1650, 'config.sys.logo.filePathBrandRemark', '文件支持网络地址图片和内部上传的文件路径', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1651, 1651, 'config.sys.loginBackgroundRemark', '文件支持网络地址图片和内部上传的文件路径,默认背景用#号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1652, 1652, 'config.sys.titleRemark', '系统名称长度限制11位字符串', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1653, 1653, 'config.sys.copyrightRemark', '底脚固定条,左侧放置版权声明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1654, 1654, 'config..export.id', '参数编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1655, 1655, 'config..export.name', '参数名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1656, 1656, 'config..export.key', '参数键名', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1657, 1657, 'config..export.value', '参数键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1658, 1658, 'config..export.type', '系统内置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1659, 1659, 'config..export.remark', '参数说明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrandEMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2023 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1662, 1662, 'config.noData', '没有可访问参数配置数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1663, 1663, 'config.errKey', '无效 key', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1664, 1664, 'config.errValueEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1665, 1665, 'config.errKeyExists', '操作参数配置【{name}】失败,参数键名已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1666, 1666, 'config.errDelete', '删除参数配置信息失败!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1667, 1667, 'config.errType', '操作含有内置参数,禁止删除!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1700, 1700, 'job.monitor_sys_resource', '监控-系统资源', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1701, 1701, 'job.monitor_sys_resource_remark', '系统资源CPU/IO/Netword收集\r\ninterval单位分钟,平均分钟资源情况\r\n注:请根据cron表达式的时间单位分钟,传入参数interva值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1702, 1702, 'job.delExpiredNeBackup', '删除过期网元备份文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1703, 1703, 'job.delExpiredNeBackupRemark', '删除过期网元etc备份文件, 传入参数表示保留{duration}天的备份文件, 默认60天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1704, 1704, 'job.deleteExpiredAlarmRecord', '删除过期历史告警记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1705, 1705, 'job.deleteExpiredAlarmRecordRemark', '删除过期历史告警记录,传入参数表示保留{duration}天的历史告警记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1706, 1706, 'job.deleteExpiredKpiRecord', '删除过期黄金指标记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1707, 1707, 'job.deleteExpiredKpiRecordRemark', '黄金指标记录保留{duration}天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1708, 1708, 'job.backupEtcFromNE', '网元配置自动备份任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1709, 1709, 'job.backupEtcFromNERemark', '自动备份网元etc目录下的配置文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1710, 1710, 'job.export.jobID', '任务编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1711, 1711, 'job.export.jobName', '任务名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1712, 1712, 'job.export.jobGroupName', '任务组名', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1713, 1713, 'job.export.invokeTarget', '调用目标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1714, 1714, 'job.export.targetParams', '传入参数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1715, 1715, 'job.export.cronExpression', 'cron表达式', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1716, 1716, 'job.export.status', '状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1717, 1717, 'job.export.remark', '备注说明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1718, 1718, 'job.export.jobLogID', '任务日志编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1719, 1719, 'job.export.jobLogStatus', '任务日志状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1720, 1720, 'job.export.jobLogTime', '任务日志时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1721, 1721, 'job.noData', '没有可访问调度任务数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1722, 1722, 'job.errTargetParams', '操作调度任务【{name}】失败,任务传入参数json字符串不正确', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1723, 1723, 'job.errCronExpression', '操作调度任务【{name}】失败,Cron表达式不正确', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1724, 1724, 'job.errJobExists', '调度任务新增【{name}】失败,同任务组内有相同任务名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1725, 1725, 'job.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1750, 1750, 'role.admin', '超级管理员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1751, 1751, 'role.adminAssign', '管理人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1752, 1752, 'role.operator', '运维人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1753, 1753, 'role.monitor', '监控人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1754, 1754, 'role.vistor', '普通用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1755, 1755, 'role.adminRemark', '超级管理员,无法修改删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1756, 1756, 'role.adminAssignRemark', '管理人员 可以对设备进行任何操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1757, 1757, 'role.operatorRemark', '运维人员 可以从设备读取数据,并对设备进行配置,但是不能对设备进行软件升级操作。', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1758, 1758, 'role.monitorRemark', '监控人员 只能从设备读取数据,而不能对设备进行任何设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1759, 1759, 'role.vistorRemark', '普通用户 只可看系统相关信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1760, 1760, 'role.export.id', '角色编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1761, 1761, 'role.export.name', '角色名称 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1762, 1762, 'role.export.key', '角色键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1763, 1763, 'role.export.sort', '角色顺序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1764, 1764, 'role.export.dataScope', '角色数据范围', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1765, 1765, 'role.export.status', '角色状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1766, 1766, 'role.noData', '没有可访问角色数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1767, 1767, 'role.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1768, 1768, 'role.errNameExists', '操作角色【{name}】失败,角色名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1769, 1769, 'role.errKeyExists', '操作角色【{name}】失败,角色键值已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1800, 1800, 'post.admin', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1801, 1801, 'post.operator', '管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1802, 1802, 'post.monitor', '运维', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1803, 1803, 'post.visitor', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1804, 1804, 'post.export.id', '岗位编号 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1805, 1805, 'post.export.code', '岗位编码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1806, 1806, 'post.export.name', '岗位名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1807, 1807, 'post.export.sort', '岗位排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1808, 1808, 'post.export.status', '岗位状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1809, 1809, 'post.noData', '没有可访问岗位数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1810, 1810, 'post.errNameExists', '操作岗位【{name}】失败,岗位名称已存在已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1811, 1811, 'post.errCodeExists', '操作角色【{name}】失败,角色键值已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1830, 1830, 'user.export.id', '用户编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1831, 1831, 'user.export.name', '登录账号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1832, 1832, 'user.export.nick', '用户昵称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1833, 1833, 'user.export.email', '电子邮箱', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1834, 1834, 'user.export.phone', '手机号码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1835, 1835, 'user.export.sex', '用户性别', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1836, 1836, 'user.export.status', '用户状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1837, 1837, 'user.export.deptID', '部门编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1838, 1838, 'user.export.deptName', '部门名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1839, 1839, 'user.export.deptLeader', '部门负责人', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1840, 1840, 'user.export.loginIP', '用户登录IP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1841, 1841, 'user.export.loginDate', '用户登录时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1842, 1842, 'user.noData', '没有可访问用户数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1843, 1843, 'user.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1844, 1844, 'user.errPasswdOld', '修改密码失败,旧密码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1845, 1845, 'user.errPasswdEqOld', '新密码不能与旧密码相同', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1846, 1846, 'user.errPasswd', '登录密码至少包含大小写字母、数字、特殊符号,且不少于6位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1847, 1847, 'user.errEmailFormat', '操作用户【{name}】失败,邮箱格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1848, 1848, 'user.errEmailExists', '操作用户【{name}】失败,邮箱已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1849, 1849, 'user.errPhoneFormat', '操作用户【{name}】失败,手机号码格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1850, 1850, 'user.errPhoneExists', '操作用户【{name}】失败,手机号码已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1851, 1851, 'user.errNameExists', '操作用户【{name}】失败,登录账号已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1852, 1852, 'user.import.mustItem', '表格中必填列表项,{text}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1853, 1853, 'user.import.phoneExist', '用户编号:{id} 手机号码 {phone} 已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1854, 1854, 'user.import.phoneFormat', '用户编号:{id} 手机号码 {phone} 格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1855, 1855, 'user.import.emailExist', '用户编号:{id} 用户邮箱:{email} 已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1856, 1856, 'user.import.emailFormat', '用户编号:{id} 用户邮箱:{email} 格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1857, 1857, 'user.import.success', '用户编号:{id} 登录名称:{name} 导入成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1858, 1858, 'user.import.fail', '用户编号:{id} 登录名称:{name} 导入失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1859, 1859, 'user.import.successUpdate', '用户编号:{id} 登录名称:{name} 更新成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1860, 1860, 'user.import.failUpdate', '用户编号:{id} 登录名称:{name} 更新失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1861, 1861, 'user.import.failTip', '很抱歉,导入失败!共 {num} 条数据格式不正确,错误如下:', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1862, 1862, 'user.import.successTip', '恭喜您,数据已全部导入成功!共 {num} 条,数据如下:', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1900, 1900, 'app.common.err403', '无权访问 {method} {requestURI}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1901, 1901, 'app.common.err401', '无效身份授权', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1902, 1902, 'app.common.err400', '参数错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1903, 1903, 'app.common.exportEmpty', '导出数据记录为空', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1904, 1904, 'app.common.errOperateAdmin', '不允许操作内置用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1905, 1905, 'app.common.errOperateRole', '不允许操作内置角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1906, 1906, 'app.common.deleteSuccess', '删除成功:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1907, 1907, 'app.common.loginSuccess', '登录成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1908, 1908, 'app.common.logoutSuccess', '注销成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1909, 1909, 'app.common.errUnlock', '该用户未被锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1910, 1910, 'app.common.noLoginUser', '登录用户信息无效', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1911, 1911, 'app.common.rateLimitTip', '访问过于频繁,请稍候再试', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1912, 1912, 'log.operate.export.id', '操作编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1913, 1913, 'log.operate.export.title', '模块名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1914, 1914, 'log.operate.export.businessType', '业务类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1915, 1915, 'log.operate.export.method', '操作方法', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1916, 1916, 'log.operate.export.requestMethod', '请求方式 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1917, 1917, 'log.operate.export.operatorType', '操作类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1918, 1918, 'log.operate.export.operName', '操作人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1919, 1919, 'log.operate.export.deptName', '操作人员部门名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1920, 1920, 'log.operate.export.url', '请求链接地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1921, 1921, 'log.operate.export.ip', '请求主机 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1922, 1922, 'log.operate.export.location', '请求地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1923, 1923, 'log.operate.export.param', '请求参数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1924, 1924, 'log.operate.export.msg', '操作信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1925, 1925, 'log.operate.export.status', '操作状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1926, 1926, 'log.operate.export.costTime', '消耗时间(毫秒)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1927, 1927, 'log.operate.export.operTime', '操作时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1928, 1928, 'log.login.export.id', '记录编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1929, 1929, 'log.login.export.userName', '登录账号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1930, 1930, 'log.login.export.status', '登录状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1931, 1931, 'log.login.export.ip', '登录地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1932, 1932, 'log.login.export.location', '登录地点', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1933, 1933, 'log.login.export.browser', '浏览器', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1934, 1934, 'log.login.export.os', '操作系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1935, 1935, 'log.login.export.msg', '登录信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1936, 1936, 'log.login.export.time', '登录时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1937, 1937, 'trace.tcpdump.noData', '找不到 {type} {id} 对应网元信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1938, 1938, 'register.errUsername', '账号不能以数字开头,可包含大写小写字母,数字,且不少于5位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1939, 1939, 'register.errPasswd', '登录密码至少包含大小写字母、数字、特殊符号,且不少于6位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1940, 1940, 'register.errPasswdNotEq', '用户确认输入密码不一致', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1941, 1941, 'register.success', '注册成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1942, 1942, 'register.successMsg', '{name} 注册成功 {id}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1943, 1943, 'log.operate.title.sysJobLog', '调度任务日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1944, 1944, 'log.operate.title.sysJob', '调度任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1945, 1945, 'log.operate.title.tcpdump', '信令抓包', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1946, 1946, 'log.operate.title.sysConfig', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1947, 1947, 'log.operate.title.sysDept', '部门', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1948, 1948, 'log.operate.title.sysDictData', '字典数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1949, 1949, 'log.operate.title.sysDictType', '字典类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1950, 1950, 'log.operate.title.sysMenu', '菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1951, 1951, 'log.operate.title.sysPost', '岗位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1952, 1952, 'log.operate.title.sysProfile', '个人信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1953, 1953, 'log.operate.title.sysProfileAvatar', '个人头像', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1954, 1954, 'log.operate.title.sysRole', '角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1955, 1955, 'log.operate.title.sysUser', '用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1956, 1956, 'log.operate.title.sysLogOper', '操作日志记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1957, 1957, 'log.operate.title.sysLogLogin', '登录日志记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1958, 1958, 'login.errNameOrPasswd', '用户不存在或密码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1959, 1959, 'login.errDelFlag', '对不起,您的账号已被删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1960, 1960, 'login.errStatus', '对不起,您的帐户已被禁用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1961, 1961, 'login.errRetryPasswd', '密码输入错误多次,帐户已被锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1962, 1962, 'captcha.err', '验证码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1963, 1963, 'captcha.errValid', '验证码已失效', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1964, 1964, 'app.common.noUaOsBrowser', '未知 未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1965, 1965, 'app.common.noIPregion', '内网', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1966, 1966, 'app.common.unknown', '未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1967, 1967, 'app.common.noNEInfo', '未找到匹配网元信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1968, 1968, 'ne.udm.errImportUserAuthFileFormat', '请上传.csv或.txt的格式文件。英文逗号分割txt格式:imsi, ki, algo, amf, opc', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1969, 1969, 'ne.udm.errExportType', '导出文件类型支持CSV和txt', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1970, 1970, 'ne.udm.errImportUserSubFileFormat', '请上传.csv或.txt的格式文件。英文逗号分割txt格式:imsi, msisdn, ambr, nssai, arfb, sar, rat, cn, smf_sel, sm_dat, eps_dat', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1971, 1971, 'log.operate.title.udmAuth', 'UDM鉴权用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1972, 1972, 'log.operate.title.udmSub', 'UDM签约用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1973, 1973, 'dictType.active_alarm_type', '活动告警类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1974, 1974, 'dictType.active_alarm_type_remark', '活动告警类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1975, 1975, 'dictData.active_alarm_type.communication', '通信告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1976, 1976, 'dictData.active_alarm_type.equipment', '设备告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1977, 1977, 'dictData.active_alarm_type.processing', '处理错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1978, 1978, 'dictData.active_alarm_type.environmental', '环境告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1979, 1979, 'dictData.active_alarm_type.qualityOfService', '服务质量', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1980, 1980, 'dictType.active_clear_type', '告警清除类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1981, 1981, 'dictType.active_clear_type_remark', '告警清除类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1982, 1982, 'dictData.active_clear_type.notCleared', '告警未清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1983, 1983, 'dictData.active_clear_type.hand', '手动清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1984, 1984, 'dictData.active_clear_type.auto', '自动清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1985, 1985, 'dictType.active_ack_state', '告警确认类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1986, 1986, 'dictType.active_ack_state_remark', '告警确认类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1987, 1987, 'dictData.active_ack_state.unconfirmed', '未确认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1988, 1988, 'dictData.active_ack_state.confirmed', '已确认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1989, 1989, 'dictType.active_alarm_severity', '严重程度', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1990, 1990, 'dictType.active_alarm_severity_remark', '严重程度列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1991, 1991, 'dictData.active_alarm_severity.critical', '严重告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1992, 1992, 'dictData.active_alarm_severity.major', '主要告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1993, 1993, 'dictData.active_alarm_severity.minor', '次要告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1994, 1994, 'dictData.active_alarm_severity.warning', '警告告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1995, 1995, 'dictData.active_alarm_severity.event', '事件告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1996, 1996, 'config.sys.officialUrl', '系统设置-官网链接', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1997, 1997, 'config.sys.helpDoc', '系统设置-系统使用文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1998, 1998, 'config.sys.officialUrlRemark', '默认无地址用#号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (1999, 1999, 'config.sys.helpDocRemark', '静态文件目录地址,使用{language}区分语言文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2000, 2000, 'log.operate.title.neAction', '网元处理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2001, 2001, 'log.operate.title.helpDoc', '系统使用文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2002, 2002, 'menu.ueUser.n3iwf', 'N3IWF在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2003, 2003, 'menu.ueUser.pcf', '用户策略控制信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2004, 2004, 'menu.system.user.editRole', '修改用户角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2005, 2005, 'config.sys.i18nOpen', '国际化切换', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2006, 2006, 'config.sys.i18nDefault', '国际化默认语言', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2007, 2007, 'user.export.role', '用户角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2008, 2008, 'menu.system.setting.i18n', '国际化切换', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2009, 2009, 'menu.system.setting.i18nRemark', '国际化多语言的切换选择', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2010, 2010, 'dictType.index_status', '首页状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2011, 2011, 'dictType.index_status_remark', '首页的网元状态颜色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2012, 2012, 'dictType.index_status.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2013, 2013, 'dictType.index_status.abnormal', '异常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2014, 2014, 'menu.log.neFile', '网元日志文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2015, 2015, 'job.deleteExpiredNeStateRecord', '删除过期网元状态记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2016, 2016, 'job.deleteExpiredNeStateRecordRemark', '定期删除过期的网元状态记录, 默认保留{duration}天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2017, 2017, 'job.getStateFromNE', '获取网元状态信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2018, 2018, 'job.getStateFromNERemark', '获取所有网元状态信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2019, 2019, 'job.genNeStateAlarm', '网元健康状态巡检', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2020, 2020, 'job.genNeStateAlarmRemark', '网元健康状态巡检,异常时产生告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2021, 2021, 'menu.neUser.nssf', 'NSSF在线订阅数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2022, 2022, 'menu.neUser.nssfAmf', 'NSSF可用的注册AMF', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2023, 2023, 'menu.monitor.topology', '拓扑信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2024, 2024, 'menu.monitor.topologyBuild', '拓扑图组编辑', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2025, 2025, 'log.operate.title.chartGraph', '拓扑图组', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2026, 2026, 'menu.monitor.topologyArchitecture', '网元拓扑组网', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2027, 2027, 'menu.alarm', '告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2028, 2028, 'menu.topology', '拓扑', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2029, 2029, 'config.sys.lockTime', '系统设置-锁屏超时时长', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2030, 2030, 'config.sys.lockTimeRemark', '无操作时锁屏超时时长,单位(秒)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2031, 2031, 'sys.account.captchaType', '账号自助-验证码类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2032, 2032, 'sys.account.captchaTypeRemark', '使用验证码类型(math数值计算,char字符验证)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2033, 2033, 'menu.dashboard', '仪表盘', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2034, 2034, 'menu.dashboard.overview', '总览', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2035, 2035, 'menu.dashboard.cdr', 'IMS 话单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2036, 2036, 'dictType.cdr_sip_code', 'CDR SIP响应代码类别类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2037, 2037, 'dictType.cdr_call_type', 'CDR 呼叫类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2038, 2038, 'dictType.ue_auth_code', 'UE 事件认证代码类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2039, 2039, 'dictType.ue_event_type', 'UE 事件类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2040, 2040, 'dictData.cdr_sip_code.200', '正常挂机', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2041, 2041, 'dictData.cdr_sip_code.403', '被禁止的', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2042, 2042, 'dictData.cdr_sip_code.408', '请求超时', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2043, 2043, 'dictData.cdr_sip_code.500', '服务器内部错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2044, 2044, 'dictData.cdr_call_type.audio', '语音', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2045, 2045, 'dictData.cdr_call_type.video', '视频', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2046, 2046, 'dictData.ue_auth_code.200', '成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2047, 2047, 'dictData.ue_auth_code.001', '网络失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2048, 2048, 'dictData.ue_auth_code.002', '空口接口失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2049, 2049, 'dictData.ue_auth_code.003', 'MAC失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2050, 2050, 'dictData.ue_auth_code.004', '同步失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2051, 2051, 'dictData.ue_auth_code.005', '不接受非5G认证', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2052, 2052, 'dictData.ue_auth_code.006', '响应失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2053, 2053, 'dictData.ue_auth_code.007', '未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2054, 2054, 'dictData.ue_event_type.auth', '认证', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2055, 2055, 'dictData.ue_event_type.detach', '注销', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2056, 2056, 'dictData.ue_event_type.state', 'CM状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2057, 2057, 'dictType.ue_event_cm_state', 'UE 事件CM状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2058, 2058, 'dictData.ue_event_cm_state.connected', '连接', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2059, 2059, 'dictData.ue_event_cm_state.idle', '空闲', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2060, 2060, 'dictData.ue_event_cm_state.inactive', '不活动', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2061, 2061, 'dictData.cdr_sip_code.404', '未找到', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2062, 2062, 'dictData.cdr_sip_code.487', '请求终止', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2063, 2063, 'dictData.cdr_sip_code.503', '服务不可用', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2064, 2064, 'dictData.cdr_sip_code.504', '服务器超时', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2065, 2065, 'dictData.cdr_sip_code.603', '拒绝', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2066, 2066, 'dictData.cdr_sip_code.606', '不可接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2067, 2067, 'cache.name.user', '登录用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2068, 2068, 'cache.name.sys_config', '参数管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2069, 2069, 'cache.name.sys_dict', '字典管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2070, 2070, 'cache.name.captcha_codes', '验证码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2071, 2071, 'cache.name.repeat_submit', '防重提交', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2072, 2072, 'cache.name.rate_limit', '限流', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2073, 2073, 'cache.name.pwd_err_cnt', '登录账户密码错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2074, 2074, 'cache.name.ne_info', '网元信息管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (2075, 2075, 'cache.name.ne_data', '网元数据管理', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2076, 2076, 'dictData.cdr_call_type.sms', '短信', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2077, 2077, 'dictData.cdr_sip_code.202', '已接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2078, 2078, 'dictData.cdr_sip_code.488', '这里不能接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2079, 2079, 'dictData.cdr_sip_code.0', '其他', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2080, 2080, 'log.operate.title.ws', 'WS会话', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2081, 2081, 'log.operate.title.neHost', '网元主机', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2082, 2082, 'neHost.noData', '没有可访问主机信息数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2083, 2083, 'neHost.errKeyExists', '主机信息操作【{name}】失败,同组内名称已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2084, 2084, 'neHost.errByHostInfo', '连接主机失败,请检查连接参数后重试', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2085, 2085, 'dictType.ne_host_type', '网元主机连接类型', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2086, 2086, 'dictType.ne_host_groupId', '网元主机分组', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2087, 2087, 'dictType.ne_host_authMode', '网元主机认证模式', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2088, 2088, 'dictData.ne_host_type.ssh', 'SSH', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2089, 2089, 'dictData.ne_host_type.telnet', 'Telnet', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2090, 2090, 'dictData.ne_host_groupId.0', '其他', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2091, 2091, 'dictData.ne_host_groupId.1', '网元', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2092, 2092, 'dictData.ne_host_groupId.2', '系统', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2093, 2093, 'dictData.ne_host_authMode.0', '密码认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2094, 2094, 'dictData.ne_host_authMode.1', '私钥认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2095, 2095, 'menu.tools.terminal', '网元主机终端', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2096, 2096, 'menu.config.neHost', '网元主机', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2097, 2097, 'menu.config.neHostCommand', '网元主机命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2098, 2098, 'log.operate.title.neHostCmd', '网元主机命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2099, 2099, 'neHostCmd.noData', '没有可访问主机命令数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2100, 2100, 'neHostCmd.errKeyExists', '主机命令操作【{name}】失败,同组内名称已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2101, 2101, 'dictType.ne_host_cmd_groupId', '网元主机命令分组', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2102, 2102, 'dictData.ne_host_cmd_groupId.0', '默认', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2103, 2103, 'dictData.ne_host_cmd_groupId.1', '快速命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2104, 2104, 'menu.config.neInfo', '网元信息', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2105, 2105, 'log.operate.title.neInfo', '网元信息', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2106, 2106, 'neInfo.noData', '没有可访问网元信息数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2107, 2107, 'neInfo.errKeyExists', '网元信息操作【{key}】失败,同类型下标识已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2108, 2108, 'log.operate.title.imsCDR', 'IMS-CDR会话', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2109, 2109, 'menu.dashboard.amfUE', '用户事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2110, 2110, 'log.operate.title.amfUE', 'AMF-UE事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2111, 2111, 'dictData.ne_info_status.0', '离线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2112, 2112, 'dictData.ne_info_status.1', '在线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2113, 2113, 'dictData.ne_info_status.2', '等待同步', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2114, 2114, 'dictData.ne_info_status.3', '-', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2115, 2115, 'dictType.ne_info_status', '网元信息状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2116, 2116, 'menu.ne.neQuickSetup', '网元快速安装', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2117, 2117, 'log.operate.title.neConfig', '网元参数配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2118, 2118, 'menu.config.neLicense', '网元授权', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2119, 2119, 'log.operate.title.neLicense', '网元授权', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2120, 2120, 'menu.config.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2121, 2121, 'log.operate.title.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2122, 2122, 'log.operate.title.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2123, 2123, 'menu.config.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2124, 2124, 'dictType.ne_license_status', '网元授权状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2125, 2125, 'ne_license_status.0', '无效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2126, 2126, 'ne_license_status.1', '有效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2127, 2127, 'menu.dashboard.mocn', 'MOCN', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2128, 2128, 'menu.monitor.cdr', '话单', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2129, 2129, 'menu.monitor.event', '事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2130, 2130, 'post.export.time', '创建时间', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2131, 2131, 'role.export.time', '创建时间', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2132, 2132, 'dictData.ne_host_authMode.2', '免密认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2133, 2133, 'menu.ne.neConfPara5G', '网元公共配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (2134, 2134, 'menu.fault.event', '事件通知', 'i18n_zh', '', '', '1', 'supervisor', 1717051745866, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (1662, 1662, 'config.noData', '没有可访问参数配置数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1663, 1663, 'config.errKey', '无效 key', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1664, 1664, 'config.errValueEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1665, 1665, 'config.errKeyExists', '操作参数配置【{name}】失败,参数键名已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1666, 1666, 'config.errDelete', '删除参数配置信息失败!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1667, 1667, 'config.errType', '操作含有内置参数,禁止删除!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1700, 1700, 'job.monitor_sys_resource', '监控-系统资源', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1701, 1701, 'job.monitor_sys_resource_remark', '系统资源CPU/IO/Netword收集\r\ninterval单位分钟,平均分钟资源情况\r\n注:请根据cron表达式的时间单位分钟,传入参数interva值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1702, 1702, 'job.delExpiredNeBackup', '删除过期网元备份文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1703, 1703, 'job.delExpiredNeBackupRemark', '删除过期网元etc备份文件, 传入参数表示保留{duration}天的备份文件, 默认60天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1704, 1704, 'job.deleteExpiredAlarmRecord', '删除过期历史告警记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1705, 1705, 'job.deleteExpiredAlarmRecordRemark', '删除过期历史告警记录,传入参数表示保留{duration}天的历史告警记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1706, 1706, 'job.deleteExpiredKpiRecord', '删除过期黄金指标记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1707, 1707, 'job.deleteExpiredKpiRecordRemark', '黄金指标记录保留{duration}天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1708, 1708, 'job.backupEtcFromNE', '网元配置自动备份任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1709, 1709, 'job.backupEtcFromNERemark', '自动备份网元etc目录下的配置文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1710, 1710, 'job.export.jobID', '任务编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1711, 1711, 'job.export.jobName', '任务名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1712, 1712, 'job.export.jobGroupName', '任务组名', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1713, 1713, 'job.export.invokeTarget', '调用目标', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1714, 1714, 'job.export.targetParams', '传入参数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1715, 1715, 'job.export.cronExpression', 'cron表达式', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1716, 1716, 'job.export.status', '状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1717, 1717, 'job.export.remark', '备注说明', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1718, 1718, 'job.export.jobLogID', '任务日志编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1719, 1719, 'job.export.jobLogStatus', '任务日志状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1720, 1720, 'job.export.jobLogTime', '任务日志时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1721, 1721, 'job.noData', '没有可访问调度任务数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1722, 1722, 'job.errTargetParams', '操作调度任务【{name}】失败,任务传入参数json字符串不正确', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1723, 1723, 'job.errCronExpression', '操作调度任务【{name}】失败,Cron表达式不正确', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1724, 1724, 'job.errJobExists', '调度任务新增【{name}】失败,同任务组内有相同任务名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1725, 1725, 'job.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1750, 1750, 'role.admin', '超级管理员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1751, 1751, 'role.adminAssign', '管理人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1752, 1752, 'role.operator', '运维人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1753, 1753, 'role.monitor', '监控人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1754, 1754, 'role.vistor', '普通用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1755, 1755, 'role.adminRemark', '超级管理员,无法修改删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1756, 1756, 'role.adminAssignRemark', '管理人员 可以对设备进行任何操作', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1757, 1757, 'role.operatorRemark', '运维人员 可以从设备读取数据,并对设备进行配置,但是不能对设备进行软件升级操作。', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1758, 1758, 'role.monitorRemark', '监控人员 只能从设备读取数据,而不能对设备进行任何设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1759, 1759, 'role.vistorRemark', '普通用户 只可看系统相关信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1760, 1760, 'role.export.id', '角色编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1761, 1761, 'role.export.name', '角色名称 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1762, 1762, 'role.export.key', '角色键值', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1763, 1763, 'role.export.sort', '角色顺序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1764, 1764, 'role.export.dataScope', '角色数据范围', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1765, 1765, 'role.export.status', '角色状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1766, 1766, 'role.noData', '没有可访问角色数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1767, 1767, 'role.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1768, 1768, 'role.errNameExists', '操作角色【{name}】失败,角色名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1769, 1769, 'role.errKeyExists', '操作角色【{name}】失败,角色键值已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1800, 1800, 'post.admin', '系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1801, 1801, 'post.operator', '管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1802, 1802, 'post.monitor', '运维', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1803, 1803, 'post.visitor', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1804, 1804, 'post.export.id', '岗位编号 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1805, 1805, 'post.export.code', '岗位编码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1806, 1806, 'post.export.name', '岗位名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1807, 1807, 'post.export.sort', '岗位排序', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1808, 1808, 'post.export.status', '岗位状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1809, 1809, 'post.noData', '没有可访问岗位数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1810, 1810, 'post.errNameExists', '操作岗位【{name}】失败,岗位名称已存在已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1811, 1811, 'post.errCodeExists', '操作角色【{name}】失败,角色键值已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1830, 1830, 'user.export.id', '用户编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1831, 1831, 'user.export.name', '登录账号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1832, 1832, 'user.export.nick', '用户昵称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1833, 1833, 'user.export.email', '电子邮箱', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1834, 1834, 'user.export.phone', '手机号码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1835, 1835, 'user.export.sex', '用户性别', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1836, 1836, 'user.export.status', '用户状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1837, 1837, 'user.export.deptID', '部门编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1838, 1838, 'user.export.deptName', '部门名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1839, 1839, 'user.export.deptLeader', '部门负责人', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1840, 1840, 'user.export.loginIP', '用户登录IP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1841, 1841, 'user.export.loginDate', '用户登录时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1842, 1842, 'user.noData', '没有可访问用户数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1843, 1843, 'user.statusEq', '变更状态与旧值相等!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1844, 1844, 'user.errPasswdOld', '修改密码失败,旧密码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1845, 1845, 'user.errPasswdEqOld', '新密码不能与旧密码相同', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1846, 1846, 'user.errPasswd', '登录密码至少包含大小写字母、数字、特殊符号,且不少于6位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1847, 1847, 'user.errEmailFormat', '操作用户【{name}】失败,邮箱格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1848, 1848, 'user.errEmailExists', '操作用户【{name}】失败,邮箱已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1849, 1849, 'user.errPhoneFormat', '操作用户【{name}】失败,手机号码格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1850, 1850, 'user.errPhoneExists', '操作用户【{name}】失败,手机号码已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1851, 1851, 'user.errNameExists', '操作用户【{name}】失败,登录账号已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1852, 1852, 'user.import.mustItem', '表格中必填列表项,{text}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1853, 1853, 'user.import.phoneExist', '用户编号:{id} 手机号码 {phone} 已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1854, 1854, 'user.import.phoneFormat', '用户编号:{id} 手机号码 {phone} 格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1855, 1855, 'user.import.emailExist', '用户编号:{id} 用户邮箱:{email} 已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1856, 1856, 'user.import.emailFormat', '用户编号:{id} 用户邮箱:{email} 格式错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1857, 1857, 'user.import.success', '用户编号:{id} 登录名称:{name} 导入成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1858, 1858, 'user.import.fail', '用户编号:{id} 登录名称:{name} 导入失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1859, 1859, 'user.import.successUpdate', '用户编号:{id} 登录名称:{name} 更新成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1860, 1860, 'user.import.failUpdate', '用户编号:{id} 登录名称:{name} 更新失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1861, 1861, 'user.import.failTip', '很抱歉,导入失败!共 {num} 条数据格式不正确,错误如下:', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1862, 1862, 'user.import.successTip', '恭喜您,数据已全部导入成功!共 {num} 条,数据如下:', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1900, 1900, 'app.common.err403', '无权访问 {method} {requestURI}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1901, 1901, 'app.common.err401', '无效身份授权', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1902, 1902, 'app.common.err400', '参数错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1903, 1903, 'app.common.exportEmpty', '导出数据记录为空', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1904, 1904, 'app.common.errOperateAdmin', '不允许操作内置用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1905, 1905, 'app.common.errOperateRole', '不允许操作内置角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1906, 1906, 'app.common.deleteSuccess', '删除成功:{num}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1907, 1907, 'app.common.loginSuccess', '登录成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1908, 1908, 'app.common.logoutSuccess', '注销成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1909, 1909, 'app.common.errUnlock', '该用户未被锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1910, 1910, 'app.common.noLoginUser', '登录用户信息无效', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1911, 1911, 'app.common.rateLimitTip', '访问过于频繁,请稍候再试', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1912, 1912, 'log.operate.export.id', '操作编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1913, 1913, 'log.operate.export.title', '模块名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1914, 1914, 'log.operate.export.businessType', '业务类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1915, 1915, 'log.operate.export.method', '操作方法', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1916, 1916, 'log.operate.export.requestMethod', '请求方式 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1917, 1917, 'log.operate.export.operatorType', '操作类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1918, 1918, 'log.operate.export.operName', '操作人员', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1919, 1919, 'log.operate.export.deptName', '操作人员部门名称', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1920, 1920, 'log.operate.export.url', '请求链接地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1921, 1921, 'log.operate.export.ip', '请求主机 ', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1922, 1922, 'log.operate.export.location', '请求地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1923, 1923, 'log.operate.export.param', '请求参数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1924, 1924, 'log.operate.export.msg', '操作信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1925, 1925, 'log.operate.export.status', '操作状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1926, 1926, 'log.operate.export.costTime', '消耗时间(毫秒)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1927, 1927, 'log.operate.export.operTime', '操作时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1928, 1928, 'log.login.export.id', '记录编号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1929, 1929, 'log.login.export.userName', '登录账号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1930, 1930, 'log.login.export.status', '登录状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1931, 1931, 'log.login.export.ip', '登录地址', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1932, 1932, 'log.login.export.location', '登录地点', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1933, 1933, 'log.login.export.browser', '浏览器', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1934, 1934, 'log.login.export.os', '操作系统', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1935, 1935, 'log.login.export.msg', '登录信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1936, 1936, 'log.login.export.time', '登录时间', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1937, 1937, 'trace.tcpdump.noData', '找不到 {type} {id} 对应网元信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1938, 1938, 'register.errUsername', '账号不能以数字开头,可包含大写小写字母,数字,且不少于5位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1939, 1939, 'register.errPasswd', '登录密码至少包含大小写字母、数字、特殊符号,且不少于6位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1940, 1940, 'register.errPasswdNotEq', '用户确认输入密码不一致', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1941, 1941, 'register.success', '注册成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1942, 1942, 'register.successMsg', '{name} 注册成功 {id}', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1943, 1943, 'log.operate.title.sysJobLog', '调度任务日志', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1944, 1944, 'log.operate.title.sysJob', '调度任务', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1945, 1945, 'log.operate.title.tcpdump', '信令抓包', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1946, 1946, 'log.operate.title.sysConfig', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1947, 1947, 'log.operate.title.sysDept', '部门', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1948, 1948, 'log.operate.title.sysDictData', '字典数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1949, 1949, 'log.operate.title.sysDictType', '字典类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1950, 1950, 'log.operate.title.sysMenu', '菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1951, 1951, 'log.operate.title.sysPost', '岗位', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1952, 1952, 'log.operate.title.sysProfile', '个人信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1953, 1953, 'log.operate.title.sysProfileAvatar', '个人头像', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1954, 1954, 'log.operate.title.sysRole', '角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1955, 1955, 'log.operate.title.sysUser', '用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1956, 1956, 'log.operate.title.sysLogOper', '操作日志记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1957, 1957, 'log.operate.title.sysLogLogin', '登录日志记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1958, 1958, 'login.errNameOrPasswd', '用户不存在或密码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1959, 1959, 'login.errDelFlag', '对不起,您的账号已被删除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1960, 1960, 'login.errStatus', '对不起,您的帐户已被禁用', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1961, 1961, 'login.errRetryPasswd', '密码输入错误多次,帐户已被锁定', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1962, 1962, 'captcha.err', '验证码错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1963, 1963, 'captcha.errValid', '验证码已失效', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1964, 1964, 'app.common.noUaOsBrowser', '未知 未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1965, 1965, 'app.common.noIPregion', '内网', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1966, 1966, 'app.common.unknown', '未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1967, 1967, 'app.common.noNEInfo', '未找到匹配网元信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1968, 1968, 'ne.udm.errImportUserAuthFileFormat', '请上传.csv或.txt的格式文件。英文逗号分割txt格式:imsi, ki, algo, amf, opc', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1969, 1969, 'ne.udm.errExportType', '导出文件类型支持CSV和txt', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1970, 1970, 'ne.udm.errImportUserSubFileFormat', '请上传.csv或.txt的格式文件。英文逗号分割txt格式:imsi, msisdn, ambr, nssai, arfb, sar, rat, cn, smf_sel, sm_dat, eps_dat', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1971, 1971, 'log.operate.title.udmAuth', 'UDM鉴权用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1972, 1972, 'log.operate.title.udmSub', 'UDM签约用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1973, 1973, 'dictType.active_alarm_type', '活动告警类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1974, 1974, 'dictType.active_alarm_type_remark', '活动告警类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1975, 1975, 'dictData.active_alarm_type.communication', '通信告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1976, 1976, 'dictData.active_alarm_type.equipment', '设备告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1977, 1977, 'dictData.active_alarm_type.processing', '处理错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1978, 1978, 'dictData.active_alarm_type.environmental', '环境告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1979, 1979, 'dictData.active_alarm_type.qualityOfService', '服务质量', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1980, 1980, 'dictType.active_clear_type', '告警清除类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1981, 1981, 'dictType.active_clear_type_remark', '告警清除类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1982, 1982, 'dictData.active_clear_type.notCleared', '告警未清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1983, 1983, 'dictData.active_clear_type.hand', '手动清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1984, 1984, 'dictData.active_clear_type.auto', '自动清除', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1985, 1985, 'dictType.active_ack_state', '告警确认类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1986, 1986, 'dictType.active_ack_state_remark', '告警确认类型列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1987, 1987, 'dictData.active_ack_state.unconfirmed', '未确认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1988, 1988, 'dictData.active_ack_state.confirmed', '已确认', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1989, 1989, 'dictType.active_alarm_severity', '严重程度', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1990, 1990, 'dictType.active_alarm_severity_remark', '严重程度列表', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1991, 1991, 'dictData.active_alarm_severity.critical', '严重告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1992, 1992, 'dictData.active_alarm_severity.major', '主要告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1993, 1993, 'dictData.active_alarm_severity.minor', '次要告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1994, 1994, 'dictData.active_alarm_severity.warning', '警告告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1995, 1995, 'dictData.active_alarm_severity.event', '事件告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1996, 1996, 'config.sys.officialUrl', '系统设置-官网链接', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1997, 1997, 'config.sys.helpDoc', '系统设置-系统使用文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1998, 1998, 'config.sys.officialUrlRemark', '默认无地址用#号', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (1999, 1999, 'config.sys.helpDocRemark', '静态文件目录地址,使用{language}区分语言文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2000, 2000, 'log.operate.title.neAction', '网元处理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2001, 2001, 'log.operate.title.helpDoc', '系统使用文档', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2002, 2002, 'menu.ueUser.n3iwf', 'N3IWF在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2003, 2003, 'menu.ueUser.pcf', '用户策略控制信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2004, 2004, 'menu.system.user.editRole', '修改用户角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2005, 2005, 'config.sys.i18nOpen', '国际化切换', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2006, 2006, 'config.sys.i18nDefault', '国际化默认语言', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2007, 2007, 'user.export.role', '用户角色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2008, 2008, 'menu.system.setting.i18n', '国际化切换', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2009, 2009, 'menu.system.setting.i18nRemark', '国际化多语言的切换选择', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2010, 2010, 'dictType.index_status', '首页状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2011, 2011, 'dictType.index_status_remark', '首页的网元状态颜色', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2012, 2012, 'dictType.index_status.normal', '正常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2013, 2013, 'dictType.index_status.abnormal', '异常', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2014, 2014, 'menu.log.neFile', '网元日志文件', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2015, 2015, 'job.deleteExpiredNeStateRecord', '删除过期网元状态记录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2016, 2016, 'job.deleteExpiredNeStateRecordRemark', '定期删除过期的网元状态记录, 默认保留{duration}天', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2017, 2017, 'job.getStateFromNE', '获取网元状态信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2018, 2018, 'job.getStateFromNERemark', '获取所有网元状态信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2019, 2019, 'job.genNeStateAlarm', '网元健康状态巡检', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2020, 2020, 'job.genNeStateAlarmRemark', '网元健康状态巡检,异常时产生告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2021, 2021, 'menu.neUser.nssf', 'NSSF在线订阅数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2022, 2022, 'menu.neUser.nssfAmf', 'NSSF可用的注册AMF', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2023, 2023, 'menu.monitor.topology', '拓扑信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2024, 2024, 'menu.monitor.topologyBuild', '拓扑图组编辑', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2025, 2025, 'log.operate.title.chartGraph', '拓扑图组', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2026, 2026, 'menu.monitor.topologyArchitecture', '网元拓扑组网', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2027, 2027, 'menu.alarm', '告警', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2028, 2028, 'menu.topology', '拓扑', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2029, 2029, 'config.sys.lockTime', '系统设置-锁屏超时时长', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2030, 2030, 'config.sys.lockTimeRemark', '无操作时锁屏超时时长,单位(秒)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2031, 2031, 'sys.account.captchaType', '账号自助-验证码类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2032, 2032, 'sys.account.captchaTypeRemark', '使用验证码类型(math数值计算,char字符验证)', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2033, 2033, 'menu.dashboard', '仪表盘', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2034, 2034, 'menu.dashboard.overview', '总览', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2035, 2035, 'menu.dashboard.cdr', 'IMS 话单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2036, 2036, 'dictType.cdr_sip_code', 'CDR SIP响应代码类别类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2037, 2037, 'dictType.cdr_call_type', 'CDR 呼叫类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2038, 2038, 'dictType.ue_auth_code', 'UE 事件认证代码类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2039, 2039, 'dictType.ue_event_type', 'UE 事件类型', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2040, 2040, 'dictData.cdr_sip_code.200', '正常挂机', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2041, 2041, 'dictData.cdr_sip_code.403', '被禁止的', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2042, 2042, 'dictData.cdr_sip_code.408', '请求超时', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2043, 2043, 'dictData.cdr_sip_code.500', '服务器内部错误', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2044, 2044, 'dictData.cdr_call_type.audio', '语音', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2045, 2045, 'dictData.cdr_call_type.video', '视频', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2046, 2046, 'dictData.ue_auth_code.200', '成功', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2047, 2047, 'dictData.ue_auth_code.001', '网络失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2048, 2048, 'dictData.ue_auth_code.002', '空口接口失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2049, 2049, 'dictData.ue_auth_code.003', 'MAC失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2050, 2050, 'dictData.ue_auth_code.004', '同步失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2051, 2051, 'dictData.ue_auth_code.005', '不接受非5G认证', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2052, 2052, 'dictData.ue_auth_code.006', '响应失败', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2053, 2053, 'dictData.ue_auth_code.007', '未知', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2054, 2054, 'dictData.ue_event_type.auth', '认证', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2055, 2055, 'dictData.ue_event_type.detach', '注销', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2056, 2056, 'dictData.ue_event_type.state', 'CM状态', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2057, 2057, 'dictType.ue_event_cm_state', 'UE 事件CM状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2058, 2058, 'dictData.ue_event_cm_state.connected', '连接', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2059, 2059, 'dictData.ue_event_cm_state.idle', '空闲', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2060, 2060, 'dictData.ue_event_cm_state.inactive', '不活动', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2061, 2061, 'dictData.cdr_sip_code.404', '未找到', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2062, 2062, 'dictData.cdr_sip_code.487', '请求终止', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2063, 2063, 'dictData.cdr_sip_code.503', '服务不可用', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2064, 2064, 'dictData.cdr_sip_code.504', '服务器超时', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2065, 2065, 'dictData.cdr_sip_code.603', '拒绝', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2066, 2066, 'dictData.cdr_sip_code.606', '不可接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2067, 2067, 'cache.name.user', '登录用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2068, 2068, 'cache.name.sys_config', '参数管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2069, 2069, 'cache.name.sys_dict', '字典管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2070, 2070, 'cache.name.captcha_codes', '验证码', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2071, 2071, 'cache.name.repeat_submit', '防重提交', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2072, 2072, 'cache.name.rate_limit', '限流', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2073, 2073, 'cache.name.pwd_err_cnt', '登录账户密码错误次数', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2074, 2074, 'cache.name.ne_info', '网元信息管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (2075, 2075, 'cache.name.ne_data', '网元数据管理', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2076, 2076, 'dictData.cdr_call_type.sms', '短信', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2077, 2077, 'dictData.cdr_sip_code.202', '已接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2078, 2078, 'dictData.cdr_sip_code.488', '这里不能接受', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2079, 2079, 'dictData.cdr_sip_code.0', '其他', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2080, 2080, 'log.operate.title.ws', 'WS会话', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2081, 2081, 'log.operate.title.neHost', '网元主机', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2082, 2082, 'neHost.noData', '没有可访问主机信息数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2083, 2083, 'neHost.errKeyExists', '主机信息操作【{name}】失败,同组内名称已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2084, 2084, 'neHost.errByHostInfo', '连接主机失败,请检查连接参数后重试', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2085, 2085, 'dictType.ne_host_type', '网元主机连接类型', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2086, 2086, 'dictType.ne_host_groupId', '网元主机分组', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2087, 2087, 'dictType.ne_host_authMode', '网元主机认证模式', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2088, 2088, 'dictData.ne_host_type.ssh', 'SSH', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2089, 2089, 'dictData.ne_host_type.telnet', 'Telnet', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2090, 2090, 'dictData.ne_host_groupId.0', '其他', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2091, 2091, 'dictData.ne_host_groupId.1', '网元', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2092, 2092, 'dictData.ne_host_groupId.2', '系统', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2093, 2093, 'dictData.ne_host_authMode.0', '密码认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2094, 2094, 'dictData.ne_host_authMode.1', '私钥认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2095, 2095, 'menu.tools.terminal', '网元主机终端', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2096, 2096, 'menu.config.neHost', '网元主机', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2097, 2097, 'menu.config.neHostCommand', '网元主机命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2098, 2098, 'log.operate.title.neHostCmd', '网元主机命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2099, 2099, 'neHostCmd.noData', '没有可访问主机命令数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2100, 2100, 'neHostCmd.errKeyExists', '主机命令操作【{name}】失败,同组内名称已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2101, 2101, 'dictType.ne_host_cmd_groupId', '网元主机命令分组', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2102, 2102, 'dictData.ne_host_cmd_groupId.0', '默认', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2103, 2103, 'dictData.ne_host_cmd_groupId.1', '快速命令', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2104, 2104, 'menu.config.neInfo', '网元信息', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2105, 2105, 'log.operate.title.neInfo', '网元信息', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2106, 2106, 'neInfo.noData', '没有可访问网元信息数据!', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2107, 2107, 'neInfo.errKeyExists', '网元信息操作【{key}】失败,同类型下标识已存在', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2108, 2108, 'log.operate.title.imsCDR', 'IMS-CDR会话', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2109, 2109, 'menu.dashboard.amfUE', '用户事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2110, 2110, 'log.operate.title.amfUE', 'AMF-UE事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2111, 2111, 'dictData.ne_info_status.0', '离线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2112, 2112, 'dictData.ne_info_status.1', '在线', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2113, 2113, 'dictData.ne_info_status.2', '等待同步', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2114, 2114, 'dictData.ne_info_status.3', '-', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2115, 2115, 'dictType.ne_info_status', '网元信息状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2116, 2116, 'menu.ne.neQuickSetup', '网元快速安装', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2117, 2117, 'log.operate.title.neConfig', '网元参数配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2118, 2118, 'menu.config.neLicense', '网元许可', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2119, 2119, 'log.operate.title.neLicense', '网元许可', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2120, 2120, 'menu.config.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2121, 2121, 'log.operate.title.neSoftware', '网元软件包', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2122, 2122, 'log.operate.title.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2123, 2123, 'menu.config.neVersion', '网元版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2124, 2124, 'dictType.ne_license_status', '网元许可状态', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2125, 2125, 'dictData.ne_license_status.0', '无效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2126, 2126, 'dictData.ne_license_status.1', '有效', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2127, 2127, 'menu.dashboard.mocn', 'MOCN', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2128, 2128, 'menu.monitor.cdr', '话单', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2129, 2129, 'menu.monitor.event', '事件', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2130, 2130, 'post.export.time', '创建时间', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2131, 2131, 'role.export.time', '创建时间', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2132, 2132, 'dictData.ne_host_authMode.2', '免密认证', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2133, 2133, 'menu.ne.neConfPara5G', '网元公共配置', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2134, 2134, 'dictData.ne_version_status.0', '无', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2135, 2135, 'dictData.ne_version_status.1', '已是最新', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2136, 2136, 'dictData.ne_version_status.2', '上一版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2137, 2137, 'dictData.ne_version_status.3', '有新版本', 'i18n_zh', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (2138, 2138, 'menu.fault.event', '事件通知', 'i18n_zh', '', '', '1', 'supervisor', 1717051745866, '', 0, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/upgrade/upg_sys_dict_data2_i18n_en.sql b/database/upgrade/upg_sys_dict_data2_i18n_en.sql index f55b7a86..47416f54 100644 --- a/database/upgrade/upg_sys_dict_data2_i18n_en.sql +++ b/database/upgrade/upg_sys_dict_data2_i18n_en.sql @@ -17,644 +17,636 @@ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -INSERT IGNORE INTO `sys_dict_data` VALUES (3000, 3000, 'i18n', 'English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3001, 3001, 'hello', 'Hello', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3002, 3002, 'menu.system', 'System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3003, 3003, 'menu.monitor', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3004, 3004, 'menu.tools', 'Tools', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3005, 3005, 'menu.config', 'Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3006, 3006, 'menu.ueUser', 'UE', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3007, 3007, 'menu.systemRemark', 'System Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3008, 3008, 'menu.monitorRemark', 'System Monitor Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3009, 3009, 'menu.toolsRemark', 'System Tools Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3010, 3010, 'menu.configRemark', 'OMC Configuration Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3011, 3011, 'menu.ueUserRemark', 'Network Element Terminal Information Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3012, 3012, 'menu.security.user', 'User Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3013, 3013, 'menu.security.role', 'Role Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3014, 3014, 'menu.security.roleUser', 'Assigning Roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3015, 3015, 'menu.system.menu', 'Menu Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3016, 3016, 'menu.security.dept', 'Department Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3017, 3017, 'menu.security.post', 'Position Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3018, 3018, 'menu.system.dictType', 'Dictionary Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3019, 3019, 'menu.system.dictData', 'Dictionary Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3020, 3020, 'menu.system.paramSet', 'Parameter Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3021, 3021, 'menu.system.systemLog', 'System Log', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3022, 3022, 'menu.system.systemInfo', 'System Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3023, 3023, 'menu.system.cacheInfo', 'Cache Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3024, 3024, 'menu.system.cache', 'Cache Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3025, 3025, 'menu.security.onlineUser', 'Online Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3026, 3026, 'menu.system.job', 'Scheduling Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3027, 3027, 'menu.system.jobLog', 'Scheduling Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3028, 3028, 'menu.tools.help', 'Help Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3029, 3029, 'menu.log.operat', 'Operation logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3030, 3030, 'menu.log.login', 'Security logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3031, 3031, 'menu.security.userRemark', 'User Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3032, 3032, 'menu.security.roleRemark', 'Role Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3033, 3033, 'menu.security.roleUserRemark', 'Assign Roles Embedded Hidden Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3034, 3034, 'menu.system.menuRemark', 'Menu Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3035, 3035, 'menu.security.deptRemark', 'Department management menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3036, 3036, 'menu.security.postRemark', 'Job Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3037, 3037, 'menu.system.dictTypeRemark', 'Dictionary management menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3038, 3038, 'menu.system.dictDataRemark', 'Dictionary data embedded hidden menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3039, 3039, 'menu.system.paramSetRemark', 'Parameter setting menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3040, 3040, 'menu.system.systemLogRemark', 'System Log Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3041, 3041, 'menu.system.systemInfoRemark', 'System information menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3042, 3042, 'menu.system.cacheInfoRemark', 'Cache Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3043, 3043, 'menu.system.cacheRemark', 'Cache List Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3044, 3044, 'menu.security.onlineUserRemark', 'Online User Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3045, 3045, 'menu.system.jobRemark', 'Scheduling Tasks menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3046, 3046, 'menu.system.jobLogRemark', 'Scheduling Log Embedded Hidden Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3047, 3047, 'menu.tools.helpRemark', 'Help file menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3048, 3048, 'menu.log.operatRemark', 'Operation log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3049, 3049, 'menu.log.loginRemark', 'Login log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3050, 3050, 'menu.common.query', 'Inquiry', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3051, 3051, 'menu.common.add', 'Add', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3052, 3052, 'menu.common.edit', 'Modify', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3053, 3053, 'menu.common.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3054, 3054, 'menu.common.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3055, 3055, 'menu.common.import', 'Import', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3056, 3056, 'menu.common.reset', 'Reset', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3057, 3057, 'menu.common.unlock', 'Account Unlock', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3058, 3058, 'menu.forcedQuit.batch ', 'Batch Undo', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3059, 3059, 'menu.forcedQuit.single', 'Individual Forced Retirement', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3060, 3060, 'menu.ueUser.authUDM', 'UDM Authentication', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3061, 3061, 'menu.ueUser.subUDM', 'UDM Subscribers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3062, 3062, 'menu.ueUser.authUDMRemark', 'UDM Authentication Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3063, 3063, 'menu.ueUser.subUDMRemark', 'UDM Subscriber Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3064, 3064, 'menu.config.neManage', 'NE Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3065, 3065, 'menu.config.configNE', 'Parameter Configuration Original', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3066, 3066, 'menu.config.neManageRemark', 'Network Element Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3067, 3067, 'menu.config.configNERemark', 'Parameter Configuration Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3068, 3068, 'menu.config.backupManage', 'Backup Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3069, 3069, 'menu.config.softwareManage', 'Software Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3070, 3070, 'menu.ueUser.onlineIMS', 'IMS Online Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3071, 3071, 'menu.ueUser.onlineUE', 'UE Online Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3072, 3072, 'menu.ueUser.base5G', 'Radio Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3073, 3073, 'menu.trace', 'Trace', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3074, 3074, 'menu.trace.task', 'Trace Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3075, 3075, 'menu.trace.analysis', 'Signaling Analysis', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3076, 3076, 'menu.trace.pcap', 'Signaling Capture', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3077, 3077, 'menu.fault', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3078, 3078, 'menu.config.backupManageRemark', 'Backup Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3079, 3079, 'menu.config.softwareManageRemark', 'Software Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3080, 3080, 'menu.ueUser.onlineIMSRemark', 'IMS Online User Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3081, 3081, 'menu.ueUser.onlineUERemark', 'UE Online Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3082, 3082, 'menu.ueUser.base5GRemark', '5G Base Station Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3083, 3083, 'menu.traceRemark', 'Tracking Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3084, 3084, 'menu.trace.taskRemark', 'Tracking Task Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3085, 3085, 'menu.trace.analysisRemark', 'Signaling Analysis Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3086, 3086, 'menu.trace.pcapRemark', 'Signaling Capture Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3087, 3087, 'menu.faultRemark', 'Fault Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3088, 3088, 'menu.fault.active', 'Active Alarms', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3089, 3089, 'menu.log', 'Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3090, 3090, 'menu.log.operatOld', 'Operation Logs (old)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3091, 3091, 'menu.log.mml', 'MML Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3092, 3092, 'menu.log.alarm', 'Alarm Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3093, 3093, 'menu.log.securityOld', 'Security Logs (old)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3094, 3094, 'menu.log.forwarding', 'Alarm Forwarding Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3095, 3095, 'menu.log.set', 'Log Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3096, 3096, 'menu.monitor.sessionUser', 'User Sessions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3097, 3097, 'menu.fault.history', 'Historical Alarms', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3098, 3098, 'menu.fault.set', 'Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3099, 3099, 'menu.perf', 'Performance', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3100, 3100, 'menu.fault.activemRemark', 'Active Alarm Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3101, 3101, 'menu.logRemark', 'Log Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3102, 3102, 'menu.log.operatOldRemark', 'Operation log old layui menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3103, 3103, 'menu.log.mmlRemark', 'Operation MML Log', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3104, 3104, 'menu.log.alarmRemark', 'Alarm Log Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3105, 3105, 'menu.log.securityOldRemark', 'Security Log Old Layui Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3106, 3106, 'menu.log.forwardingRemark', 'Alarm forward log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3107, 3107, 'menu.log.setRemark', 'Log Settings menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3108, 3108, 'menu.monitor.sessionUserRemark', 'User Session Old Layui Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3109, 3109, 'menu.fault.historyRemark', 'Alarm history menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3110, 3110, 'menu.fault.setRemark', 'Fault General Setup Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3111, 3111, 'menu.perfRemark', 'Performance Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3112, 3112, 'menu.perf.task', 'Performance Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3113, 3113, 'menu.perf.data', 'Performance Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3114, 3114, 'menu.perf.report', 'Performance Reports', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3115, 3115, 'menu.perf.threshold', 'Performance Thresholds', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3116, 3116, 'menu.perf.kpi', 'Key Performance Indicators', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3117, 3117, 'menu.perf.customTarget', 'Custom Metrics', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3118, 3118, 'menu.perf.set', 'Performance General Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3119, 3119, 'menu.mml', 'MML', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3120, 3120, 'menu.mml.ne', 'NE Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3121, 3121, 'menu.mml.udm', 'UDM Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3122, 3122, 'menu.mml.set', 'MML Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3123, 3123, 'menu.mml.omc', 'OMC Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3124, 3124, 'menu.perf.taskRemark', 'Task Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3125, 3125, 'menu.perf.dataRemark', 'Performance Data Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3126, 3126, 'menu.perf.reportRemark', 'Performance Report Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3127, 3127, 'menu.perf.thresholdRemark', 'Performance Threshold Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3128, 3128, 'menu.perf.kpiRemark', 'Key Performance Indicator Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3129, 3129, 'menu.perf.customTargetRemark', 'Custom Metrics Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3130, 3130, 'menu.perf.setRemark', 'Performance General Settings Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3131, 3131, 'menu.mmlRemark', 'MML Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3132, 3132, 'menu.mml.neRemark', 'Network Element Operations Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3133, 3133, 'menu.mml.udmRemark', 'Network Element UDM User Data Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3134, 3134, 'menu.mml.setRemark', 'MML Setup Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3135, 3135, 'menu.mml.omcRemark', 'OMC Operation Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3136, 3136, 'menu.config.licenseManage', 'License Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3137, 3137, 'menu.security', 'Security', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3138, 3138, 'menu.system.systemSet', 'System Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3139, 3139, 'menu.system.systemResource', 'System Resources', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3140, 3140, 'menu.config.configNEForm', 'Parameter Configuration Form', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3141, 3141, 'menu.config.configNETree', 'Parameter Configuration Tree', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3142, 3142, 'menu.config.configNETreeTable', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3143, 3143, 'menu.config.licenseManageRemark', 'License Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3144, 3144, 'menu.securityRemark', 'Security Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3145, 3145, 'menu.system.systemSetRemark', 'System Settings Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3146, 3146, 'menu.system.systemResourceRemark', 'System Resources cpu io network menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3147, 3147, 'menu.config.configNEFormRemark', 'Parameter Configuration Form Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3148, 3148, 'menu.config.configNETreeRemark', 'Parameter Configuration Tree Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3149, 3149, 'menu.config.configNETreeTableRemark', 'Configuring the TreeTable menu with parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3150, 3150, 'menu.noData', 'There is no accessible menu data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3151, 3151, 'menu.errNameExists', 'Failed to operate menu [{name}], menu name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3152, 3152, 'menu.errPathExists', 'Failed to operate menu [{name}], menu routing address already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3153, 3153, 'menu.errFramePath', 'Failed to manipulate menu [{name}], non-internal address should start with http(s)://', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3154, 3154, 'menu.errParentStatus', 'The parent menu is not enabled!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3155, 3155, 'menu.errHasChildUse', 'Operation menu [{name}] failed, number of submenus in use exists: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3156, 3156, 'menu.errHasRoleUse', 'Operation menu [{name}] failed, number of roles the menu has been assigned to: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3400, 3400, 'dictData.sex.un', 'Not selected', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3401, 3401, 'dictData.sex.male', 'Male', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3402, 3402, 'dictData.sex.female', 'Female', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3403, 3403, 'dictData.show', 'Show', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3404, 3404, 'dictData.hide', 'Hide', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3405, 3405, 'dictData.normal', 'Active', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3406, 3406, 'dictData.disable', 'Inactive', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3407, 3407, 'dictData.yes', 'Yes', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3408, 3408, 'dictData.no', 'No', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3409, 3409, 'dictData.success', 'Successful', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3410, 3410, 'dictData.fail', 'Failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3411, 3411, 'dictData.jobStatus.normal', 'Active', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3412, 3412, 'dictData.jobStatus.pause', 'Inactive', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3413, 3413, 'dictData.jobGroup.Default', 'Default', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3414, 3414, 'dictData.jobGroup.System', 'System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3415, 3415, 'dictData.operType.other', 'Other', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3416, 3416, 'dictData.operType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3417, 3417, 'dictData.operType.edit', 'Modify', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3418, 3418, 'dictData.operType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3419, 3419, 'dictData.operType.auth', 'Authorization', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3420, 3420, 'dictData.operType.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3421, 3421, 'dictData.operType.import', 'Import', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3422, 3422, 'dictData.operType.forced quit', 'Forced Retirement', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3423, 3423, 'dictData.operType.clear', 'Clear', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3424, 3424, 'dictData.trace.interface', 'Interface Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3425, 3425, 'dictData.trace.device', 'Module Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3426, 3426, 'dictData.trace.user', 'User Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3427, 3427, 'dictData.logType.download', 'Download', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3428, 3428, 'dictData.logType.activation', 'Activation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3429, 3429, 'dictData.logType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3430, 3430, 'dictData.logType.other', 'Other', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3431, 3431, 'dictData.logType.back', 'Rollback', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3432, 3432, 'dictData.logType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3433, 3433, 'dictData.logType.distribute', 'Assign', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3434, 3434, 'dictData.logType.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3435, 3435, 'dictData.logType.query', 'Query', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3436, 3436, 'dictData.logType.setup', 'Setup', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3437, 3437, 'dictData.logType.update', 'Update', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3438, 3438, 'dictData.logType.upload', 'Upload', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3439, 3439, 'dictData.logType.view', 'View', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3440, 3440, 'dictData.logType.login', 'Login', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3441, 3441, 'dictData.logType.logout', 'Logout', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3442, 3442, 'dictData.securityLogType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3443, 3443, 'dictData.securityLogType.update', 'Update', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3444, 3444, 'dictData.securityLogType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3445, 3445, 'dictData.securityLogType.lock', 'Locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3446, 3446, 'dictData.securityLogType.unlock', 'Unlock', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3447, 3447, 'dictData.securityLogType.reset', 'Reset', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3448, 3448, 'dictData.securityLogType.deactivate', 'Deactivate', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3449, 3449, 'dictData.jobSaveLog.no', 'No Record', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3450, 3450, 'dictData.jobSaveLog.yes', 'Recorded', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3451, 3451, 'dictData.neVersionStatus.upload', 'Uploaded', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3452, 3452, 'dictData.neVersionStatus.inactive', 'Inactivated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3453, 3453, 'dictData.neVersionStatus.active', 'Activated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3454, 3454, 'dictData.alarmStatus.history', 'Historical Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3455, 3455, 'dictData.alarmStatus.active', 'Active Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3456, 3456, 'dictData.export.code', 'Data Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3457, 3457, 'dictData.export.sort', 'Data Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3458, 3458, 'dictData.export.label', 'Data Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3459, 3459, 'dictData.export.value', 'Data Value', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3460, 3460, 'dictData.export.type', 'Data Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3461, 3461, 'dictData.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3462, 3462, 'dictData.datascope.all', 'All data permissions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3463, 3463, 'dictData.datascope.custom', 'Customized Data Rights', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3464, 3464, 'dictData.datascope.dept', 'Departmental Data Permissions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3465, 3465, 'dictData.datascope.deptAndChid', 'Department and below', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3466, 3466, 'dictData.datascope.self', 'Personal data access only', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3467, 3467, 'dictData.noData', 'There is no accessible dictionary code data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3468, 3468, 'dictData.errLabelExists', 'Failed to manipulate data [{name}], tag name already exists under this dictionary type!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3500, 3500, 'dictType.sys_user_sex', 'User Gender', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3501, 3501, 'dictType.sys_show_hide', 'Menu Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3502, 3502, 'dictType.sys_normal_disable', 'System switches', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3503, 3503, 'dictType.sys_job_status', 'Task Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3504, 3504, 'dictType.sys_job_group', 'Task Grouping', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3505, 3505, 'dictType.sys_yes_no', 'System or not', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3506, 3506, 'dictType.sys_oper_type', 'Operation Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3507, 3507, 'dictType.sys_common_status', 'System Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3508, 3508, 'dictType.trace_type', 'Trace Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3509, 3509, 'dictType.operation_log_type', 'Operation Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3510, 3510, 'dictType.alarm_status', 'Alarm Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3511, 3511, 'dictType.security_log_type', 'Security Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3512, 3512, 'dictType.ne_version_status', 'Network element software version status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3513, 3513, 'dictType.i18n_en', 'Multi-language - English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3514, 3514, 'dictType.i18n_zh', 'Multi-language - Chinese', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3515, 3515, 'dictType.sys_user_sex_remark', 'User gender list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3516, 3516, 'dictType.sys_show_hide_remark', 'Menu Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3517, 3517, 'dictType.sys_normal_disable_remark', 'System switch list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3518, 3518, 'dictType.sys_job_status_remark', 'Task Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3519, 3519, 'dictType.sys_job_group_remark', 'Task Grouping List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3520, 3520, 'dictType.sys_yes_no_remark', 'System whether list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3521, 3521, 'dictType.sys_oper_type_remark', 'Operation type list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3522, 3522, 'dictType.sys_common_status_remark', 'Login Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3523, 3523, 'dictType.trace_type_remark', 'Trace Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3524, 3524, 'dictType.operation_log_type_remark', 'Operation log type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3525, 3525, 'dictType.alarm_status_remark', 'alarm_status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3526, 3526, 'dictType.security_log_type_remark', 'Security Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3527, 3527, 'dictType.ne_version_status_remark', 'Network element software version status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3528, 3528, 'dictType.i18n_en_remark', 'Internationalization - English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3529, 3529, 'dictType.i18n_zh_remark', 'Internationalization - Chinese', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3530, 3530, 'dictType.export.id', 'Dictionary Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3531, 3531, 'dictType.export.name', 'Dictionary Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3532, 3532, 'dictType.export.type', 'Dictionary Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3533, 3533, 'dictType.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3534, 3534, 'dictType.sys_role_datascope', 'System Role Data Range', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3535, 3535, 'dictType.sys_role_datascope_remark', 'System Role Data Range Mapping', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3536, 3536, 'dictType.noData', 'There is no accessible dictionary type data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3537, 3537, 'dictType.errNameExists', 'Failed to manipulate dictionary [{name}], dictionary name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3538, 3538, 'dictType.errTypeExists', 'Failed to manipulate dictionary [{name}], dictionary type already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3600, 3600, 'dept.root', 'System Maintenance Department', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3601, 3601, 'dept.root.item1', 'Operation and Maintenance Department One', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3602, 3602, 'dept.noData', 'There is no accessible department data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3603, 3603, 'dept.errParentDelFlag', 'The parent department [{name}] has been deleted and is not allowed to be added.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3604, 3604, 'dept.errParentStatus', 'Parent department [{name}] is deactivated, additions are not allowed!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3605, 3605, 'dept.errNameExists', 'Manipulate department [{name}] failed, department name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3606, 3606, 'dept.errParentID', 'Failed to operate department [{name}], the parent department cannot be itself.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3607, 3607, 'dept.errHasChildUse', 'Operation failed, the department contains undeactivated sub-departments number: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3608, 3608, 'dept.errHasUserUse', 'Deletion is not allowed, number of users the department has been assigned to: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3630, 3630, 'config.sys.user.initPassword', 'User Management-Account Initial Password', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3631, 3631, 'config.sys.account.captchaEnabled', 'Account self-help-Certification code switch', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3632, 3632, 'config.sys.account.registerUser', 'Account self-service-Whether to enable the user registration function', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3633, 3633, 'config.sys.user.maxRetryCount', 'User Management-Maximum number of password errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3634, 3634, 'config.sys.user.lockTime', 'User Management-Password Lock Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3635, 3635, 'config.monitor.sysResource.storeDays', 'Monitor-System Resources-Data retention time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3636, 3636, 'config.sys.logo.type', 'System Settings-Logo Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3637, 3637, 'config.sys.logo.filePathIcon', 'System Settings-Logo File icon', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3638, 3638, 'config.sys.logo.filePathBrand', 'System Settings-Logo File Brand', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3639, 3639, 'config.sys.loginBackground', 'System Settings-Login Interface Background', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3640, 3640, 'config.sys.title', 'System Settings-System Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3641, 3641, 'config.sys.copyright', 'System Settings-Copyright Notice', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3642, 3642, 'config.sys.user.initPasswordRemark', 'Import user initialization password 123456', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3643, 3643, 'config.sys.account.captchaEnabledRemark', 'Whether to enable the verification code function (true on, false off)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3644, 3644, 'config.sys.account.registerUserRemark', 'Whether to enable the function of registered users (true on, false off)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3645, 3645, 'config.sys.user.maxRetryCountRemark', 'Maximum number of password errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3646, 3646, 'config.sys.user.lockTimeRemark', 'Password lock time in minutes (default 10 minutes)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3647, 3647, 'config.monitor.sysResource.storeDaysRemark', 'Monitor-System Resources-Data retention time, in days. According to the current date, delete the date data information that exceeds the retention time.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3648, 3648, 'config.sys.logo.typeRemark', 'Full image: brand\r\nSmall image: icon', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3649, 3649, 'config.sys.logo.filePathIconRemark', 'File support for web address images and file paths for internal uploads', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3650, 3650, 'config.sys.logo.filePathBrandRemark', 'File support for web address images and paths to internally uploaded files', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3651, 3651, 'config.sys.loginBackgroundRemark', 'The file supports web address images and internal upload file paths with a # in the default background', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3652, 3652, 'config.sys.titleRemark', 'System name length limit of 11-digit string', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3653, 3653, 'config.sys.copyrightRemark', 'Footer fixing strip with copyright notice on the left side', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3654, 3654, 'config..export.id', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3655, 3655, 'config..export.name', 'Config Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3656, 3656, 'config..export.key', 'Config Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3657, 3657, 'config..export.value', 'Config Value', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3658, 3658, 'config..export.type', 'Built In', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3659, 3659, 'config..export.remark', 'Config Description', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3000, 3000, 'i18n', 'English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3001, 3001, 'hello', 'Hello', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3002, 3002, 'menu.system', 'System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3003, 3003, 'menu.monitor', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3004, 3004, 'menu.tools', 'Tools', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3005, 3005, 'menu.config', 'Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3006, 3006, 'menu.ueUser', 'UE', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3007, 3007, 'menu.systemRemark', 'System Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3008, 3008, 'menu.monitorRemark', 'System Monitor Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3009, 3009, 'menu.toolsRemark', 'System Tools Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3010, 3010, 'menu.configRemark', 'OMC Configuration Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3011, 3011, 'menu.ueUserRemark', 'Network Element Terminal Information Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3012, 3012, 'menu.security.user', 'User Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3013, 3013, 'menu.security.role', 'Role Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3014, 3014, 'menu.security.roleUser', 'Assigning Roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3015, 3015, 'menu.system.menu', 'Menu Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3016, 3016, 'menu.security.dept', 'Department Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3017, 3017, 'menu.security.post', 'Position Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3018, 3018, 'menu.system.dictType', 'Dictionary Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3019, 3019, 'menu.system.dictData', 'Dictionary Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3020, 3020, 'menu.system.paramSet', 'Parameter Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3021, 3021, 'menu.system.systemLog', 'System Log', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3022, 3022, 'menu.system.systemInfo', 'System Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3023, 3023, 'menu.system.cacheInfo', 'Cache Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3024, 3024, 'menu.system.cache', 'Cache Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3025, 3025, 'menu.security.onlineUser', 'Online Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3026, 3026, 'menu.system.job', 'Scheduling Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3027, 3027, 'menu.system.jobLog', 'Scheduling Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3028, 3028, 'menu.tools.help', 'Help Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3029, 3029, 'menu.log.operat', 'Operation logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3030, 3030, 'menu.log.login', 'Security logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3031, 3031, 'menu.security.userRemark', 'User Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3032, 3032, 'menu.security.roleRemark', 'Role Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3033, 3033, 'menu.security.roleUserRemark', 'Assign Roles Embedded Hidden Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3034, 3034, 'menu.system.menuRemark', 'Menu Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3035, 3035, 'menu.security.deptRemark', 'Department management menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3036, 3036, 'menu.security.postRemark', 'Job Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3037, 3037, 'menu.system.dictTypeRemark', 'Dictionary management menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3038, 3038, 'menu.system.dictDataRemark', 'Dictionary data embedded hidden menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3039, 3039, 'menu.system.paramSetRemark', 'Parameter setting menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3040, 3040, 'menu.system.systemLogRemark', 'System Log Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3041, 3041, 'menu.system.systemInfoRemark', 'System information menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3042, 3042, 'menu.system.cacheInfoRemark', 'Cache Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3043, 3043, 'menu.system.cacheRemark', 'Cache List Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3044, 3044, 'menu.security.onlineUserRemark', 'Online User Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3045, 3045, 'menu.system.jobRemark', 'Scheduling Tasks menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3046, 3046, 'menu.system.jobLogRemark', 'Scheduling Log Embedded Hidden Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3047, 3047, 'menu.tools.helpRemark', 'Help file menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3048, 3048, 'menu.log.operatRemark', 'Operation log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3049, 3049, 'menu.log.loginRemark', 'Login log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3050, 3050, 'menu.common.query', 'Inquiry', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3051, 3051, 'menu.common.add', 'Add', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3052, 3052, 'menu.common.edit', 'Modify', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3053, 3053, 'menu.common.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3054, 3054, 'menu.common.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3055, 3055, 'menu.common.import', 'Import', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3056, 3056, 'menu.common.reset', 'Reset', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3057, 3057, 'menu.common.unlock', 'Account Unlock', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3058, 3058, 'menu.forcedQuit.batch ', 'Batch Undo', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3059, 3059, 'menu.forcedQuit.single', 'Individual Forced Retirement', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3060, 3060, 'menu.ueUser.authUDM', 'UDM Authentication', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3061, 3061, 'menu.ueUser.subUDM', 'UDM Subscribers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3062, 3062, 'menu.ueUser.authUDMRemark', 'UDM Authentication Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3063, 3063, 'menu.ueUser.subUDMRemark', 'UDM Subscriber Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3064, 3064, 'menu.config.neManage', 'NE Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3066, 3066, 'menu.config.neManageRemark', 'Network Element Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3068, 3068, 'menu.config.backupManage', 'Backup Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3069, 3069, 'menu.config.softwareManage', 'Software Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3070, 3070, 'menu.ueUser.onlineIMS', 'IMS Online Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3071, 3071, 'menu.ueUser.onlineUE', 'UE Online Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3072, 3072, 'menu.ueUser.base5G', 'Radio Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3073, 3073, 'menu.trace', 'Trace', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3074, 3074, 'menu.trace.task', 'Trace Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3075, 3075, 'menu.trace.analysis', 'Signaling Analysis', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3076, 3076, 'menu.trace.pcap', 'Signaling Capture', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3077, 3077, 'menu.fault', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3078, 3078, 'menu.config.backupManageRemark', 'Backup Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3079, 3079, 'menu.config.softwareManageRemark', 'Software Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3080, 3080, 'menu.ueUser.onlineIMSRemark', 'IMS Online User Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3081, 3081, 'menu.ueUser.onlineUERemark', 'UE Online Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3082, 3082, 'menu.ueUser.base5GRemark', '5G Base Station Information Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3083, 3083, 'menu.traceRemark', 'Tracking Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3084, 3084, 'menu.trace.taskRemark', 'Tracking Task Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3085, 3085, 'menu.trace.analysisRemark', 'Signaling Analysis Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3086, 3086, 'menu.trace.pcapRemark', 'Signaling Capture Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3087, 3087, 'menu.faultRemark', 'Fault Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3088, 3088, 'menu.fault.active', 'Active Alarms', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3089, 3089, 'menu.log', 'Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3091, 3091, 'menu.log.mml', 'MML Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3092, 3092, 'menu.log.alarm', 'Alarm Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3094, 3094, 'menu.log.forwarding', 'Alarm Forwarding Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3095, 3095, 'menu.log.set', 'Log Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3097, 3097, 'menu.fault.history', 'Historical Alarms', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3098, 3098, 'menu.fault.set', 'Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3099, 3099, 'menu.perf', 'Performance', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3100, 3100, 'menu.fault.activemRemark', 'Active Alarm Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3101, 3101, 'menu.logRemark', 'Log Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3103, 3103, 'menu.log.mmlRemark', 'Operation MML Log', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3104, 3104, 'menu.log.alarmRemark', 'Alarm Log Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3106, 3106, 'menu.log.forwardingRemark', 'Alarm forward log menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3107, 3107, 'menu.log.setRemark', 'Log Settings menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3109, 3109, 'menu.fault.historyRemark', 'Alarm history menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3110, 3110, 'menu.fault.setRemark', 'Fault General Setup Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3111, 3111, 'menu.perfRemark', 'Performance Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3112, 3112, 'menu.perf.task', 'Performance Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3113, 3113, 'menu.perf.data', 'Performance Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3114, 3114, 'menu.perf.report', 'Performance Reports', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3115, 3115, 'menu.perf.threshold', 'Performance Thresholds', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3116, 3116, 'menu.perf.kpi', 'Key Performance Indicators', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3117, 3117, 'menu.perf.customTarget', 'Custom Metrics', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3118, 3118, 'menu.perf.set', 'Performance General Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3119, 3119, 'menu.mml', 'MML', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3120, 3120, 'menu.mml.ne', 'NE Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3121, 3121, 'menu.mml.udm', 'UDM Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3122, 3122, 'menu.mml.set', 'MML Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3123, 3123, 'menu.mml.omc', 'OMC Operation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3124, 3124, 'menu.perf.taskRemark', 'Task Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3125, 3125, 'menu.perf.dataRemark', 'Performance Data Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3126, 3126, 'menu.perf.reportRemark', 'Performance Report Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3127, 3127, 'menu.perf.thresholdRemark', 'Performance Threshold Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3128, 3128, 'menu.perf.kpiRemark', 'Key Performance Indicator Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3129, 3129, 'menu.perf.customTargetRemark', 'Custom Metrics Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3130, 3130, 'menu.perf.setRemark', 'Performance General Settings Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3131, 3131, 'menu.mmlRemark', 'MML Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3132, 3132, 'menu.mml.neRemark', 'Network Element Operations Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3133, 3133, 'menu.mml.udmRemark', 'Network Element UDM User Data Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3134, 3134, 'menu.mml.setRemark', 'MML Setup Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3135, 3135, 'menu.mml.omcRemark', 'OMC Operation Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3136, 3136, 'menu.config.licenseManage', 'License Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3137, 3137, 'menu.security', 'Security', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3138, 3138, 'menu.system.systemSet', 'System Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3139, 3139, 'menu.system.systemResource', 'System Resources', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3142, 3142, 'menu.config.configNETreeTable', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3143, 3143, 'menu.config.licenseManageRemark', 'License Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3144, 3144, 'menu.securityRemark', 'Security Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3145, 3145, 'menu.system.systemSetRemark', 'System Settings Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3146, 3146, 'menu.system.systemResourceRemark', 'System Resources cpu io network menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3149, 3149, 'menu.config.configNETreeTableRemark', 'Configuring the TreeTable menu with parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3150, 3150, 'menu.noData', 'There is no accessible menu data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3151, 3151, 'menu.errNameExists', 'Failed to operate menu [{name}], menu name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3152, 3152, 'menu.errPathExists', 'Failed to operate menu [{name}], menu routing address already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3153, 3153, 'menu.errFramePath', 'Failed to manipulate menu [{name}], non-internal address should start with http(s)://', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3154, 3154, 'menu.errParentStatus', 'The parent menu is not enabled!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3155, 3155, 'menu.errHasChildUse', 'Operation menu [{name}] failed, number of submenus in use exists: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3156, 3156, 'menu.errHasRoleUse', 'Operation menu [{name}] failed, number of roles the menu has been assigned to: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3400, 3400, 'dictData.sex.un', 'Not selected', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3401, 3401, 'dictData.sex.male', 'Male', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3402, 3402, 'dictData.sex.female', 'Female', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3403, 3403, 'dictData.show', 'Show', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3404, 3404, 'dictData.hide', 'Hide', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3405, 3405, 'dictData.normal', 'Active', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3406, 3406, 'dictData.disable', 'Inactive', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3407, 3407, 'dictData.yes', 'Yes', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3408, 3408, 'dictData.no', 'No', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3409, 3409, 'dictData.success', 'Successful', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3410, 3410, 'dictData.fail', 'Failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3411, 3411, 'dictData.jobStatus.normal', 'Active', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3412, 3412, 'dictData.jobStatus.pause', 'Inactive', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3413, 3413, 'dictData.jobGroup.Default', 'Default', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3414, 3414, 'dictData.jobGroup.System', 'System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3415, 3415, 'dictData.operType.other', 'Other', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3416, 3416, 'dictData.operType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3417, 3417, 'dictData.operType.edit', 'Modify', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3418, 3418, 'dictData.operType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3419, 3419, 'dictData.operType.auth', 'Authorization', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3420, 3420, 'dictData.operType.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3421, 3421, 'dictData.operType.import', 'Import', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3422, 3422, 'dictData.operType.forced quit', 'Forced Retirement', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3423, 3423, 'dictData.operType.clear', 'Clear', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3424, 3424, 'dictData.trace.interface', 'Interface Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3425, 3425, 'dictData.trace.device', 'Module Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3426, 3426, 'dictData.trace.user', 'User Tracing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3427, 3427, 'dictData.logType.download', 'Download', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3428, 3428, 'dictData.logType.activation', 'Activation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3429, 3429, 'dictData.logType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3430, 3430, 'dictData.logType.other', 'Other', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3431, 3431, 'dictData.logType.back', 'Rollback', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3432, 3432, 'dictData.logType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3433, 3433, 'dictData.logType.distribute', 'Assign', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3434, 3434, 'dictData.logType.export', 'Export', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3435, 3435, 'dictData.logType.query', 'Query', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3436, 3436, 'dictData.logType.setup', 'Setup', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3437, 3437, 'dictData.logType.update', 'Update', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3438, 3438, 'dictData.logType.upload', 'Upload', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3439, 3439, 'dictData.logType.view', 'View', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3440, 3440, 'dictData.logType.login', 'Login', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3441, 3441, 'dictData.logType.logout', 'Logout', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3442, 3442, 'dictData.securityLogType.add', 'New', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3443, 3443, 'dictData.securityLogType.update', 'Update', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3444, 3444, 'dictData.securityLogType.delete', 'Delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3445, 3445, 'dictData.securityLogType.lock', 'Locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3446, 3446, 'dictData.securityLogType.unlock', 'Unlock', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3447, 3447, 'dictData.securityLogType.reset', 'Reset', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3448, 3448, 'dictData.securityLogType.deactivate', 'Deactivate', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3449, 3449, 'dictData.jobSaveLog.no', 'No Record', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3450, 3450, 'dictData.jobSaveLog.yes', 'Recorded', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3451, 3451, 'dictData.neVersionStatus.upload', 'Uploaded', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3452, 3452, 'dictData.neVersionStatus.inactive', 'Inactivated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3453, 3453, 'dictData.neVersionStatus.active', 'Activated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3454, 3454, 'dictData.alarmStatus.history', 'Historical Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3455, 3455, 'dictData.alarmStatus.active', 'Active Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3456, 3456, 'dictData.export.code', 'Data Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3457, 3457, 'dictData.export.sort', 'Data Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3458, 3458, 'dictData.export.label', 'Data Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3459, 3459, 'dictData.export.value', 'Data Value', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3460, 3460, 'dictData.export.type', 'Data Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3461, 3461, 'dictData.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3462, 3462, 'dictData.datascope.all', 'All data permissions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3463, 3463, 'dictData.datascope.custom', 'Customized Data Rights', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3464, 3464, 'dictData.datascope.dept', 'Departmental Data Permissions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3465, 3465, 'dictData.datascope.deptAndChid', 'Department and below', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3466, 3466, 'dictData.datascope.self', 'Personal data access only', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3467, 3467, 'dictData.noData', 'There is no accessible dictionary code data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3468, 3468, 'dictData.errLabelExists', 'Failed to manipulate data [{name}], tag name already exists under this dictionary type!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3500, 3500, 'dictType.sys_user_sex', 'User Gender', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3501, 3501, 'dictType.sys_show_hide', 'Menu Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3502, 3502, 'dictType.sys_normal_disable', 'System switches', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3503, 3503, 'dictType.sys_job_status', 'Task Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3504, 3504, 'dictType.sys_job_group', 'Task Grouping', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3505, 3505, 'dictType.sys_yes_no', 'System or not', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3506, 3506, 'dictType.sys_oper_type', 'Operation Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3507, 3507, 'dictType.sys_common_status', 'System Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3508, 3508, 'dictType.trace_type', 'Trace Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3509, 3509, 'dictType.operation_log_type', 'Operation Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3510, 3510, 'dictType.alarm_status', 'Alarm Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3511, 3511, 'dictType.security_log_type', 'Security Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3512, 3512, 'dictType.ne_version_status', 'Network element software version status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3513, 3513, 'dictType.i18n_en', 'Multi-language - English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3514, 3514, 'dictType.i18n_zh', 'Multi-language - Chinese', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3515, 3515, 'dictType.sys_user_sex_remark', 'User gender list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3516, 3516, 'dictType.sys_show_hide_remark', 'Menu Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3517, 3517, 'dictType.sys_normal_disable_remark', 'System switch list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3518, 3518, 'dictType.sys_job_status_remark', 'Task Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3519, 3519, 'dictType.sys_job_group_remark', 'Task Grouping List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3520, 3520, 'dictType.sys_yes_no_remark', 'System whether list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3521, 3521, 'dictType.sys_oper_type_remark', 'Operation type list', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3522, 3522, 'dictType.sys_common_status_remark', 'Login Status List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3523, 3523, 'dictType.trace_type_remark', 'Trace Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3524, 3524, 'dictType.operation_log_type_remark', 'Operation log type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3525, 3525, 'dictType.alarm_status_remark', 'alarm_status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3526, 3526, 'dictType.security_log_type_remark', 'Security Log Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3527, 3527, 'dictType.ne_version_status_remark', 'Network element software version status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3528, 3528, 'dictType.i18n_en_remark', 'Internationalization - English', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3529, 3529, 'dictType.i18n_zh_remark', 'Internationalization - Chinese', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3530, 3530, 'dictType.export.id', 'Dictionary Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3531, 3531, 'dictType.export.name', 'Dictionary Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3532, 3532, 'dictType.export.type', 'Dictionary Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3533, 3533, 'dictType.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3534, 3534, 'dictType.sys_role_datascope', 'System Role Data Range', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3535, 3535, 'dictType.sys_role_datascope_remark', 'System Role Data Range Mapping', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3536, 3536, 'dictType.noData', 'There is no accessible dictionary type data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3537, 3537, 'dictType.errNameExists', 'Failed to manipulate dictionary [{name}], dictionary name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3538, 3538, 'dictType.errTypeExists', 'Failed to manipulate dictionary [{name}], dictionary type already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3600, 3600, 'dept.root', 'System Maintenance Department', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3601, 3601, 'dept.root.item1', 'Operation and Maintenance Department One', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3602, 3602, 'dept.noData', 'There is no accessible department data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3603, 3603, 'dept.errParentDelFlag', 'The parent department [{name}] has been deleted and is not allowed to be added.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3604, 3604, 'dept.errParentStatus', 'Parent department [{name}] is deactivated, additions are not allowed!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3605, 3605, 'dept.errNameExists', 'Manipulate department [{name}] failed, department name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3606, 3606, 'dept.errParentID', 'Failed to operate department [{name}], the parent department cannot be itself.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3607, 3607, 'dept.errHasChildUse', 'Operation failed, the department contains undeactivated sub-departments number: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3608, 3608, 'dept.errHasUserUse', 'Deletion is not allowed, number of users the department has been assigned to: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3630, 3630, 'config.sys.user.initPassword', 'User Management-Account Initial Password', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3631, 3631, 'config.sys.account.captchaEnabled', 'Account self-help-Certification code switch', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3632, 3632, 'config.sys.account.registerUser', 'Account self-service-Whether to enable the user registration function', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3633, 3633, 'config.sys.user.maxRetryCount', 'User Management-Maximum number of password errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3634, 3634, 'config.sys.user.lockTime', 'User Management-Password Lock Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3635, 3635, 'config.monitor.sysResource.storeDays', 'Monitor-System Resources-Data retention time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3636, 3636, 'config.sys.logo.type', 'System Settings-Logo Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3637, 3637, 'config.sys.logo.filePathIcon', 'System Settings-Logo File icon', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3638, 3638, 'config.sys.logo.filePathBrand', 'System Settings-Logo File Brand', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3639, 3639, 'config.sys.loginBackground', 'System Settings-Login Interface Background', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3640, 3640, 'config.sys.title', 'System Settings-System Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3641, 3641, 'config.sys.copyright', 'System Settings-Copyright Notice', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3642, 3642, 'config.sys.user.initPasswordRemark', 'Import user initialization password 123456', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3643, 3643, 'config.sys.account.captchaEnabledRemark', 'Whether to enable the verification code function (true on, false off)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3644, 3644, 'config.sys.account.registerUserRemark', 'Whether to enable the function of registered users (true on, false off)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3645, 3645, 'config.sys.user.maxRetryCountRemark', 'Maximum number of password errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3646, 3646, 'config.sys.user.lockTimeRemark', 'Password lock time in minutes (default 10 minutes)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3647, 3647, 'config.monitor.sysResource.storeDaysRemark', 'Monitor-System Resources-Data retention time, in days. According to the current date, delete the date data information that exceeds the retention time.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3648, 3648, 'config.sys.logo.typeRemark', 'Full image: brand\r\nSmall image: icon', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3649, 3649, 'config.sys.logo.filePathIconRemark', 'File support for web address images and file paths for internal uploads', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3650, 3650, 'config.sys.logo.filePathBrandRemark', 'File support for web address images and paths to internally uploaded files', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3651, 3651, 'config.sys.loginBackgroundRemark', 'The file supports web address images and internal upload file paths with a # in the default background', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3652, 3652, 'config.sys.titleRemark', 'System name length limit of 11-digit string', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3653, 3653, 'config.sys.copyrightRemark', 'Footer fixing strip with copyright notice on the left side', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3654, 3654, 'config..export.id', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3655, 3655, 'config..export.name', 'Config Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3656, 3656, 'config..export.key', 'Config Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3657, 3657, 'config..export.value', 'Config Value', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3658, 3658, 'config..export.type', 'Built In', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3659, 3659, 'config..export.remark', 'Config Description', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrandEMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2023 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3662, 3662, 'config.noData', 'No parameter configuration data is accessible!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3663, 3663, 'config.errKey', 'Invalid key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3664, 3664, 'config.errValueEq', 'Change state is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3665, 3665, 'config.errKeyExists', 'Failed to manipulate parameter configuration [{name}], parameter key name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3666, 3666, 'config.errDelete', 'Deletion of parameter configuration information failed!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3667, 3667, 'config.errType', 'The operation contains built-in parameters and deletion is prohibited!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3700, 3700, 'job.monitor_sys_resource', 'Monitor-System Resources', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3701, 3701, 'job.monitor_sys_resource_remark', 'System Resource CPU/IO/Netword Collection\r\ninterval unit minutes, average minute resource situation\r\nNote: Please pass the value of the parameter interva according to the time unit minutes of the cron expression', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3702, 3702, 'job.delExpiredNeBackup', 'Delete expired NE etc backup file', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3703, 3703, 'job.delExpiredNeBackupRemark', 'Delete expired network element etc backup file, pass in the parameter to keep the backup file for {duration} days, default is 60 days.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3704, 3704, 'job.deleteExpiredAlarmRecord', 'Delete expired historical alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3705, 3705, 'job.deleteExpiredAlarmRecordRemark', 'Delete expired history alarm records, pass in the parameter to keep the history alarm records for {duration} days.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3706, 3706, 'job.deleteExpiredKpiRecord', 'Delete expired KPI records', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3707, 3707, 'job.deleteExpiredKpiRecordRemark', 'KPI record retention for {duration} days', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3708, 3708, 'job.backupEtcFromNE', 'Network Element Configuration Auto Backup Task', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3709, 3709, 'job.backupEtcFromNERemark', 'Automatically backs up the configuration files in the network element\'s etc directory.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3710, 3710, 'job.export.jobID', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3711, 3711, 'job.export.jobName', 'Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3712, 3712, 'job.export.jobGroupName', 'Group', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3713, 3713, 'job.export.invokeTarget', 'Invoke', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3714, 3714, 'job.export.targetParams', 'Incoming Parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3715, 3715, 'job.export.cronExpression', 'Cron', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3716, 3716, 'job.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3717, 3717, 'job.export.remark', 'Description', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3718, 3718, 'job.export.jobLogID', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3719, 3719, 'job.export.jobLogStatus', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3720, 3720, 'job.export.jobLogTime', 'Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3710, 3710, 'job.export.jobID', 'Task Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3721, 3721, 'job.noData', 'There is no accessible scheduling task data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3722, 3722, 'job.errTargetParams', 'Failed to operate scheduling task [{name}] with incorrect task incoming parameter json string!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3723, 3723, 'job.errCronExpression', 'Scheduled task [{name}] failed with incorrect Cron expression!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3724, 3724, 'job.errJobExists', 'Failed to add a new task [{name}] to a scheduling task, same task name in the same task group', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3725, 3725, 'job.statusEq', 'The change state is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3750, 3750, 'role.admin', 'Super Administrator', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3751, 3751, 'role.adminAssign', 'Managers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3752, 3752, 'role.operator', 'Operators', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3753, 3753, 'role.monitor', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3754, 3754, 'role.vistor', 'General Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3755, 3755, 'role.adminRemark', 'Super Administrator, cannot modify or delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3756, 3756, 'role.adminAssignRemark', 'Administrators can perform any operation on the device', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3757, 3757, 'role.operatorRemark', 'Operation and maintenance personnel can read data from the device and configure the device, but cannot perform software upgrade operations on the device.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3758, 3758, 'role.monitorRemark', 'Monitoring personnel Can only read data from the device, but cannot make any settings on the device', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3759, 3759, 'role.vistorRemark', 'Ordinary users can only see system-related information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3760, 3760, 'role.export.id', 'Role Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3761, 3761, 'role.export.name', 'Role Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3762, 3762, 'role.export.key', 'Role Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3763, 3763, 'role.export.sort', 'Role Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3764, 3764, 'role.export.dataScope', 'Role Data Range', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3765, 3765, 'role.export.status', 'Role Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3766, 3766, 'role.noData', 'There is no accessible role data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3767, 3767, 'role.statusEq', 'The change status is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3768, 3768, 'role.errNameExists', 'Manipulating role [{name}] failed, role name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3769, 3769, 'role.errKeyExists', 'Failed to manipulate role [{name}], role key already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3800, 3800, 'post.admin', 'Systems', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3801, 3801, 'post.operator', 'Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3802, 3802, 'post.monitor', 'Operation & Maintenance', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3803, 3803, 'post.visitor', 'Monitoring', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3804, 3804, 'post.export.id', 'Position Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3805, 3805, 'post.export.code', 'Position Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3806, 3806, 'post.export.name', 'Position Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3807, 3807, 'post.export.sort', 'Position Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3808, 3808, 'post.export.status', 'Position Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3809, 3809, 'post.noData', 'There is no accessible post data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3810, 3810, 'post.errNameExists', 'Failed to manipulate post [{name}], post name already exists already exists', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3811, 3811, 'post.errCodeExists', 'Failed to manipulate role [{name}], role key already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3830, 3830, 'user.export.id', 'User Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3831, 3831, 'user.export.name', 'Account', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3832, 3832, 'user.export.nick', 'Nick Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3833, 3833, 'user.export.email', 'E-Mail', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3834, 3834, 'user.export.phone', 'Cell phone number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3835, 3835, 'user.export.sex', 'Gender', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3836, 3836, 'user.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3837, 3837, 'user.export.deptID', 'Department number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3838, 3838, 'user.export.deptName', 'Department', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3839, 3839, 'user.export.deptLeader', 'Department Head', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3840, 3840, 'user.export.loginIP', 'Login Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3841, 3841, 'user.export.loginDate', 'Login Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3842, 3842, 'user.noData', 'No accessible user data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3843, 3843, 'user.statusEq', 'The change status is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3844, 3844, 'user.errPasswdOld', 'Change password failed, old password is wrong', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3845, 3845, 'user.errPasswdEqOld', 'New password cannot be the same as the old one', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3846, 3846, 'user.errPasswd', 'Login password contains at least upper and lower case letters, numbers, special symbols, and not less than 6 digits.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3847, 3847, 'user.errEmailFormat', 'Failed to operate user [{name}], mailbox format error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3848, 3848, 'user.errEmailExists', 'Failed to operate user [{name}], mailbox already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3849, 3849, 'user.errPhoneFormat', 'Failed to operate user [{name}], cell phone number format is wrong.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3850, 3850, 'user.errPhoneExists', 'Failed to operate user [{name}], cell phone number already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3851, 3851, 'user.errNameExists', 'Failed to operate user [{name}], login account already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3852, 3852, 'user.import.mustItem', 'Required list item in form, {text}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3853, 3853, 'user.import.phoneExist', 'User ID: {id} cell phone number {phone} Existing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3854, 3854, 'user.import.phoneFormat', 'User ID: {id} cell phone number {phone} Wrong format', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3855, 3855, 'user.import.emailExist', 'User ID: {id} User Email: {email} Existing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3856, 3856, 'user.import.emailFormat', 'User ID: {id} Email: {email} Wrong Format', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3857, 3857, 'user.import.success', 'User ID:{id} Login name:{name} Imported successfully!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3858, 3858, 'user.import.fail', 'User ID: {id} Login name: {name} Import failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3859, 3859, 'user.import.successUpdate', 'User ID: {id} Login name: {name} Update success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3860, 3860, 'user.import.failUpdate', 'User ID: {id} Login Name: {name} Update Failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3861, 3861, 'user.import.failTip', 'Sorry, the import failed! A total of {num} entries were not formatted correctly, the error is below:', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3862, 3862, 'user.import.successTip', 'Congratulations, the data has been imported successfully! There are {num} entries with the following data:', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3900, 3900, 'app.common.err403', 'Unauthorized access {method} {requestURI}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3901, 3901, 'app.common.err401', 'Invalid authorization', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3902, 3902, 'app.common.err400', 'Parameter error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3903, 3903, 'app.common.exportEmpty', 'Export data record is empty', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3904, 3904, 'app.common.errOperateAdmin', 'Built-in users are not allowed to operate', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3905, 3905, 'app.common.errOperateRole', 'Built-in roles are not allowed to be operated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3906, 3906, 'app.common.deleteSuccess', 'Deleted successfully: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3907, 3907, 'app.common.loginSuccess', 'Login Success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3908, 3908, 'app.common.logoutSuccess', 'Logout Successful', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3909, 3909, 'app.common.errUnlock', 'The user is not locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3910, 3910, 'app.common.noLoginUser', 'Invalid login user information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3911, 3911, 'app.common.rateLimitTip', 'Access too often, please try again later', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3912, 3912, 'log.operate.export.id', 'Log ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3913, 3913, 'log.operate.export.title', 'Module Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3914, 3914, 'log.operate.export.businessType', 'Business Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3915, 3915, 'log.operate.export.method', 'Operation Method', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3916, 3916, 'log.operate.export.requestMethod', 'Request Method', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3917, 3917, 'log.operate.export.operatorType', 'Operation Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3918, 3918, 'log.operate.export.operName', 'Operator', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3919, 3919, 'log.operate.export.deptName', 'Operator Department Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3920, 3920, 'log.operate.export.url', 'Request URL', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3921, 3921, 'log.operate.export.ip', 'Request Host', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3922, 3922, 'log.operate.export.location', 'Request Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3923, 3923, 'log.operate.export.param', 'Request Parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3924, 3924, 'log.operate.export.msg', 'Operation Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3925, 3925, 'log.operate.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3926, 3926, 'log.operate.export.costTime', 'Time Consumption (ms)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3927, 3927, 'log.operate.export.operTime', 'Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3928, 3928, 'log.login.export.id', 'Log ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3929, 3929, 'log.login.export.userName', 'Login Account', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3930, 3930, 'log.login.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3931, 3931, 'log.login.export.ip', 'Login Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3932, 3932, 'log.login.export.location', 'Login Location', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3933, 3933, 'log.login.export.browser', 'Browser', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3934, 3934, 'log.login.export.os', 'Operating System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3935, 3935, 'log.login.export.msg', 'Login Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3936, 3936, 'log.login.export.time', 'Login Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3937, 3937, 'trace.tcpdump.noData', 'Can\'t find {type} {id} information of the corresponding network element.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3938, 3938, 'register.errUsername', 'The account number cannot start with a number, but can contain upper and lower case letters, numbers, and not less than 5 digits.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3939, 3939, 'register.errPasswd', 'The password must contain at least 6 upper and lower case letters, numbers, and special symbols.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3940, 3940, 'register.errPasswdNotEq', 'User confirms password inconsistency', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3941, 3941, 'register.success', 'Successful registration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3942, 3942, 'register.successMsg', '{name} Register Successful {id}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3943, 3943, 'log.operate.title.sysJobLog', 'Scheduling Task Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3944, 3944, 'log.operate.title.sysJob', 'Scheduling Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3945, 3945, 'log.operate.title.tcpdump', 'Signaling Capture', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3946, 3946, 'log.operate.title.sysConfig', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3947, 3947, 'log.operate.title.sysDept', 'Sector', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3948, 3948, 'log.operate.title.sysDictData', 'Dictionary Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3949, 3949, 'log.operate.title.sysDictType', 'Dictionary type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3950, 3950, 'log.operate.title.sysMenu', 'Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3951, 3951, 'log.operate.title.sysPost', 'Positions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3952, 3952, 'log.operate.title.sysProfile', 'Personal Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3953, 3953, 'log.operate.title.sysProfileAvatar', 'Personal avatar', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3954, 3954, 'log.operate.title.sysRole', 'Roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3955, 3955, 'log.operate.title.sysUser', 'User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3956, 3956, 'log.operate.title.sysLogOper', 'Operation Logging', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3957, 3957, 'log.operate.title.sysLogLogin', 'Operation Logging', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3958, 3958, 'login.errNameOrPasswd', 'User does not exist or password is wrong', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3959, 3959, 'login.errDelFlag', 'Sorry, your account has been deleted', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3960, 3960, 'login.errStatus', 'Sorry, your account has been disabled', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3961, 3961, 'login.errRetryPasswd', 'Password was entered incorrectly several times, account has been locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3962, 3962, 'captcha.err', 'Captcha Error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3963, 3963, 'captcha.errValid', 'Captcha is invalid', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3964, 3964, 'app.common.noUaOsBrowser', 'Unknown Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3965, 3965, 'app.common.noIPregion', 'Intranet', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3966, 3966, 'app.common.unknown', 'Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3967, 3967, 'app.common.noNEInfo', 'No matching network element information found', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3968, 3968, 'ne.udm.errImportUserAuthFileFormat', 'Please upload a file in the format of. csv or. txt. English comma separated txt format: imsi, ki, algo, amf, opc', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3969, 3969, 'ne.udm.errExportType', 'Export file types support CSV and txt', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3970, 3970, 'ne.udm.errImportUserSubFileFormat', 'Please upload files in .csv or .txt format. English comma-separated txt format: imsi, msisdn, ambr, nssai, arfb, sar, rat, cn, smf_sel, sm_dat, eps_dat', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3971, 3971, 'log.operate.title.udmAuth', 'UDM Authentication User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3972, 3972, 'log.operate.title.udmSub', 'UDM Subscribers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3973, 3973, 'dictType.active_alarm_type', 'Event Alarm Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3974, 3974, 'dictType.active_alarm_type_remark', 'List of Active Alarm Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3975, 3975, 'dictData.active_alarm_type.communication', 'Communication Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3976, 3976, 'dictData.active_alarm_type.equipment', 'Equipment Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3977, 3977, 'dictData.active_alarm_type.processing', 'Processing Failure Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3978, 3978, 'dictData.active_alarm_type.environmental', 'Environmental Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3979, 3979, 'dictData.active_alarm_type.qualityOfService', 'Quality of Service Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3980, 3980, 'dictType.active_clear_type', 'Alarm Clearing Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3981, 3981, 'dictType.active_clear_type_remark', 'List of Alarm Clearing Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3982, 3982, 'dictData.active_clear_type.notCleared', 'Not cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3983, 3983, 'dictData.active_clear_type.hand', 'Manually cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3984, 3984, 'dictData.active_clear_type.auto', 'Automatically cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3985, 3985, 'dictType.active_ack_state', 'Alarm Acknowledgement Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3986, 3986, 'dictType.active_ack_state_remark', 'Alarm Acknowledgement Type List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3987, 3987, 'dictData.active_ack_state.unconfirmed', 'Not Confirm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3988, 3988, 'dictData.active_ack_state.confirmed', 'Confirm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3989, 3989, 'dictType.active_alarm_severity', 'Severity', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3990, 3990, 'dictType.active_alarm_severity_remark', 'Severity List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3991, 3991, 'dictData.active_alarm_severity.critical', 'Critical', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3992, 3992, 'dictData.active_alarm_severity.major', 'Major', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3993, 3993, 'dictData.active_alarm_severity.minor', 'Minor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3994, 3994, 'dictData.active_alarm_severity.warning', 'Warning', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3995, 3995, 'dictData.active_alarm_severity.event', 'Event', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3996, 3996, 'config.sys.officialUrl', 'System Settings - Official Website Links', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3997, 3997, 'config.sys.helpDoc', 'System Settings-System Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3998, 3998, 'config.sys.officialUrlRemark', 'Default no address with # sign', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (3999, 3999, 'config.sys.helpDocRemark', 'Static file directory address, use {language} to distinguish language files', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4000, 4000, 'log.operate.title.neAction', 'Network Element Processing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4001, 4001, 'log.operate.title.helpDoc', 'System Usage Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4002, 4002, 'menu.ueUser.n3iwf', 'N3IWF Online User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4003, 4003, 'menu.ueUser.pcf', 'User PCC Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4004, 4004, 'menu.system.user.editRole', 'Modifying user roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4005, 4005, 'config.sys.i18nOpen', 'Internationalization Switching', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4006, 4006, 'config.sys.i18nDefault', 'Internationalization Default Language', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4007, 4007, 'user.export.role', 'Role', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4008, 4008, 'menu.system.setting.i18n', 'Internationalization Switch', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4009, 4009, 'menu.system.setting.i18nRemark', 'Internationalized multilingual switching options', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4010, 4010, 'dictType.index_status', 'Home Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4011, 4011, 'dictType.index_status_remark', 'Network element status colors on the home page', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4012, 4012, 'dictType.index_status.normal', 'Normal', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4013, 4013, 'dictType.index_status.abnormal', 'Abnormal', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4014, 4014, 'menu.log.neFile', 'NE Log File', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4015, 4015, 'job.deleteExpiredNeStateRecord', 'Delete Expired NE State Record', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4016, 4016, 'job.deleteExpiredNeStateRecordRemark', 'Delete expired NE state records regularly and keep them for {duration} days by default.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4017, 4017, 'job.getStateFromNE', 'Get state from NEs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4018, 4018, 'job.getStateFromNERemark', 'Get state information from all NEs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4019, 4019, 'job.genNeStateAlarm', 'Network Element Health Check', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4020, 4020, 'job.genNeStateAlarmRemark', 'Health status inspection of network elements, generating alarms in case of abnormalities.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4021, 4021, 'menu.neUser.nssf', 'NSSF Subscription Info', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4022, 4022, 'menu.neUser.nssfAmf', 'NSSF Available AMFs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4023, 4023, 'menu.monitor.topology', 'Topology Info', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4024, 4024, 'menu.monitor.topologyBuild', 'Topological Graph Build', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4025, 4025, 'log.operate.title.chartGraph', 'Topological Graph', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 1, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4026, 4026, 'menu.monitor.topologyArchitecture', 'NE System Topology', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4027, 4027, 'menu.alarm', 'Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4028, 4028, 'menu.topology', 'Topology', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4029, 4029, 'config.sys.lockTime', 'System Settings - Screen Lock Timeout Duration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4030, 4030, 'config.sys.lockTimeRemark', 'Screen lock timeout duration when idle, in seconds.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4031, 4031, 'sys.account.captchaType', 'Account Self Service - Captcha Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4032, 4032, 'sys.account.captchaTypeRemark', 'Using CAPTCHA types (math numeric calculation, char character validation)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4033, 4033, 'menu.dashboard', 'Dashboard', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4034, 4034, 'menu.dashboard.overview', 'Overview', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4035, 4035, 'menu.dashboard.cdr', 'IMS CDR', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4036, 4036, 'dictType.cdr_sip_code', 'CDR SIP Response Code Category Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4037, 4037, 'dictType.cdr_call_type', 'CDR Call Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4038, 4038, 'dictType.ue_auth_code', 'UE Event Authentication Code Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4039, 4039, 'dictType.ue_event_type', 'UE Event Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4040, 4040, 'dictData.cdr_sip_code.200', 'Normal Cleaning', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4041, 4041, 'dictData.cdr_sip_code.403', 'Banned', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4042, 4042, 'dictData.cdr_sip_code.408', 'Request Timeout', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4043, 4043, 'dictData.cdr_sip_code.500', 'Internal Server Error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4044, 4044, 'dictData.cdr_call_type.audio', 'Voice', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4045, 4045, 'dictData.cdr_call_type.video', 'Video', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4046, 4046, 'dictData.ue_auth_code.200', 'Success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4047, 4047, 'dictData.ue_auth_code.001', 'Network Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4048, 4048, 'dictData.ue_auth_code.002', 'Air Interface Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4049, 4049, 'dictData.ue_auth_code.003', 'MAC Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4050, 4050, 'dictData.ue_auth_code.004', 'Synchronization failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4051, 4051, 'dictData.ue_auth_code.005', 'Non-5G Authentication Not Accepted', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4052, 4052, 'dictData.ue_auth_code.006', 'Response Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4053, 4053, 'dictData.ue_auth_code.007', 'Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4054, 4054, 'dictData.ue_event_type.auth', 'Authentication', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4055, 4055, 'dictData.ue_event_type.detach', 'Detach', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4056, 4056, 'dictData.ue_event_type.state', 'CM Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4057, 4057, 'dictType.ue_event_cm_state', 'UE Event CM Status', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4058, 4058, 'dictData.ue_event_cm_state.connected', 'Connected', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4059, 4059, 'dictData.ue_event_cm_state.idle', 'Idle', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4060, 4060, 'dictData.ue_event_cm_state.inactive', 'Inactive', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4061, 4061, 'dictData.cdr_sip_code.404', 'Not Found', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4062, 4062, 'dictData.cdr_sip_code.487', 'Request Terminated', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4063, 4063, 'dictData.cdr_sip_code.503', 'Service Unavailable', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4064, 4064, 'dictData.cdr_sip_code.504', 'Server Time Out', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4065, 4065, 'dictData.cdr_sip_code.603', 'Decline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4066, 4066, 'dictData.cdr_sip_code.606', 'Not Acceptable', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4067, 4067, 'cache.name.user', 'Login User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4068, 4068, 'cache.name.sys_config', 'Parameters Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4069, 4069, 'cache.name.sys_dict', 'Dictionary Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4070, 4070, 'cache.name.captcha_codes', 'Captcha', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4071, 4071, 'cache.name.repeat_submit', 'Resubmit', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4072, 4072, 'cache.name.rate_limit', 'Limit Traffic', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4073, 4073, 'cache.name.pwd_err_cnt', 'Number of Password Errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4074, 4074, 'cache.name.ne_info', 'NE Info Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_dict_data` VALUES (4075, 4075, 'cache.name.ne_data', 'NE Data Management', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4076, 4076, 'dictData.cdr_call_type.sms', 'SMS', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4077, 4077, 'dictData.cdr_sip_code.202', 'Accepted', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4078, 4078, 'dictData.cdr_sip_code.488', 'Not Aceptable Here', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4079, 4079, 'dictData.cdr_sip_code.0', 'Other', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4080, 4080, 'log.operate.title.ws', 'WS Sessions', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4081, 4081, 'log.operate.title.neHost', 'NE Host', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4082, 4082, 'neHost.noData', 'There is no accessible host information data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4083, 4083, 'neHost.errKeyExists', 'Host information operation [{name}] failed, name already exists in the same group', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4084, 4084, 'neHost.errByHostInfo', 'Failed to connect to the host, please check the connection parameters and try again', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4085, 4085, 'dictType.ne_host_type', 'Network element host connection type', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4086, 4086, 'dictType.ne_host_groupId', 'Network element host grouping', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4087, 4087, 'dictType.ne_host_authMode', 'Network element host authentication mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4088, 4088, 'dictData.ne_host_type.ssh', 'SSH', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4089, 4089, 'dictData.ne_host_type.telnet', 'Telnet', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4090, 4090, 'dictData.ne_host_groupId.0', 'Other', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4091, 4091, 'dictData.ne_host_groupId.1', 'Network Elements', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4092, 4092, 'dictData.ne_host_groupId.2', 'System', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4093, 4093, 'dictData.ne_host_authMode.0', 'Password Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4094, 4094, 'dictData.ne_host_authMode.1', 'PrivateKey Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4095, 4095, 'menu.tools.terminal', 'NE Host Terminal', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4096, 4096, 'menu.config.neHost', 'NE Host', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4097, 4097, 'menu.config.neHostCommand', 'NE Host CMD', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4098, 4098, 'log.operate.title.neHostCmd', 'NE Host CMD', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4099, 4099, 'neHostCmd.noData', 'No accessible host command data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4100, 4100, 'neHostCmd.errKeyExists', 'Host command operation [{name}] failed, name already exists in the same group', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4101, 4101, 'dictType.ne_host_cmd_groupId', 'Network element host command grouping', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4102, 4102, 'dictData.ne_host_cmd_groupId.0', 'Default', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4103, 4103, 'dictData.ne_host_cmd_groupId.1', 'Quick Commands', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4104, 4104, 'menu.config.neInfo', 'NE Info', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4105, 4105, 'log.operate.title.neInfo', 'NE Info', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4106, 4106, 'neInfo.noData', 'There is no accessible network element information data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4107, 4107, 'neInfo.errKeyExists', 'NE info operation [{key}] failed, identifier already exists under the same type', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4108, 4108, 'log.operate.title.imsCDR', 'IMS-CDR session', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4109, 4109, 'menu.dashboard.amfUE', 'UE Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4110, 4110, 'log.operate.title.amfUE', 'AMF-UE event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4111, 4111, 'dictData.ne_info_status.0', 'Offline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4112, 4112, 'dictData.ne_info_status.1', 'Online', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4113, 4113, 'dictData.ne_info_status.2', 'Wait Sync', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4114, 4114, 'dictData.ne_info_status.3', '-', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4115, 4115, 'dictType.ne_info_status', 'NE Info State', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4116, 4116, 'menu.ne.neQuickSetup', 'NE Quick Setup', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4117, 4117, 'log.operate.title.neConfig', 'NE Parameter Configuration', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4118, 4118, 'menu.config.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4119, 4119, 'log.operate.title.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4120, 4120, 'menu.config.neSoftware', 'NE Software', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4121, 4121, 'log.operate.title.neSoftware', 'NE Software', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4122, 4122, 'menu.config.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4123, 4123, 'log.operate.title.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4124, 4124, 'dictType.ne_license_status', 'NE License Status', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4125, 4125, 'ne_license_status.0', 'Invalid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4126, 4126, 'ne_license_status.1', 'Valid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4127, 4127, 'menu.dashboard.mocn', 'MOCN', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4128, 4128, 'menu.monitor.cdr', 'CDR', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4129, 4129, 'menu.monitor.event', 'Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4130, 4130, 'post.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4131, 4131, 'role.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4132, 4132, 'dictData.ne_host_authMode.2', 'Confidentiality Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4133, 4133, 'menu.ne.neConfPara5G', 'NE Config Public 5G', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_dict_data` VALUES (4134, 4134, 'menu.fault.event', 'Event Notification', 'i18n_en', NULL, NULL, '1', 'supervisor', 1717051688260, '', 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3662, 3662, 'config.noData', 'No parameter configuration data is accessible!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3663, 3663, 'config.errKey', 'Invalid key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3664, 3664, 'config.errValueEq', 'Change state is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3665, 3665, 'config.errKeyExists', 'Failed to manipulate parameter configuration [{name}], parameter key name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3666, 3666, 'config.errDelete', 'Deletion of parameter configuration information failed!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3667, 3667, 'config.errType', 'The operation contains built-in parameters and deletion is prohibited!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3700, 3700, 'job.monitor_sys_resource', 'Monitor-System Resources', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3701, 3701, 'job.monitor_sys_resource_remark', 'System Resource CPU/IO/Netword Collection\r\ninterval unit minutes, average minute resource situation\r\nNote: Please pass the value of the parameter interva according to the time unit minutes of the cron expression', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3702, 3702, 'job.delExpiredNeBackup', 'Delete expired NE etc backup file', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3703, 3703, 'job.delExpiredNeBackupRemark', 'Delete expired network element etc backup file, pass in the parameter to keep the backup file for {duration} days, default is 60 days.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3704, 3704, 'job.deleteExpiredAlarmRecord', 'Delete expired historical alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3705, 3705, 'job.deleteExpiredAlarmRecordRemark', 'Delete expired history alarm records, pass in the parameter to keep the history alarm records for {duration} days.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3706, 3706, 'job.deleteExpiredKpiRecord', 'Delete expired KPI records', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3707, 3707, 'job.deleteExpiredKpiRecordRemark', 'KPI record retention for {duration} days', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3708, 3708, 'job.backupEtcFromNE', 'Network Element Configuration Auto Backup Task', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3709, 3709, 'job.backupEtcFromNERemark', 'Automatically backs up the configuration files in the network element\'s etc directory.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3710, 3710, 'job.export.jobID', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3711, 3711, 'job.export.jobName', 'Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3712, 3712, 'job.export.jobGroupName', 'Group', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3713, 3713, 'job.export.invokeTarget', 'Invoke', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3714, 3714, 'job.export.targetParams', 'Incoming Parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3715, 3715, 'job.export.cronExpression', 'Cron', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3716, 3716, 'job.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3717, 3717, 'job.export.remark', 'Description', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3718, 3718, 'job.export.jobLogID', 'ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3719, 3719, 'job.export.jobLogStatus', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3720, 3720, 'job.export.jobLogTime', 'Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3710, 3710, 'job.export.jobID', 'Task Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3721, 3721, 'job.noData', 'There is no accessible scheduling task data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3722, 3722, 'job.errTargetParams', 'Failed to operate scheduling task [{name}] with incorrect task incoming parameter json string!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3723, 3723, 'job.errCronExpression', 'Scheduled task [{name}] failed with incorrect Cron expression!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3724, 3724, 'job.errJobExists', 'Failed to add a new task [{name}] to a scheduling task, same task name in the same task group', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3725, 3725, 'job.statusEq', 'The change state is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3750, 3750, 'role.admin', 'Super Administrator', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3751, 3751, 'role.adminAssign', 'Managers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3752, 3752, 'role.operator', 'Operators', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3753, 3753, 'role.monitor', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3754, 3754, 'role.vistor', 'General Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3755, 3755, 'role.adminRemark', 'Super Administrator, cannot modify or delete', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3756, 3756, 'role.adminAssignRemark', 'Administrators can perform any operation on the device', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3757, 3757, 'role.operatorRemark', 'Operation and maintenance personnel can read data from the device and configure the device, but cannot perform software upgrade operations on the device.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3758, 3758, 'role.monitorRemark', 'Monitoring personnel Can only read data from the device, but cannot make any settings on the device', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3759, 3759, 'role.vistorRemark', 'Ordinary users can only see system-related information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3760, 3760, 'role.export.id', 'Role Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3761, 3761, 'role.export.name', 'Role Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3762, 3762, 'role.export.key', 'Role Key', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3763, 3763, 'role.export.sort', 'Role Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3764, 3764, 'role.export.dataScope', 'Role Data Range', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3765, 3765, 'role.export.status', 'Role Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3766, 3766, 'role.noData', 'There is no accessible role data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3767, 3767, 'role.statusEq', 'The change status is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3768, 3768, 'role.errNameExists', 'Manipulating role [{name}] failed, role name already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3769, 3769, 'role.errKeyExists', 'Failed to manipulate role [{name}], role key already exists!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3800, 3800, 'post.admin', 'Systems', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3801, 3801, 'post.operator', 'Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3802, 3802, 'post.monitor', 'Operation & Maintenance', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3803, 3803, 'post.visitor', 'Monitoring', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3804, 3804, 'post.export.id', 'Position Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3805, 3805, 'post.export.code', 'Position Code', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3806, 3806, 'post.export.name', 'Position Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3807, 3807, 'post.export.sort', 'Position Sort', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3808, 3808, 'post.export.status', 'Position Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3809, 3809, 'post.noData', 'There is no accessible post data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3810, 3810, 'post.errNameExists', 'Failed to manipulate post [{name}], post name already exists already exists', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3811, 3811, 'post.errCodeExists', 'Failed to manipulate role [{name}], role key already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3830, 3830, 'user.export.id', 'User Number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3831, 3831, 'user.export.name', 'Account', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3832, 3832, 'user.export.nick', 'Nick Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3833, 3833, 'user.export.email', 'E-Mail', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3834, 3834, 'user.export.phone', 'Cell phone number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3835, 3835, 'user.export.sex', 'Gender', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3836, 3836, 'user.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3837, 3837, 'user.export.deptID', 'Department number', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3838, 3838, 'user.export.deptName', 'Department', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3839, 3839, 'user.export.deptLeader', 'Department Head', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3840, 3840, 'user.export.loginIP', 'Login Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3841, 3841, 'user.export.loginDate', 'Login Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3842, 3842, 'user.noData', 'No accessible user data!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3843, 3843, 'user.statusEq', 'The change status is equal to the old value!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3844, 3844, 'user.errPasswdOld', 'Change password failed, old password is wrong', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3845, 3845, 'user.errPasswdEqOld', 'New password cannot be the same as the old one', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3846, 3846, 'user.errPasswd', 'Login password contains at least upper and lower case letters, numbers, special symbols, and not less than 6 digits.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3847, 3847, 'user.errEmailFormat', 'Failed to operate user [{name}], mailbox format error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3848, 3848, 'user.errEmailExists', 'Failed to operate user [{name}], mailbox already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3849, 3849, 'user.errPhoneFormat', 'Failed to operate user [{name}], cell phone number format is wrong.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3850, 3850, 'user.errPhoneExists', 'Failed to operate user [{name}], cell phone number already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3851, 3851, 'user.errNameExists', 'Failed to operate user [{name}], login account already exists.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3852, 3852, 'user.import.mustItem', 'Required list item in form, {text}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3853, 3853, 'user.import.phoneExist', 'User ID: {id} cell phone number {phone} Existing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3854, 3854, 'user.import.phoneFormat', 'User ID: {id} cell phone number {phone} Wrong format', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3855, 3855, 'user.import.emailExist', 'User ID: {id} User Email: {email} Existing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3856, 3856, 'user.import.emailFormat', 'User ID: {id} Email: {email} Wrong Format', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3857, 3857, 'user.import.success', 'User ID:{id} Login name:{name} Imported successfully!', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3858, 3858, 'user.import.fail', 'User ID: {id} Login name: {name} Import failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3859, 3859, 'user.import.successUpdate', 'User ID: {id} Login name: {name} Update success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3860, 3860, 'user.import.failUpdate', 'User ID: {id} Login Name: {name} Update Failed', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3861, 3861, 'user.import.failTip', 'Sorry, the import failed! A total of {num} entries were not formatted correctly, the error is below:', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3862, 3862, 'user.import.successTip', 'Congratulations, the data has been imported successfully! There are {num} entries with the following data:', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3900, 3900, 'app.common.err403', 'Unauthorized access {method} {requestURI}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3901, 3901, 'app.common.err401', 'Invalid authorization', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3902, 3902, 'app.common.err400', 'Parameter error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3903, 3903, 'app.common.exportEmpty', 'Export data record is empty', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3904, 3904, 'app.common.errOperateAdmin', 'Built-in users are not allowed to operate', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3905, 3905, 'app.common.errOperateRole', 'Built-in roles are not allowed to be operated', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3906, 3906, 'app.common.deleteSuccess', 'Deleted successfully: {num}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3907, 3907, 'app.common.loginSuccess', 'Login Success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3908, 3908, 'app.common.logoutSuccess', 'Logout Successful', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3909, 3909, 'app.common.errUnlock', 'The user is not locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3910, 3910, 'app.common.noLoginUser', 'Invalid login user information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3911, 3911, 'app.common.rateLimitTip', 'Access too often, please try again later', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3912, 3912, 'log.operate.export.id', 'Log ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3913, 3913, 'log.operate.export.title', 'Module Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3914, 3914, 'log.operate.export.businessType', 'Business Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3915, 3915, 'log.operate.export.method', 'Operation Method', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3916, 3916, 'log.operate.export.requestMethod', 'Request Method', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3917, 3917, 'log.operate.export.operatorType', 'Operation Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3918, 3918, 'log.operate.export.operName', 'Operator', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3919, 3919, 'log.operate.export.deptName', 'Operator Department Name', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3920, 3920, 'log.operate.export.url', 'Request URL', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3921, 3921, 'log.operate.export.ip', 'Request Host', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3922, 3922, 'log.operate.export.location', 'Request Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3923, 3923, 'log.operate.export.param', 'Request Parameters', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3924, 3924, 'log.operate.export.msg', 'Operation Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3925, 3925, 'log.operate.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3926, 3926, 'log.operate.export.costTime', 'Time Consumption (ms)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3927, 3927, 'log.operate.export.operTime', 'Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3928, 3928, 'log.login.export.id', 'Log ID', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3929, 3929, 'log.login.export.userName', 'Login Account', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3930, 3930, 'log.login.export.status', 'Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3931, 3931, 'log.login.export.ip', 'Login Address', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3932, 3932, 'log.login.export.location', 'Login Location', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3933, 3933, 'log.login.export.browser', 'Browser', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3934, 3934, 'log.login.export.os', 'Operating System', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3935, 3935, 'log.login.export.msg', 'Login Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3936, 3936, 'log.login.export.time', 'Login Time', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3937, 3937, 'trace.tcpdump.noData', 'Can\'t find {type} {id} information of the corresponding network element.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3938, 3938, 'register.errUsername', 'The account number cannot start with a number, but can contain upper and lower case letters, numbers, and not less than 5 digits.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3939, 3939, 'register.errPasswd', 'The password must contain at least 6 upper and lower case letters, numbers, and special symbols.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3940, 3940, 'register.errPasswdNotEq', 'User confirms password inconsistency', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3941, 3941, 'register.success', 'Successful registration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3942, 3942, 'register.successMsg', '{name} Register Successful {id}', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3943, 3943, 'log.operate.title.sysJobLog', 'Scheduling Task Logs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3944, 3944, 'log.operate.title.sysJob', 'Scheduling Tasks', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3945, 3945, 'log.operate.title.tcpdump', 'Signaling Capture', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3946, 3946, 'log.operate.title.sysConfig', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3947, 3947, 'log.operate.title.sysDept', 'Sector', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3948, 3948, 'log.operate.title.sysDictData', 'Dictionary Data', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3949, 3949, 'log.operate.title.sysDictType', 'Dictionary type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3950, 3950, 'log.operate.title.sysMenu', 'Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3951, 3951, 'log.operate.title.sysPost', 'Positions', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3952, 3952, 'log.operate.title.sysProfile', 'Personal Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3953, 3953, 'log.operate.title.sysProfileAvatar', 'Personal avatar', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3954, 3954, 'log.operate.title.sysRole', 'Roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3955, 3955, 'log.operate.title.sysUser', 'User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3956, 3956, 'log.operate.title.sysLogOper', 'Operation Logging', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3957, 3957, 'log.operate.title.sysLogLogin', 'Operation Logging', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3958, 3958, 'login.errNameOrPasswd', 'User does not exist or password is wrong', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3959, 3959, 'login.errDelFlag', 'Sorry, your account has been deleted', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3960, 3960, 'login.errStatus', 'Sorry, your account has been disabled', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3961, 3961, 'login.errRetryPasswd', 'Password was entered incorrectly several times, account has been locked', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3962, 3962, 'captcha.err', 'Captcha Error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3963, 3963, 'captcha.errValid', 'Captcha is invalid', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3964, 3964, 'app.common.noUaOsBrowser', 'Unknown Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3965, 3965, 'app.common.noIPregion', 'Intranet', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3966, 3966, 'app.common.unknown', 'Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3967, 3967, 'app.common.noNEInfo', 'No matching network element information found', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3968, 3968, 'ne.udm.errImportUserAuthFileFormat', 'Please upload a file in the format of. csv or. txt. English comma separated txt format: imsi, ki, algo, amf, opc', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3969, 3969, 'ne.udm.errExportType', 'Export file types support CSV and txt', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3970, 3970, 'ne.udm.errImportUserSubFileFormat', 'Please upload files in .csv or .txt format. English comma-separated txt format: imsi, msisdn, ambr, nssai, arfb, sar, rat, cn, smf_sel, sm_dat, eps_dat', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3971, 3971, 'log.operate.title.udmAuth', 'UDM Authentication User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3972, 3972, 'log.operate.title.udmSub', 'UDM Subscribers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3973, 3973, 'dictType.active_alarm_type', 'Event Alarm Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3974, 3974, 'dictType.active_alarm_type_remark', 'List of Active Alarm Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3975, 3975, 'dictData.active_alarm_type.communication', 'Communication Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3976, 3976, 'dictData.active_alarm_type.equipment', 'Equipment Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3977, 3977, 'dictData.active_alarm_type.processing', 'Processing Failure Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3978, 3978, 'dictData.active_alarm_type.environmental', 'Environmental Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3979, 3979, 'dictData.active_alarm_type.qualityOfService', 'Quality of Service Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3980, 3980, 'dictType.active_clear_type', 'Alarm Clearing Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3981, 3981, 'dictType.active_clear_type_remark', 'List of Alarm Clearing Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3982, 3982, 'dictData.active_clear_type.notCleared', 'Not cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3983, 3983, 'dictData.active_clear_type.hand', 'Manually cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3984, 3984, 'dictData.active_clear_type.auto', 'Automatically cleared', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3985, 3985, 'dictType.active_ack_state', 'Alarm Acknowledgement Types', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3986, 3986, 'dictType.active_ack_state_remark', 'Alarm Acknowledgement Type List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3987, 3987, 'dictData.active_ack_state.unconfirmed', 'Not Confirm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3988, 3988, 'dictData.active_ack_state.confirmed', 'Confirm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3989, 3989, 'dictType.active_alarm_severity', 'Severity', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3990, 3990, 'dictType.active_alarm_severity_remark', 'Severity List', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3991, 3991, 'dictData.active_alarm_severity.critical', 'Critical', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3992, 3992, 'dictData.active_alarm_severity.major', 'Major', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3993, 3993, 'dictData.active_alarm_severity.minor', 'Minor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3994, 3994, 'dictData.active_alarm_severity.warning', 'Warning', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3995, 3995, 'dictData.active_alarm_severity.event', 'Event', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3996, 3996, 'config.sys.officialUrl', 'System Settings - Official Website Links', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3997, 3997, 'config.sys.helpDoc', 'System Settings-System Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3998, 3998, 'config.sys.officialUrlRemark', 'Default no address with # sign', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (3999, 3999, 'config.sys.helpDocRemark', 'Static file directory address, use {language} to distinguish language files', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4000, 4000, 'log.operate.title.neAction', 'Network Element Processing', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4001, 4001, 'log.operate.title.helpDoc', 'System Usage Documentation', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4002, 4002, 'menu.ueUser.n3iwf', 'N3IWF Online User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4003, 4003, 'menu.ueUser.pcf', 'User PCC Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4004, 4004, 'menu.system.user.editRole', 'Modifying user roles', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4005, 4005, 'config.sys.i18nOpen', 'Internationalization Switching', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4006, 4006, 'config.sys.i18nDefault', 'Internationalization Default Language', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4007, 4007, 'user.export.role', 'Role', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4008, 4008, 'menu.system.setting.i18n', 'Internationalization Switch', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4009, 4009, 'menu.system.setting.i18nRemark', 'Internationalized multilingual switching options', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4010, 4010, 'dictType.index_status', 'Home Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4011, 4011, 'dictType.index_status_remark', 'Network element status colors on the home page', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4012, 4012, 'dictType.index_status.normal', 'Normal', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4013, 4013, 'dictType.index_status.abnormal', 'Abnormal', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4014, 4014, 'menu.log.neFile', 'NE Log File', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4015, 4015, 'job.deleteExpiredNeStateRecord', 'Delete Expired NE State Record', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4016, 4016, 'job.deleteExpiredNeStateRecordRemark', 'Delete expired NE state records regularly and keep them for {duration} days by default.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4017, 4017, 'job.getStateFromNE', 'Get state from NEs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4018, 4018, 'job.getStateFromNERemark', 'Get state information from all NEs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4019, 4019, 'job.genNeStateAlarm', 'Network Element Health Check', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4020, 4020, 'job.genNeStateAlarmRemark', 'Health status inspection of network elements, generating alarms in case of abnormalities.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4021, 4021, 'menu.neUser.nssf', 'NSSF Subscription Info', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4022, 4022, 'menu.neUser.nssfAmf', 'NSSF Available AMFs', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4023, 4023, 'menu.monitor.topology', 'Topology Info', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4024, 4024, 'menu.monitor.topologyBuild', 'Topological Graph Build', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4025, 4025, 'log.operate.title.chartGraph', 'Topological Graph', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 1, NULL); +REPLACE INTO `sys_dict_data` VALUES (4026, 4026, 'menu.monitor.topologyArchitecture', 'NE System Topology', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4027, 4027, 'menu.alarm', 'Alarm', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4028, 4028, 'menu.topology', 'Topology', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4029, 4029, 'config.sys.lockTime', 'System Settings - Screen Lock Timeout Duration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4030, 4030, 'config.sys.lockTimeRemark', 'Screen lock timeout duration when idle, in seconds.', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4031, 4031, 'sys.account.captchaType', 'Account Self Service - Captcha Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4032, 4032, 'sys.account.captchaTypeRemark', 'Using CAPTCHA types (math numeric calculation, char character validation)', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4033, 4033, 'menu.dashboard', 'Dashboard', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4034, 4034, 'menu.dashboard.overview', 'Overview', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4035, 4035, 'menu.dashboard.cdr', 'IMS CDR', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4036, 4036, 'dictType.cdr_sip_code', 'CDR SIP Response Code Category Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4037, 4037, 'dictType.cdr_call_type', 'CDR Call Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4038, 4038, 'dictType.ue_auth_code', 'UE Event Authentication Code Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4039, 4039, 'dictType.ue_event_type', 'UE Event Type', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4040, 4040, 'dictData.cdr_sip_code.200', 'Normal Cleaning', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4041, 4041, 'dictData.cdr_sip_code.403', 'Banned', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4042, 4042, 'dictData.cdr_sip_code.408', 'Request Timeout', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4043, 4043, 'dictData.cdr_sip_code.500', 'Internal Server Error', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4044, 4044, 'dictData.cdr_call_type.audio', 'Voice', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4045, 4045, 'dictData.cdr_call_type.video', 'Video', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4046, 4046, 'dictData.ue_auth_code.200', 'Success', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4047, 4047, 'dictData.ue_auth_code.001', 'Network Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4048, 4048, 'dictData.ue_auth_code.002', 'Air Interface Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4049, 4049, 'dictData.ue_auth_code.003', 'MAC Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4050, 4050, 'dictData.ue_auth_code.004', 'Synchronization failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4051, 4051, 'dictData.ue_auth_code.005', 'Non-5G Authentication Not Accepted', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4052, 4052, 'dictData.ue_auth_code.006', 'Response Failure', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4053, 4053, 'dictData.ue_auth_code.007', 'Unknown', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4054, 4054, 'dictData.ue_event_type.auth', 'Authentication', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4055, 4055, 'dictData.ue_event_type.detach', 'Detach', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4056, 4056, 'dictData.ue_event_type.state', 'CM Status', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4057, 4057, 'dictType.ue_event_cm_state', 'UE Event CM Status', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4058, 4058, 'dictData.ue_event_cm_state.connected', 'Connected', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4059, 4059, 'dictData.ue_event_cm_state.idle', 'Idle', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4060, 4060, 'dictData.ue_event_cm_state.inactive', 'Inactive', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4061, 4061, 'dictData.cdr_sip_code.404', 'Not Found', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4062, 4062, 'dictData.cdr_sip_code.487', 'Request Terminated', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4063, 4063, 'dictData.cdr_sip_code.503', 'Service Unavailable', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4064, 4064, 'dictData.cdr_sip_code.504', 'Server Time Out', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4065, 4065, 'dictData.cdr_sip_code.603', 'Decline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4066, 4066, 'dictData.cdr_sip_code.606', 'Not Acceptable', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4067, 4067, 'cache.name.user', 'Login User', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4068, 4068, 'cache.name.sys_config', 'Parameters Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4069, 4069, 'cache.name.sys_dict', 'Dictionary Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4070, 4070, 'cache.name.captcha_codes', 'Captcha', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4071, 4071, 'cache.name.repeat_submit', 'Resubmit', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4072, 4072, 'cache.name.rate_limit', 'Limit Traffic', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4073, 4073, 'cache.name.pwd_err_cnt', 'Number of Password Errors', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4074, 4074, 'cache.name.ne_info', 'NE Info Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL); +REPLACE INTO `sys_dict_data` VALUES (4075, 4075, 'cache.name.ne_data', 'NE Data Management', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4076, 4076, 'dictData.cdr_call_type.sms', 'SMS', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4077, 4077, 'dictData.cdr_sip_code.202', 'Accepted', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4078, 4078, 'dictData.cdr_sip_code.488', 'Not Aceptable Here', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4079, 4079, 'dictData.cdr_sip_code.0', 'Other', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4080, 4080, 'log.operate.title.ws', 'WS Sessions', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4081, 4081, 'log.operate.title.neHost', 'NE Host', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4082, 4082, 'neHost.noData', 'There is no accessible host information data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4083, 4083, 'neHost.errKeyExists', 'Host information operation [{name}] failed, name already exists in the same group', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4084, 4084, 'neHost.errByHostInfo', 'Failed to connect to the host, please check the connection parameters and try again', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4085, 4085, 'dictType.ne_host_type', 'Network element host connection type', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4086, 4086, 'dictType.ne_host_groupId', 'Network element host grouping', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4087, 4087, 'dictType.ne_host_authMode', 'Network element host authentication mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4088, 4088, 'dictData.ne_host_type.ssh', 'SSH', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4089, 4089, 'dictData.ne_host_type.telnet', 'Telnet', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4090, 4090, 'dictData.ne_host_groupId.0', 'Other', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4091, 4091, 'dictData.ne_host_groupId.1', 'Network Elements', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4092, 4092, 'dictData.ne_host_groupId.2', 'System', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4093, 4093, 'dictData.ne_host_authMode.0', 'Password Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4094, 4094, 'dictData.ne_host_authMode.1', 'PrivateKey Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4095, 4095, 'menu.tools.terminal', 'NE Host Terminal', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4096, 4096, 'menu.config.neHost', 'NE Host', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4097, 4097, 'menu.config.neHostCommand', 'NE Host CMD', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4098, 4098, 'log.operate.title.neHostCmd', 'NE Host CMD', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4099, 4099, 'neHostCmd.noData', 'No accessible host command data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4100, 4100, 'neHostCmd.errKeyExists', 'Host command operation [{name}] failed, name already exists in the same group', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4101, 4101, 'dictType.ne_host_cmd_groupId', 'Network element host command grouping', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4102, 4102, 'dictData.ne_host_cmd_groupId.0', 'Default', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4103, 4103, 'dictData.ne_host_cmd_groupId.1', 'Quick Commands', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4104, 4104, 'menu.config.neInfo', 'NE Info', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4105, 4105, 'log.operate.title.neInfo', 'NE Info', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4106, 4106, 'neInfo.noData', 'There is no accessible network element information data!', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4107, 4107, 'neInfo.errKeyExists', 'NE info operation [{key}] failed, identifier already exists under the same type', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4108, 4108, 'log.operate.title.imsCDR', 'IMS-CDR session', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4109, 4109, 'menu.dashboard.amfUE', 'UE Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4110, 4110, 'log.operate.title.amfUE', 'AMF-UE event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4111, 4111, 'dictData.ne_info_status.0', 'Offline', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4112, 4112, 'dictData.ne_info_status.1', 'Online', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4113, 4113, 'dictData.ne_info_status.2', 'Wait Sync', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4114, 4114, 'dictData.ne_info_status.3', '-', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4115, 4115, 'dictType.ne_info_status', 'NE Info State', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4116, 4116, 'menu.ne.neQuickSetup', 'NE Quick Setup', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4117, 4117, 'log.operate.title.neConfig', 'NE Parameter Configuration', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4118, 4118, 'menu.config.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4119, 4119, 'log.operate.title.neLicense', 'NE License', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4120, 4120, 'menu.config.neSoftware', 'NE Software', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4121, 4121, 'log.operate.title.neSoftware', 'NE Software', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4122, 4122, 'menu.config.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4123, 4123, 'log.operate.title.neVersion', 'Ne Version', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4124, 4124, 'dictType.ne_license_status', 'NE License Status', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4125, 4125, 'dictData.ne_license_status.0', 'Invalid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4126, 4126, 'dictData.ne_license_status.1', 'Valid', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4127, 4127, 'menu.dashboard.mocn', 'MOCN', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4128, 4128, 'menu.monitor.cdr', 'CDR', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4129, 4129, 'menu.monitor.event', 'Event', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4130, 4130, 'post.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4131, 4131, 'role.export.time', 'Creation Time', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4132, 4132, 'dictData.ne_host_authMode.2', 'Confidentiality Auth Mode', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4133, 4133, 'menu.ne.neConfPara5G', 'NE Public Config', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4134, 4134, 'dictData.ne_version_status.0', 'Nothing', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4135, 4135, 'dictData.ne_version_status.1', 'Updated', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4136, 4136, 'dictData.ne_version_status.2', 'Previous', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4137, 4137, 'dictData.ne_version_status.3', 'Has New', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); +REPLACE INTO `sys_dict_data` VALUES (4138, 4138, 'menu.fault.event', 'Event Notification', 'i18n_en', '', '', '1', 'supervisor', 1705550000000, '', 0, ''); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/upgrade/upg_sys_dict_type.sql b/database/upgrade/upg_sys_dict_type.sql index d67c2c94..a8ab8669 100644 --- a/database/upgrade/upg_sys_dict_type.sql +++ b/database/upgrade/upg_sys_dict_type.sql @@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `sys_dict_type` ( `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', PRIMARY KEY (`dict_id`) USING BTREE, UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 115 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_dict_type diff --git a/database/install/role_permission.sql b/database/upgrade/upg_sys_job_log.sql similarity index 62% rename from database/install/role_permission.sql rename to database/upgrade/upg_sys_job_log.sql index faa27a1e..b35d00e1 100644 --- a/database/install/role_permission.sql +++ b/database/upgrade/upg_sys_job_log.sql @@ -16,24 +16,23 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `role_permission` +-- Table structure for table `sys_job_log` -- -DROP TABLE IF EXISTS `role_permission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `role_permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `r_name` varchar(255) DEFAULT NULL, - `p_name` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `create_at` datetime DEFAULT current_timestamp(), - PRIMARY KEY (`id`) USING BTREE, - KEY `r_name` (`r_name`) USING BTREE, - KEY `role_permission_ibfk_2` (`p_name`) USING BTREE, - CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`r_name`) REFERENCES `role` (`role_name`), - CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`p_name`) REFERENCES `permission` (`permission_name`) -) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-已使用sys_menu菜单权限标识'; +CREATE TABLE IF NOT EXISTS `sys_job_log` ( + `job_log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', + `job_name` varchar(64) NOT NULL COMMENT '任务名称', + `job_group` varchar(64) NOT NULL COMMENT '任务组名', + `invoke_target` varchar(64) NOT NULL COMMENT '调用目标字符串', + `target_params` varchar(500) DEFAULT '' COMMENT '调用目标传入参数', + `job_msg` varchar(500) DEFAULT '' COMMENT '日志信息', + `status` char(1) DEFAULT '0' COMMENT '执行状态(0失败 1正常)', + `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', + `cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间(毫秒)', + PRIMARY KEY (`job_log_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='调度任务调度日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/user_menu.sql b/database/upgrade/upg_sys_log_login.sql similarity index 64% rename from database/install/user_menu.sql rename to database/upgrade/upg_sys_log_login.sql index f809c71e..c0ca3f10 100644 --- a/database/install/user_menu.sql +++ b/database/upgrade/upg_sys_log_login.sql @@ -16,21 +16,23 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `user_menu` +-- Table structure for table `sys_log_login` -- -DROP TABLE IF EXISTS `user_menu`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_menu` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, - `menu_tag` varchar(64) DEFAULT '', - `sort_id` int(11) DEFAULT NULL, - `lang_tag` varchar(16) DEFAULT NULL, - `menu_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-已使用sys_menu'; +CREATE TABLE IF NOT EXISTS `sys_log_login` ( + `login_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '登录ID', + `user_name` varchar(50) DEFAULT '' COMMENT '用户账号', + `ipaddr` varchar(128) DEFAULT '' COMMENT '登录IP地址', + `login_location` varchar(50) DEFAULT '' COMMENT '登录地点', + `browser` varchar(50) DEFAULT '' COMMENT '浏览器类型', + `os` varchar(50) DEFAULT '' COMMENT '操作系统', + `status` char(1) DEFAULT '0' COMMENT '登录状态(0失败 1成功)', + `msg` varchar(255) DEFAULT '' COMMENT '提示消息', + `login_time` bigint(20) DEFAULT 0 COMMENT '登录时间', + PRIMARY KEY (`login_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统登录日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/install/user_role.sql b/database/upgrade/upg_sys_log_operate.sql similarity index 51% rename from database/install/user_role.sql rename to database/upgrade/upg_sys_log_operate.sql index 59a22523..13d73a0a 100644 --- a/database/install/user_role.sql +++ b/database/upgrade/upg_sys_log_operate.sql @@ -16,24 +16,30 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `user_role` +-- Table structure for table `sys_log_operate` -- -DROP TABLE IF EXISTS `user_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_role` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `u_name` varchar(255) DEFAULT NULL, - `r_name` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `create_at` datetime DEFAULT current_timestamp(), - PRIMARY KEY (`id`) USING BTREE, - KEY `r_name` (`u_name`) USING BTREE, - KEY `p_name` (`r_name`) USING BTREE, - CONSTRAINT `user_role_rbfk1` FOREIGN KEY (`u_name`) REFERENCES `user` (`account_id`), - CONSTRAINT `user_role_rbfk2` FOREIGN KEY (`r_name`) REFERENCES `role` (`role_name`) -) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='del-已经使用sys_role_user'; +CREATE TABLE IF NOT EXISTS `sys_log_operate` ( + `oper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志主键', + `title` varchar(50) DEFAULT '' COMMENT '模块标题', + `business_type` char(1) DEFAULT '0' COMMENT '业务类型(0其它 1新增 2修改 3删除 4授权 5导出 6导入 7强退 8清空数据)', + `method` varchar(100) DEFAULT '' COMMENT '方法名称', + `request_method` varchar(10) DEFAULT '' COMMENT '请求方式', + `operator_type` char(1) DEFAULT '0' COMMENT '操作人员类别(0其它 1后台用户 2手机端用户)', + `oper_name` varchar(50) DEFAULT '' COMMENT '操作人员', + `dept_name` varchar(50) DEFAULT '' COMMENT '部门名称', + `oper_url` varchar(255) DEFAULT '' COMMENT '请求URL', + `oper_ip` varchar(128) DEFAULT '' COMMENT '主机地址', + `oper_location` varchar(255) DEFAULT '' COMMENT '操作地点', + `oper_param` varchar(2000) DEFAULT '' COMMENT '请求参数', + `oper_msg` varchar(2000) DEFAULT '' COMMENT '操作消息', + `status` char(1) DEFAULT '0' COMMENT '操作状态(0异常 1正常)', + `oper_time` bigint(20) DEFAULT 0 COMMENT '操作时间', + `cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间(毫秒)', + PRIMARY KEY (`oper_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表'; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/database/upgrade/upg_sys_menu.sql b/database/upgrade/upg_sys_menu.sql index b6f0349c..a029bc15 100644 --- a/database/upgrade/upg_sys_menu.sql +++ b/database/upgrade/upg_sys_menu.sql @@ -20,7 +20,7 @@ SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for sys_menu -- ---------------------------- - +DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE IF NOT EXISTS `sys_menu` ( `menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID', `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称', @@ -41,26 +41,14 @@ CREATE TABLE IF NOT EXISTS `sys_menu` ( `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`menu_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2134 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_menu -- ---------------------------- INSERT IGNORE INTO `sys_menu` VALUES (1, 'menu.system', 0, 16, 'system', NULL, '1', '1', 'D', '1', '1', NULL, 'icon-xiangmu', 'supervisor', 1700000000000, NULL, 0, 'menu.systemRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2, 'menu.monitor', 0, 2, 'monitor', NULL, '1', '1', 'D', '0', '0', NULL, 'icon-wenjian', 'supervisor', 1700000000000, NULL, 0, 'menu.monitorRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (3, 'menu.tools', 0, 15, 'tool', NULL, '1', '1', 'D', '1', '1', NULL, 'icon-wenjian', 'supervisor', 1700000000000, NULL, 0, 'menu.toolsRemark'); INSERT IGNORE INTO `sys_menu` VALUES (4, 'menu.config', 0, 3, 'configManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-huizhiguize', 'supervisor', 1700000000000, NULL, 0, 'menu.configRemark'); INSERT IGNORE INTO `sys_menu` VALUES (5, 'menu.ueUser', 0, 7, 'neUser', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-wocanyu', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUserRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (6, '故障管理', 0, 50, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 1690000000000, '故障管理'); -INSERT IGNORE INTO `sys_menu` VALUES (7, '配置管理', 0, 550, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '配置管理'); -INSERT IGNORE INTO `sys_menu` VALUES (8, '性能管理', 0, 551, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '性能管理'); -INSERT IGNORE INTO `sys_menu` VALUES (9, '操作维护', 0, 552, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '操作维护'); -INSERT IGNORE INTO `sys_menu` VALUES (10, '跟踪管理', 0, 553, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 1690000000000, '跟踪管理'); -INSERT IGNORE INTO `sys_menu` VALUES (11, '日志管理', 0, 554, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '日志管理'); -INSERT IGNORE INTO `sys_menu` VALUES (12, '安全管理', 0, 555, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '安全管理'); -INSERT IGNORE INTO `sys_menu` VALUES (13, '北向管理', 0, 556, 'page', NULL, '1', '0', 'D', '0', '0', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 1690000000000, '北向管理'); -INSERT IGNORE INTO `sys_menu` VALUES (14, '系统管理', 0, 557, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '系统管理'); -INSERT IGNORE INTO `sys_menu` VALUES (15, '拓扑管理', 0, 558, 'page', NULL, '1', '0', 'D', '0', '0', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 0, '拓扑管理'); INSERT IGNORE INTO `sys_menu` VALUES (100, 'menu.security.user', 2113, 1, 'user', 'system/user/index', '1', '1', 'M', '1', '1', 'system:user:list', 'icon-wocanyu', 'supervisor', 1700000000000, NULL, 0, 'menu.security.userRemark'); INSERT IGNORE INTO `sys_menu` VALUES (101, 'menu.security.role', 2113, 3, 'role', 'system/role/index', '1', '1', 'M', '1', '1', 'system:role:list', 'icon-anzhuo', 'supervisor', 1700000000000, NULL, 0, 'menu.security.roleRemark'); INSERT IGNORE INTO `sys_menu` VALUES (102, 'menu.security.roleUser', 2113, 3, 'role/inline/auth-user/:roleId', 'system/role/auth-user', '1', '1', 'M', '0', '1', 'system:role:auth', '#', 'supervisor', 1700000000000, NULL, 0, 'menu.security.roleUserRemark'); @@ -77,7 +65,6 @@ INSERT IGNORE INTO `sys_menu` VALUES (114, 'menu.system.cache', 1, 3, 'cache', ' INSERT IGNORE INTO `sys_menu` VALUES (115, 'menu.security.onlineUser', 2113, 2, 'online', 'monitor/online/index', '1', '1', 'M', '1', '1', 'monitor:online:list', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.security.onlineUserRemark'); INSERT IGNORE INTO `sys_menu` VALUES (116, 'menu.system.job', 1, 1, 'job', 'monitor/job/index', '1', '1', 'M', '1', '1', 'monitor:job:list', 'icon-lishi', 'supervisor', 1700000000000, NULL, 0, 'menu.system.jobRemark'); INSERT IGNORE INTO `sys_menu` VALUES (117, 'menu.system.jobLog', 1, 2, '/system/job/inline/log/:jobId', 'monitor/job/log', '1', '1', 'M', '0', '1', 'monitor:job:log', '#', 'supervisor', 1700000000000, NULL, 0, 'menu.system.jobLogRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (118, 'menu.tools.help', 3, 1, 'help', 'tool/help/index', '1', '1', 'M', '1', '1', 'monitor:help:list', '#', 'supervisor', 1700000000000, NULL, 0, 'menu.tools.helpRemark'); INSERT IGNORE INTO `sys_menu` VALUES (500, 'menu.log.operat', 2089, 1, 'operate', 'system/log/operate/index', '1', '1', 'M', '1', '1', 'system:log:operate:list', 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.log.operatRemark'); INSERT IGNORE INTO `sys_menu` VALUES (501, 'menu.log.login', 2089, 2, 'login', 'system/log/login/index', '1', '1', 'M', '1', '1', 'system:log:login:list', 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.log.loginRemark'); INSERT IGNORE INTO `sys_menu` VALUES (1000, 'menu.common.query', 100, 1, NULL, NULL, '1', '1', 'B', '1', '1', 'system:user:query', '#', 'supervisor', 1700000000000, NULL, 0, NULL); @@ -135,109 +122,42 @@ INSERT IGNORE INTO `sys_menu` VALUES (1055, 'menu.common.edit', 116, 5, '#', NUL INSERT IGNORE INTO `sys_menu` VALUES (1056, 'menu.common.export', 116, 6, '#', NULL, '1', '1', 'B', '1', '1', 'monitor:job:export', '#', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_menu` VALUES (2009, 'menu.ueUser.authUDM', 5, 1, 'auth', 'neUser/auth/index', '1', '1', 'M', '1', '1', 'neUser:auth:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.authUDMRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2010, 'menu.ueUser.subUDM', 5, 2, 'sub', 'neUser/sub/index', '1', '1', 'M', '1', '1', 'neUser:sub:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.subUDMRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2011, '活动告警', 6, 1, NULL, 'page/alarm/alarmListDown.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '活动告警'); -INSERT IGNORE INTO `sys_menu` VALUES (2012, '历史告警', 6, 2, NULL, 'page/alarm/AlarmListHistory.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '历史告警'); -INSERT IGNORE INTO `sys_menu` VALUES (2013, '故障通用设置', 6, 3, NULL, 'page/alarm/alarmInfoConfig.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '故障通用设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2014, '定时同步设置', 6, 4, NULL, 'page/alarm/synchronous.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '定时同步设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2015, '健康状态检查', 6, 5, NULL, 'page/alarm/healthCheck.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '健康状态检查'); -INSERT IGNORE INTO `sys_menu` VALUES (2016, '告警前转', 6, 6, NULL, 'page/alarm/alarmForwarding.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '告警前转'); -INSERT IGNORE INTO `sys_menu` VALUES (2017, '网元管理', 7, 1, NULL, 'page/nfManage/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '网元管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2018, '参数配置', 7, 2, NULL, 'page/configParam/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '参数配置'); -INSERT IGNORE INTO `sys_menu` VALUES (2019, '软件管理', 7, 3, NULL, 'page/softwareManage/softwareManage.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '软件管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2020, '备份管理', 7, 5, NULL, 'page/softwareManage/backupManage.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '备份管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2021, '配置参数设置', 7, 6, NULL, 'page/configParam/configParamSet.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '配置参数设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2022, '任务管理', 8, 1, NULL, 'page/task/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '任务管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2023, '性能数据', 8, 2, NULL, 'page/repair/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '性能数据'); -INSERT IGNORE INTO `sys_menu` VALUES (2024, '性能报表', 8, 3, NULL, 'page/task/perfReport.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '性能报表'); -INSERT IGNORE INTO `sys_menu` VALUES (2025, '性能门限', 8, 4, NULL, 'page/task/threshold.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '性能门限'); -INSERT IGNORE INTO `sys_menu` VALUES (2026, '黄金指标', 8, 5, NULL, 'page/gold/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '黄金指标'); -INSERT IGNORE INTO `sys_menu` VALUES (2027, '性能通用设置', 8, 7, NULL, 'page/task/perfReportSet.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '性能通用设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2028, '自定义指标', 8, 8, NULL, 'page/indicators/list.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '自定义指标'); -INSERT IGNORE INTO `sys_menu` VALUES (2029, '对象模板', 8, 8, NULL, 'page/objectTemplate/list.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '对象模板'); -INSERT IGNORE INTO `sys_menu` VALUES (2030, '自定义测量数据', 8, 9, NULL, 'page/indicators/measuringData.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '自定义测量数据'); -INSERT IGNORE INTO `sys_menu` VALUES (2031, '拓扑视图', 15, 1, NULL, 'page/topology/topologyList.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '拓扑视图'); -INSERT IGNORE INTO `sys_menu` VALUES (2032, '系统维护', 14, 1, NULL, 'page/systemManage/systemOperation.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '系统维护'); -INSERT IGNORE INTO `sys_menu` VALUES (2033, '稳定性事件列表', 14, 2, NULL, 'page/systemManage/stabilityEvents.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '稳定性事件列表'); -INSERT IGNORE INTO `sys_menu` VALUES (2034, '稳定性统计报告', 14, 3, NULL, 'page/systemManage/stabilityReports.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '稳定性统计报告'); -INSERT IGNORE INTO `sys_menu` VALUES (2035, '系统备份', 14, 4, NULL, 'page/systemManage/systemBackup.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '系统备份'); -INSERT IGNORE INTO `sys_menu` VALUES (2036, '系统可扩展', 14, 5, NULL, 'page/systemManage/systemExtended.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '\"系统可扩展'); -INSERT IGNORE INTO `sys_menu` VALUES (2037, '证书管理', 14, 6, NULL, 'page/systemManage/certificateManage.html', '1', '0', 'M', '1', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '证书管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2038, '北向操作日志', 13, 0, NULL, 'page/log/nbiOperLogList.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '北向操作日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2039, '北向告警日志', 13, 2, NULL, 'page/log/nbiAlarmLog.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '北向告警日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2040, '北向通用设置', 13, 3, NULL, 'page/log/nbiSet.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '北向通用设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2041, '用户管理', 12, 1, NULL, 'page/user/list.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '用户管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2042, '在线状态', 12, 2, NULL, 'page/user/online.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '在线状态'); -INSERT IGNORE INTO `sys_menu` VALUES (2043, '用户组管理', 12, 2, NULL, 'page/group/list.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '用户组管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2044, '安全策略', 12, 3, NULL, 'page/user/securityPolicy.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '安全策略'); -INSERT IGNORE INTO `sys_menu` VALUES (2045, '操作日志', 11, 1, NULL, 'page/log/operLogList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '操作日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2046, 'mml操作日志', 11, 2, NULL, 'page/log/mmlOperLogList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, 'mml操作日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2047, '告警日志', 11, 3, NULL, 'page/log/alarmLogList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '告警日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2048, '安全日志', 11, 4, NULL, 'page/log/securityLogList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '安全日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2049, '告警前转日志', 11, 7, NULL, 'page/log/forwardingLog.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '告警前转日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2050, '日志通用管理', 11, 8, NULL, 'page/log/logSet.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '日志通用管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2051, '系统日志', 11, 9, NULL, 'page/log/systemLog.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '系统日志'); -INSERT IGNORE INTO `sys_menu` VALUES (2052, '跟踪任务', 10, 1, NULL, 'page/trace/taskList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '跟踪任务'); -INSERT IGNORE INTO `sys_menu` VALUES (2053, '信令分析', 10, 2, NULL, 'page/trace/traceShow.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '信令分析'); -INSERT IGNORE INTO `sys_menu` VALUES (2054, '核心网池', 9, 0, NULL, 'page/mml/poolList.html', '1', '0', 'M', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, '核心网池'); -INSERT IGNORE INTO `sys_menu` VALUES (2055, '操作维护MML', 9, 1, NULL, 'page/mml/omcList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '操作维护MML'); -INSERT IGNORE INTO `sys_menu` VALUES (2056, '网元操作MML', 9, 3, NULL, 'page/mml/list.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '网元操作MML'); -INSERT IGNORE INTO `sys_menu` VALUES (2057, '用户数据MML', 9, 4, NULL, 'page/mml/udmList.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '用户数据MML'); -INSERT IGNORE INTO `sys_menu` VALUES (2058, '操作维护设置', 9, 5, NULL, 'page/mml/mmlSet.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '操作维护设置'); -INSERT IGNORE INTO `sys_menu` VALUES (2059, '角色管理', 12, 6, NULL, 'page/role/list.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '角色管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2060, '菜单管理', 12, 7, NULL, 'page/menu/list.html', '1', '0', 'M', '0', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, '菜单管理'); -INSERT IGNORE INTO `sys_menu` VALUES (2065, '数据库URL查询', 0, 10011, NULL, NULL, '1', '1', 'B', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '数据库查询操作'); -INSERT IGNORE INTO `sys_menu` VALUES (2066, '数据库URL新增', 0, 10012, NULL, NULL, '1', '1', 'B', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '数据库URL新增'); -INSERT IGNORE INTO `sys_menu` VALUES (2067, '数据库URL更新', 0, 10013, NULL, NULL, '1', '1', 'B', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '数据库URL更新'); -INSERT IGNORE INTO `sys_menu` VALUES (2068, '数据库URL删除', 0, 10014, NULL, NULL, '1', '1', 'B', '0', '0', 'page', '#', 'admin', 1690000000000, 'admin', 0, '数据库URL删除'); -INSERT IGNORE INTO `sys_menu` VALUES (2069, '用户信息', 0, 559, 'page', NULL, '1', '0', 'D', '0', '1', 'page', 'fa fa-home', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2070, 'UDM鉴权用户', 2069, 1, NULL, 'page/nfUserInfo/authList.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2071, '5G基站信息', 2069, 4, NULL, 'page/nfUserInfo/5gBase.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2072, 'IMS在线用户', 2069, 3, NULL, 'page/baseInfo/imsOnline.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2073, 'UDM签约用户', 2069, 2, NULL, 'page/nfUserInfo/subsList.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2074, 'UE在线信息', 2069, 4, NULL, 'page/baseInfo/ueInfoList.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 1690000000000, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '1', 'M', '1', '1', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2076, 'menu.config.configNE', 4, 2, 'configParam', 'configManage/configParam/index', '1', '1', 'M', '1', '1', 'configManage:configParam:index', 'icon-piliang', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNERemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2077, '信令抓包', 10, 3, NULL, 'page/trace/pcap.html', '1', '0', 'M', '1', '1', 'page', '#', 'admin', 1690000000000, 'admin', 0, 'tcpdump抓包pcap文件'); -INSERT IGNORE INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 3, 'backupManage', 'configManage/backupManage/index', '1', '1', 'M', '1', '1', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '1', 'M', '1', '1', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2080, 'menu.ueUser.onlineIMS', 5, 4, 'ims', 'neUser/ims/index', '1', '1', 'M', '1', '1', 'neUser:ims:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.onlineIMSRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2081, 'menu.ueUser.onlineUE', 5, 6, 'ue', 'neUser/ue/index', '1', '1', 'M', '1', '1', 'neUser:ue:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.onlineUERemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2082, 'menu.ueUser.base5G', 5, 7, 'base5G', 'neUser/base5G/index', '1', '1', 'M', '1', '1', 'neUser:base5G:index', 'icon-paixu', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.base5GRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '0', 'M', '1', '1', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 3, 'backupManage', 'configManage/backupManage/index', '1', '0', 'M', '1', '1', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '0', 'M', '1', '1', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2080, 'menu.ueUser.onlineIMS', 5, 4, 'ims', 'neUser/ims/index', '1', '0', 'M', '1', '1', 'neUser:ims:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.onlineIMSRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2081, 'menu.ueUser.onlineUE', 5, 6, 'ue', 'neUser/ue/index', '1', '0', 'M', '1', '1', 'neUser:ue:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.onlineUERemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2082, 'menu.ueUser.base5G', 5, 7, 'base5G', 'neUser/base5G/index', '1', '0', 'M', '1', '1', 'neUser:base5G:index', 'icon-paixu', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.base5GRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2083, 'menu.trace', 2087, 30, 'traceManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-paixu', 'supervisor', 1700000000000, NULL, 0, 'menu.traceRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2084, 'menu.trace.task', 2083, 1, 'task', 'traceManage/task/index', '1', '1', 'M', '1', '1', 'traceManage:task:index', 'icon-chexiao', 'supervisor', 1700000000000, NULL, 0, 'menu.trace.taskRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2085, 'menu.trace.analysis', 2083, 2, 'analysis', 'traceManage/analysis/index', '1', '1', 'M', '1', '1', 'traceManage:analysis:index', 'icon-gongnengjieshao', 'supervisor', 1700000000000, NULL, 0, 'menu.trace.analysisRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2084, 'menu.trace.task', 2083, 1, 'task', 'traceManage/task/index', '1', '0', 'M', '0', '1', 'traceManage:task:index', 'icon-chexiao', 'supervisor', 1700000000000, 'admin', 1713176976458, 'menu.trace.taskRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2085, 'menu.trace.analysis', 2083, 2, 'analysis', 'traceManage/analysis/index', '1', '0', 'M', '0', '1', 'traceManage:analysis:index', 'icon-gongnengjieshao', 'supervisor', 1700000000000, 'admin', 1713176987835, 'menu.trace.analysisRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2086, 'menu.trace.pcap', 2083, 3, 'pcap', 'traceManage/pcap/index', '1', '1', 'M', '1', '1', 'traceManage:pcap:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.trace.pcapRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2087, 'menu.fault', 0, 2, 'faultManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-jinggao', 'supervisor', 1700000000000, NULL, 0, 'menu.faultRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2088, 'menu.fault.active', 2129, 1, 'active-alarm', 'faultManage/active-alarm/index', '1', '1', 'M', '1', '1', 'faultManage:active-alarm:index', 'icon-wenjian', 'supervisor', 1700000000000, NULL, 0, 'menu.fault.activemRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2089, 'menu.log', 0, 9, 'logManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.logRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2090, 'menu.log.operatOld', 2089, 1, 'operation', 'logManage/operation/index', '1', '0', 'M', '0', '0', 'logManage:operation:index', 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.log.operatOldRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2091, 'menu.log.mml', 2089, 2, 'mml', 'logManage/mml/index', '1', '1', 'M', '1', '1', 'logManage:mml:index', 'icon-wocanyu', 'supervisor', 1700000000000, NULL, 0, 'menu.log.mmlRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2092, 'menu.log.alarm', 2089, 3, 'alarm-log', 'logManage/alarm/index', '1', '1', 'M', '1', '1', 'logManage:alarm:index', 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.log.alarmRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2093, 'menu.log.securityOld', 2089, 6, 'security-log', 'logManage/security/index', '1', '0', 'M', '0', '0', 'logManage/security/index', 'icon-gongnengjieshao', 'supervisor', 1700000000000, NULL, 0, 'menu.log.securityOldRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2092, 'menu.log.alarm', 2089, 3, 'alarm-log', 'logManage/alarm/index', '1', '0', 'M', '1', '1', 'logManage:alarm:index', 'icon-fuzhidaima', 'supervisor', 1700000000000, NULL, 0, 'menu.log.alarmRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2094, 'menu.log.forwarding', 2089, 7, 'forwarding', 'logManage/forwarding/index', '1', '0', 'M', '1', '1', 'logManage:forwarding:index', 'icon-huizhiguize', 'supervisor', 1700000000000, NULL, 0, 'menu.log.forwardingRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2095, 'menu.log.set', 2089, 15, 'logSet', 'logManage/logSet/index', '1', '0', 'M', '1', '1', 'logManage:logSet:index', 'icon-you', 'supervisor', 1700000000000, NULL, 0, 'menu.log.setRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2096, 'menu.monitor.sessionUser', 2, 10, 'session', 'monitor/session/index', '1', '0', 'M', '0', '0', 'monitor:session:index', 'icon-gerenzhanghu', 'supervisor', 1700000000000, NULL, 0, 'menu.monitor.sessionUserRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2095, 'menu.log.set', 2089, 15, 'logSet', 'logManage/logSet/index', '1', '0', 'M', '0', '0', 'logManage:logSet:index', 'icon-you', 'supervisor', 1700000000000, 'supervisor', 1715332370830, 'menu.log.setRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2097, 'menu.fault.history', 2129, 2, 'history-alarm', 'faultManage/history-alarm/index', '1', '1', 'M', '1', '1', 'faultManage/history-alarm/index', 'icon-huizhiguize', 'supervisor', 1700000000000, NULL, 0, 'menu.fault.historyRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2098, 'menu.fault.set', 2129, 100, 'fault-setting', 'faultManage/fault-setting/index', '1', '0', 'M', '1', '1', 'faultManage/fault-setting/index', 'icon-gonggaodayi', 'supervisor', 1700000000000, NULL, 0, 'menu.fault.setRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2099, 'menu.perf', 0, 5, 'perfManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.perfRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2100, 'menu.perf.task', 2099, 1, 'taskManage', 'perfManage/taskManage/index', '1', '1', 'M', '1', '1', 'perfManage:taskManage:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.taskRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2101, 'menu.perf.data', 2099, 2, 'perfData', 'perfManage/perfData/index', '1', '1', 'M', '1', '1', 'perfManage:perfData:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.dataRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2100, 'menu.perf.task', 2099, 1, 'taskManage', 'perfManage/taskManage/index', '1', '1', 'M', '0', '1', 'perfManage:taskManage:index', 'icon-wofaqi', 'supervisor', 1700000000000, 'admin', 1713177036412, 'menu.perf.taskRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2101, 'menu.perf.data', 2099, 2, 'perfData', 'perfManage/perfData/index', '1', '1', 'M', '0', '1', 'perfManage:perfData:index', 'icon-soutubiao', 'supervisor', 1700000000000, 'admin', 1713177042915, 'menu.perf.dataRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2102, 'menu.perf.report', 2099, 3, 'perfReport', 'perfManage/perfReport/index', '1', '0', 'M', '0', '0', 'perfManage:perfReport:index', 'icon-gonggaodayi', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.reportRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2103, 'menu.perf.threshold', 2099, 4, 'perfThreshold', 'perfManage/perfThreshold/index', '1', '0', 'M', '1', '1', 'perfManage:perfThreshold:index', 'icon-zhuanrang', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.thresholdRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2103, 'menu.perf.threshold', 2099, 4, 'perfThreshold', 'perfManage/perfThreshold/index', '1', '0', 'M', '0', '0', 'perfManage:perfThreshold:index', 'icon-zhuanrang', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.thresholdRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2104, 'menu.perf.kpi', 2099, 5, 'goldTarget', 'perfManage/goldTarget/index', '1', '1', 'M', '1', '1', 'perfManage:goldTarget:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.kpiRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2105, 'menu.perf.customTarget', 2099, 6, 'customTarget', 'perfManage/customTarget/index', '1', '1', 'M', '0', '0', 'perfManage:customTarget:index', 'icon-fanhui1', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.customTargetRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2105, 'menu.perf.customTarget', 2099, 6, 'customTarget', 'perfManage/customTarget/index', '1', '1', 'M', '0', '0', 'perfManage:customTarget:index', 'icon-fanhui1', 'supervisor', 1700000000000, 'admin', 1712807948673, 'menu.perf.customTargetRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2106, 'menu.perf.set', 2099, 7, 'perfSet', 'perfManage/perfSet/index', '1', '0', 'M', '0', '0', 'perfManage:perfSet:index', 'icon-gonggao', 'supervisor', 1700000000000, NULL, 0, 'menu.perf.setRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2107, 'menu.mml', 0, 8, 'mmlManage', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-zhizuoliucheng', 'supervisor', 1700000000000, NULL, 0, 'menu.mmlRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2108, 'menu.mml.ne', 2107, 1, 'neOperate', 'mmlManage/neOperate/index', '1', '1', 'M', '1', '1', 'mmlManage:neOperate:index', 'icon-huizhiguize', 'supervisor', 1700000000000, NULL, 0, 'menu.mml.neRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2109, 'menu.mml.udm', 2107, 2, 'udmOperate', 'mmlManage/udmOperate/index', '1', '1', 'M', '1', '1', 'mmlManage:udmOperate:index', 'icon-gonggaodayi', 'supervisor', 1700000000000, NULL, 0, 'menu.mml.udmRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2110, 'menu.mml.set', 2107, 4, 'mmlSet', 'mmlManage/mmlSet/index', '1', '1', 'M', '1', '1', 'mmlManage:mmlSet:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.mml.setRemark'); +INSERT IGNORE INTO `sys_menu` VALUES (2110, 'menu.mml.set', 2107, 4, 'mmlSet', 'mmlManage/mmlSet/index', '1', '0', 'M', '1', '1', 'mmlManage:mmlSet:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.mml.setRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2111, 'menu.mml.omc', 2107, 3, 'omcOperate', 'mmlManage/omcOperate/index', '1', '1', 'M', '1', '1', 'mmlManage:omcOperate:index', 'icon-huizhiguize', 'supervisor', 1700000000000, NULL, 0, 'menu.mml.omcRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2112, 'menu.config.licenseManage', 4, 5, 'license', 'configManage/license/index', '1', '1', 'M', '1', '1', 'configManage/license/index', 'icon-shang', 'supervisor', 1700000000000, NULL, 0, 'menu.config.licenseManageRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2113, 'menu.security', 0, 14, 'security', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-suofang', 'supervisor', 1700000000000, NULL, 0, 'menu.securityRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2114, 'menu.system.systemSet', 1, 12, 'setting', 'system/setting/index', '1', '1', 'M', '1', '1', 'system:setting:index', 'icon-piliang', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemSetRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2115, 'menu.system.systemResource', 1, 13, 'monitor', 'monitor/monitor/index', '1', '1', 'M', '1', '1', 'monitor:monitor:info', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemResourceRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2116, 'menu.config.configNEForm', 4, 2, 'configParamForm', 'configManage/configParamForm/index', '1', '0', 'M', '1', '1', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNEFormRemark'); -INSERT IGNORE INTO `sys_menu` VALUES (2117, 'menu.config.configNETree', 4, 2, 'configParamTree', 'configManage/configParamTree/index', '1', '0', 'M', '1', '1', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2118, 'menu.config.configNETreeTable', 4, 2, 'configNETreeTable', 'configManage/configParamTreeTable/index', '1', '1', 'M', '1', '1', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeTableRemark'); INSERT IGNORE INTO `sys_menu` VALUES (2119, 'menu.ueUser.n3iwf', 5, 8, 'n3iwf', 'neUser/n3iwf/index', '1', '0', 'M', '0', '1', 'neUser:n3iwf:index', 'icon-paixu', 'supervisor', 1700000000000, NULL, 0, NULL); INSERT IGNORE INTO `sys_menu` VALUES (2120, 'menu.ueUser.pcf', 5, 9, 'pcf', 'neUser/pcf/index', '1', '0', 'M', '1', '1', 'neUser:pcf:index', 'icon-paixu', 'supervisor', 1700000000000, NULL, 0, NULL); @@ -253,939 +173,19 @@ INSERT IGNORE INTO `sys_menu` VALUES (2129, 'menu.alarm', 2087, 10, 'alarm', NUL INSERT IGNORE INTO `sys_menu` VALUES (2130, 'menu.topology', 2087, 20, 'topology', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-anzhuo', 'supervisor', 1704800000000, 'supervisor', 1704847055540, NULL); INSERT IGNORE INTO `sys_menu` VALUES (2131, 'menu.dashboard', 2087, 0, 'dashboard', NULL, '1', '0', 'D', '1', '1', NULL, 'icon-soutubiao', 'supervisor', 1705550000000, 'supervisor', 1705550000000, NULL); INSERT IGNORE INTO `sys_menu` VALUES (2132, 'menu.dashboard.overview', 2131, 1, 'overview', 'dashboard/overview/index', '1', '0', 'M', '1', '1', 'dashboard:overview:index', 'icon-paixu', 'supervisor', 1705550000000, NULL, 0, NULL); -INSERT IGNORE INTO `sys_menu` VALUES (2133, 'menu.dashboard.cdr', 2131, 3, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-paixu', 'supervisor', 1705550000000, '', 0, ''); -INSERT IGNORE INTO `sys_menu` VALUES (2134, 'menu.tools.terminal', 3, 3, 'terminal', 'tool/terminal/index', '1', '1', 'M', '1', '1', 'tool:terminal:index', 'icon-pcduan', 'supervisor', 1708481172778, '', 0, ''); +INSERT IGNORE INTO `sys_menu` VALUES (2133, 'menu.dashboard.cdr', 2140, 40, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-paixu', 'supervisor', 1705550000000, 'supervisor', 1712751038982, ''); INSERT IGNORE INTO `sys_menu` VALUES (2135, 'menu.config.neHost', 4, 15, 'neHost', 'ne/neHost/index', '1', '1', 'M', '1', '1', 'ne:neHost:list', 'icon-fuzhidaima', 'supervisor', 1708583596871, '', 0, ''); INSERT IGNORE INTO `sys_menu` VALUES (2136, 'menu.config.neHostCommand', 4, 18, 'neHostCommand', 'ne/neHostCommand/index', '1', '0', 'M', '1', '1', 'ne:neHostCommand:list', 'icon-fuzhidaima', 'supervisor', 1708583596871, '', 0, ''); INSERT IGNORE INTO `sys_menu` VALUES (2137, 'menu.config.neInfo', 4, 14, 'neInfo', 'ne/neInfo/index', '1', '0', 'M', '1', '1', 'ne:neInfo:list', 'icon-fuzhidaima', 'supervisor', 1708583596871, '', 0, ''); INSERT IGNORE INTO `sys_menu` VALUES (2138, 'menu.dashboard.amfUE', 2141, 1, 'amfUE', 'dashboard/amfUE/index', '1', '0', 'M', '1', '1', 'dashboard:amfUE:index', 'icon-paixu', 'supervisor', 1705550000000, 'supervisor', 1711354049893, ''); -INSERT IGNORE INTO `sys_menu` VALUES (2139, 'menu.logs.log', 2089, 0, 'log', '', '1', '0', 'D', '0', '1', '', 'icon-wenjian', 'supervisor', 1711352535855, 'supervisor', 1712751078161, ''); INSERT IGNORE INTO `sys_menu` VALUES (2140, 'menu.monitor.cdr', 2087, 40, 'cdr', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1712751135878, ''); INSERT IGNORE INTO `sys_menu` VALUES (2141, 'menu.monitor.event', 2087, 50, 'event', '', '1', '0', 'D', '1', '1', '', 'icon-gengduo', 'supervisor', 1711352768797, 'supervisor', 1712751125648, ''); - +INSERT IGNORE INTO `sys_menu` VALUES (2142, 'menu.ne.neQuickSetup', 4, 10, 'neQuickSetup', 'ne/neQuickSetup/index', '1', '1', 'M', '1', '1', 'ne:neQuickSetup:list', 'icon-wofaqi', 'supervisor', 1708580000000, '', 0, ''); +INSERT IGNORE INTO `sys_menu` VALUES (2143, 'menu.config.neLicense', 4, 20, 'neLicense', 'ne/neLicense/index', '1', '0', 'M', '1', '1', 'ne:neLicense:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT IGNORE INTO `sys_menu` VALUES (2144, 'menu.config.neSoftware', 4, 23, 'neSoftware', 'ne/neSoftware/index', '1', '0', 'M', '1', '1', 'ne:neSoftware:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT IGNORE INTO `sys_menu` VALUES (2145, 'menu.config.neVersion', 4, 26, 'neVersion', 'ne/neVersion/index', '1', '0', 'M', '1', '1', 'ne:neVersion:list', 'icon-fuzhidaima', 'supervisor', 1708580000000, '', 0, ''); +INSERT IGNORE INTO `sys_menu` VALUES (2146, 'menu.ne.neConfPara5G', 4, 8, 'neConfPara5G', 'ne/neConfPara5G/index', '1', '0', 'M', '1', '1', 'ne:neConfPara5G:list', 'icon-wofaqi', 'supervisor', 1708580000000, '', 0, ''); + -- 指定记录条件更新 -UPDATE `omc_db`.`sys_menu` SET `is_cache` = '1' WHERE `menu_id` = 2118; -UPDATE `omc_db`.`sys_menu` SET `is_cache` = '1' WHERE `menu_id` = 2134; -UPDATE `omc_db`.`sys_menu` SET `path` = 'imsCDR', `component` = 'dashboard/imsCDR/index' WHERE `menu_id` = 2133; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2142; -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2143; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.system.cacheInfo', - `parent_id` = 1, - `menu_sort` = 2, - `path` = 'cache-info', - `component` = 'monitor/cache/info', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'monitor:cache:info', - `icon` = 'icon-gongnengjieshao', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.system.cacheInfoRemark' -WHERE - `menu_id` = 113; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.system.cache', - `parent_id` = 1, - `menu_sort` = 3, - `path` = 'cache', - `component` = 'monitor/cache/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'monitor:cache:list', - `icon` = 'icon-tubiaoku', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.system.cacheRemark' -WHERE - `menu_id` = 114; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.authUDM', - `parent_id` = 5, - `menu_sort` = 1, - `path` = 'auth', - `component` = 'neUser/auth/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:auth:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.authUDMRemark' -WHERE - `menu_id` = 2009; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.subUDM', - `parent_id` = 5, - `menu_sort` = 2, - `path` = 'sub', - `component` = 'neUser/sub/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:sub:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.subUDMRemark' -WHERE - `menu_id` = 2010; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.onlineIMS', - `parent_id` = 5, - `menu_sort` = 4, - `path` = 'ims', - `component` = 'neUser/ims/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:ims:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.onlineIMSRemark' -WHERE - `menu_id` = 2080; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.onlineUE', - `parent_id` = 5, - `menu_sort` = 6, - `path` = 'ue', - `component` = 'neUser/ue/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:ue:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.onlineUERemark' -WHERE - `menu_id` = 2081; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.base5G', - `parent_id` = 5, - `menu_sort` = 7, - `path` = 'base5G', - `component` = 'neUser/base5G/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:base5G:index', - `icon` = 'icon-paixu', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1708508177149, - `remark` = 'menu.ueUser.base5GRemark' -WHERE - `menu_id` = 2082; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.customTarget', - `parent_id` = 2099, - `menu_sort` = 6, - `path` = 'customTarget', - `component` = 'perfManage/customTarget/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '0', - `perms` = 'perfManage:customTarget:index', - `icon` = 'icon-fanhui1', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.perf.customTargetRemark' -WHERE - `menu_id` = 2105; - - - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.tools.help', - `parent_id` = 3, - `menu_sort` = 1, - `path` = 'help', - `component` = 'tool/help/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'tool:help:list', - `icon` = '#', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'supervisor', - `update_time` = 1708480983482, - `remark` = 'menu.tools.helpRemark' -WHERE - `menu_id` = 118; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.authUDM', - `parent_id` = 5, - `menu_sort` = 1, - `path` = 'auth', - `component` = 'neUser/auth/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:auth:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.authUDMRemark' -WHERE - `menu_id` = 2009; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.subUDM', - `parent_id` = 5, - `menu_sort` = 2, - `path` = 'sub', - `component` = 'neUser/sub/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:sub:index', - `icon` = 'icon-xiangmuchengyuan', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.subUDMRemark' -WHERE - `menu_id` = 2010; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.config.neManage', - `parent_id` = 4, - `menu_sort` = 1, - `path` = 'neManage', - `component` = 'configManage/neManage/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'configManage:neManage:index', - `icon` = 'icon-biaoqing', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.config.neManageRemark' -WHERE - `menu_id` = 2075; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.config.configNE', - `parent_id` = 4, - `menu_sort` = 2, - `path` = 'configParam', - `component` = 'configManage/configParam/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'configManage:configParam:index', - `icon` = 'icon-piliang', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.config.configNERemark' -WHERE - `menu_id` = 2076; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.config.backupManage', - `parent_id` = 4, - `menu_sort` = 3, - `path` = 'backupManage', - `component` = 'configManage/backupManage/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'configManage:backupManage:index', - `icon` = 'icon-soutubiao', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.config.backupManageRemark' -WHERE - `menu_id` = 2078; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.config.softwareManage', - `parent_id` = 4, - `menu_sort` = 4, - `path` = 'softwareManage', - `component` = 'configManage/softwareManage/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'configManage:softwareManage:index', - `icon` = 'icon-huidingbu', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.config.softwareManageRemark' -WHERE - `menu_id` = 2079; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.ueUser.base5G', - `parent_id` = 5, - `menu_sort` = 7, - `path` = 'base5G', - `component` = 'neUser/base5G/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'neUser:base5G:index', - `icon` = 'icon-paixu', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.ueUser.base5GRemark' -WHERE - `menu_id` = 2082; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.trace.task', - `parent_id` = 2083, - `menu_sort` = 1, - `path` = 'task', - `component` = 'traceManage/task/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'traceManage:task:index', - `icon` = 'icon-chexiao', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1712807894783, - `remark` = 'menu.trace.taskRemark' -WHERE - `menu_id` = 2084; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.trace.analysis', - `parent_id` = 2083, - `menu_sort` = 2, - `path` = 'analysis', - `component` = 'traceManage/analysis/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'traceManage:analysis:index', - `icon` = 'icon-gongnengjieshao', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'supervisor', - `update_time` = 1712751454668, - `remark` = 'menu.trace.analysisRemark' -WHERE - `menu_id` = 2085; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.log.alarm', - `parent_id` = 2089, - `menu_sort` = 3, - `path` = 'alarm-log', - `component` = 'logManage/alarm/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'logManage:alarm:index', - `icon` = 'icon-fuzhidaima', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.log.alarmRemark' -WHERE - `menu_id` = 2092; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.task', - `parent_id` = 2099, - `menu_sort` = 1, - `path` = 'taskManage', - `component` = 'perfManage/taskManage/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'perfManage:taskManage:index', - `icon` = 'icon-wofaqi', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1712807912947, - `remark` = 'menu.perf.taskRemark' -WHERE - `menu_id` = 2100; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.data', - `parent_id` = 2099, - `menu_sort` = 2, - `path` = 'perfData', - `component` = 'perfManage/perfData/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'perfManage:perfData:index', - `icon` = 'icon-soutubiao', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1712807920148, - `remark` = 'menu.perf.dataRemark' -WHERE - `menu_id` = 2101; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.threshold', - `parent_id` = 2099, - `menu_sort` = 4, - `path` = 'perfThreshold', - `component` = 'perfManage/perfThreshold/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'perfManage:perfThreshold:index', - `icon` = 'icon-zhuanrang', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1712807935215, - `remark` = 'menu.perf.thresholdRemark' -WHERE - `menu_id` = 2103; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.customTarget', - `parent_id` = 2099, - `menu_sort` = 6, - `path` = 'customTarget', - `component` = 'perfManage/customTarget/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '0', - `status` = '0', - `perms` = 'perfManage:customTarget:index', - `icon` = 'icon-fanhui1', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'admin', - `update_time` = 1712807948673, - `remark` = 'menu.perf.customTargetRemark' -WHERE - `menu_id` = 2105; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.mml.set', - `parent_id` = 2107, - `menu_sort` = 4, - `path` = 'mmlSet', - `component` = 'mmlManage/mmlSet/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'mmlManage:mmlSet:index', - `icon` = 'icon-wofaqi', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'menu.mml.setRemark' -WHERE - `menu_id` = 2110; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.dashboard.cdr', - `parent_id` = 2140, - `menu_sort` = 40, - `path` = 'imsCDR', - `component` = 'dashboard/imsCDR/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'dashboard:cdr:index', - `icon` = 'icon-paixu', - `create_by` = 'supervisor', - `create_time` = 1705550000000, - `update_by` = 'supervisor', - `update_time` = 1712751038982, - `remark` = '' -WHERE - `menu_id` = 2133; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.config.neHost', - `parent_id` = 4, - `menu_sort` = 15, - `path` = 'neHost', - `component` = 'ne/neHost/index', - `is_frame` = '1', - `is_cache` = '1', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'ne:neHost:list', - `icon` = 'icon-fuzhidaima', - `create_by` = 'supervisor', - `create_time` = 1708583596871, - `update_by` = '', - `update_time` = 0, - `remark` = '' -WHERE - `menu_id` = 2135; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.dashboard.amfUE', - `parent_id` = 2141, - `menu_sort` = 1, - `path` = 'amfUE', - `component` = 'dashboard/amfUE/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '1', - `status` = '1', - `perms` = 'dashboard:amfUE:index', - `icon` = 'icon-paixu', - `create_by` = 'supervisor', - `create_time` = 1705550000000, - `update_by` = 'supervisor', - `update_time` = 1711354049893, - `remark` = '' -WHERE - `menu_id` = 2138; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.logs.log', - `parent_id` = 2089, - `menu_sort` = 0, - `path` = 'log', - `component` = '', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'D', - `visible` = '0', - `status` = '1', - `perms` = '', - `icon` = 'icon-wenjian', - `create_by` = 'supervisor', - `create_time` = 1711352535855, - `update_by` = 'supervisor', - `update_time` = 1712751078161, - `remark` = '' -WHERE - `menu_id` = 2139; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.monitor.cdr', - `parent_id` = 2087, - `menu_sort` = 40, - `path` = 'cdr', - `component` = '', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'D', - `visible` = '1', - `status` = '1', - `perms` = '', - `icon` = 'icon-tubiaoku', - `create_by` = 'supervisor', - `create_time` = 1711352709786, - `update_by` = 'supervisor', - `update_time` = 1712751135878, - `remark` = '' -WHERE - `menu_id` = 2140; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.monitor.event', - `parent_id` = 2087, - `menu_sort` = 50, - `path` = 'event', - `component` = '', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'D', - `visible` = '1', - `status` = '1', - `perms` = '', - `icon` = 'icon-gengduo', - `create_by` = 'supervisor', - `create_time` = 1711352768797, - `update_by` = 'supervisor', - `update_time` = 1712751125648, - `remark` = '' -WHERE - `menu_id` = 2141; - --- begin: remove some excess old menus at 2024/05/10, r2.2405.1 -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 3; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 6; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 7; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 8; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 9; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 10; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 11; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 12; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 13; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 14; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 15; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 118; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2011; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2012; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2013; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2014; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2015; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2016; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2017; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2018; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2019; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2020; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2021; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2022; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2023; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2024; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2025; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2026; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2027; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2028; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2029; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2030; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2031; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2032; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2033; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2034; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2035; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2036; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2037; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2038; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2039; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2040; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2041; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2042; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2043; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2044; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2045; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2046; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2047; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2048; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2049; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2050; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2051; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2052; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2053; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2054; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2055; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2056; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2057; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2058; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2059; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2060; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2065; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2066; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2067; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2068; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2069; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2070; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2071; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2072; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2073; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2074; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2076; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2077; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2090; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2093; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2096; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2116; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2117; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2134; - -DELETE FROM `omc_db`.`sys_menu` WHERE `menu_id` = 2139; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.log.set', - `parent_id` = 2089, - `menu_sort` = 15, - `path` = 'logSet', - `component` = 'logManage/logSet/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '0', - `perms` = 'logManage:logSet:index', - `icon` = 'icon-you', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'supervisor', - `update_time` = 1715332370830, - `remark` = 'menu.log.setRemark' -WHERE - `menu_id` = 2095; - -UPDATE `omc_db`.`sys_menu` -SET - `menu_name` = 'menu.perf.threshold', - `parent_id` = 2099, - `menu_sort` = 4, - `path` = 'perfThreshold', - `component` = 'perfManage/perfThreshold/index', - `is_frame` = '1', - `is_cache` = '0', - `menu_type` = 'M', - `visible` = '0', - `status` = '1', - `perms` = 'perfManage:perfThreshold:index', - `icon` = 'icon-zhuanrang', - `create_by` = 'supervisor', - `create_time` = 1700000000000, - `update_by` = 'supervisor', - `update_time` = 1715417264697, - `remark` = 'menu.perf.thresholdRemark' -WHERE - `menu_id` = 2103; - --- end: remove - -INSERT INTO - `omc_db`.`sys_menu` ( - `menu_id`, - `menu_name`, - `parent_id`, - `menu_sort`, - `path`, - `component`, - `is_frame`, - `is_cache`, - `menu_type`, - `visible`, - `status`, - `perms`, - `icon`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 2144, - 'menu.fault.event', - 2129, - 3, - 'event', - 'faultManage/event/index', - '1', - '0', - 'M', - '1', - '1', - 'faultManage:event:index', - 'icon-tubiaoku', - 'supervisor', - 1717051993146, - 'supervisor', - 1717052106943, - '' - ); - - SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/upgrade/upg_sys_post.sql b/database/upgrade/upg_sys_post.sql index 07fedd20..18f70f44 100644 --- a/database/upgrade/upg_sys_post.sql +++ b/database/upgrade/upg_sys_post.sql @@ -1,176 +1,22 @@ SET FOREIGN_KEY_CHECKS=0; -CREATE TABLE IF NOT EXISTS `omc_db`.`sys_post` ( - `post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID', - `post_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码', - `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称', - `post_sort` int(11) NULL DEFAULT 0 COMMENT '显示顺序', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态(0停用 1正常)', - `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间', - `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`post_id`) USING BTREE - ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic; +CREATE TABLE IF NOT EXISTS `sys_post` ( + `post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID', + `post_code` varchar(50) NOT NULL COMMENT '岗位编码', + `post_name` varchar(50) NOT NULL COMMENT '岗位名称', + `post_sort` int(11) DEFAULT 0 COMMENT '显示顺序', + `status` char(1) DEFAULT '0' COMMENT '状态(0停用 1正常)', + `create_by` varchar(50) DEFAULT '' COMMENT '创建者', + `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', + `update_by` varchar(50) DEFAULT '' COMMENT '更新者', + `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', + `remark` varchar(500) DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`post_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='岗位信息表'; -DELETE FROM `omc_db`.`sys_post` WHERE `post_id` in (1,2,3,4,5); - -INSERT IGNORE INTO - `omc_db`.`sys_post` ( - `post_id`, - `post_code`, - `post_name`, - `post_sort`, - `status`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 1, - 'Administrator', - '管理人员', - 1, - '1', - 'admin', - 1697110106499, - 'admin', - 1698487012626, - '' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_post` ( - `post_id`, - `post_code`, - `post_name`, - `post_sort`, - `status`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 2, - 'Operator', - '运维人员', - 2, - '1', - 'admin', - 1697110106502, - 'admin', - 1698487019898, - '' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_post` ( - `post_id`, - `post_code`, - `post_name`, - `post_sort`, - `status`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 3, - 'Monitor', - '监控人员', - 3, - '1', - 'admin', - 1697110106504, - 'admin', - 1698487031259, - '' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_post` ( - `post_id`, - `post_code`, - `post_name`, - `post_sort`, - `status`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 4, - 'Visitor', - '普通用户', - 4, - '1', - 'admin', - 1697110106507, - 'admin', - 1698487043293, - '' - ); - --- for cn/en locales -UPDATE `omc_db`.`sys_post` -SET - `post_code` = 'administator', - `post_name` = 'post.admin', - `post_sort` = 1, - `status` = '1', - `create_by` = 'supervisor', - `create_time` = 1697110106499, - `update_by` = NULL, - `update_time` = 0, - `remark` = NULL -WHERE `post_id` = 1; - -UPDATE `omc_db`.`sys_post` -SET - `post_code` = 'operator', - `post_name` = 'post.operator', - `post_sort` = 2, - `status` = '1', - `create_by` = 'supervisor', - `create_time` = 1697110106499, - `update_by` = NULL, - `update_time` = 0, - `remark` = NULL -WHERE `post_id` = 2; - -UPDATE `omc_db`.`sys_post` -SET - `post_code` = 'monitor', - `post_name` = 'post.monitor', - `post_sort` = 3, - `status` = '1', - `create_by` = 'supervisor', - `create_time` = 1697110106499, - `update_by` = NULL, - `update_time` = 0, - `remark` = NULL -WHERE `post_id` = 3; - -UPDATE `omc_db`.`sys_post` -SET - `post_code` = 'visitor', - `post_name` = 'post.visitor', - `post_sort` = 4, - `status` = '1', - `create_by` = 'supervisor', - `create_time` = 1697110106499, - `update_by` = NULL, - `update_time` = 0, - `remark` = NULL -WHERE `post_id` = 4; +INSERT INTO `sys_post` VALUES (1, 'administator', 'post.admin', 1, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (2, 'operator', 'post.operator', 2, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (3, 'monitor', 'post.monitor', 3, '1', 'supervisor', 1697110106499, NULL, 0, NULL); +INSERT INTO `sys_post` VALUES (4, 'visitor', 'post.visitor', 4, '1', 'supervisor', 1697110106499, NULL, 0, NULL); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_sys_role.sql b/database/upgrade/upg_sys_role.sql index e1f7721b..7d81fa9f 100644 --- a/database/upgrade/upg_sys_role.sql +++ b/database/upgrade/upg_sys_role.sql @@ -1,261 +1,9 @@ SET FOREIGN_KEY_CHECKS=0; -DELETE FROM `omc_db`.`sys_role` WHERE `role_id` IN (1,2,3,4,5); - -INSERT IGNORE INTO - `omc_db`.`sys_role` ( - `role_id`, - `role_name`, - `role_key`, - `role_sort`, - `data_scope`, - `menu_check_strictly`, - `dept_check_strictly`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 1, - 'Supervisor', - 'supervisor', - 1, - '1', - '1', - '1', - '1', - '0', - 'admin', - 1697091437683, - '', - 0, - '超级管理员,无法修改删除' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_role` ( - `role_id`, - `role_name`, - `role_key`, - `role_sort`, - `data_scope`, - `menu_check_strictly`, - `dept_check_strictly`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 2, - 'Administrator', - 'administrator', - 2, - '1', - '1', - '1', - '1', - '0', - 'admin', - 1698486915894, - 'supervisor', - 1698739249610, - '管理人员 可以对设备进行任何操作' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_role` ( - `role_id`, - `role_name`, - `role_key`, - `role_sort`, - `data_scope`, - `menu_check_strictly`, - `dept_check_strictly`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 3, - 'Operator', - 'operator', - 3, - '1', - '1', - '1', - '1', - '0', - 'admin', - 1698486934900, - 'supervisor', - 1698739285488, - '运维人员 可以从设备读取数据,并对设备进行配置,但是不能对设备进行软件升级操作。' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_role` ( - `role_id`, - `role_name`, - `role_key`, - `role_sort`, - `data_scope`, - `menu_check_strictly`, - `dept_check_strictly`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 4, - 'Monitor', - 'monitor', - 4, - '1', - '1', - '1', - '1', - '0', - 'admin', - 1698486950714, - 'admin', - 1698718807790, - '监控人员 只能从设备读取数据,而不能对设备进行任何设置' - ); - -INSERT IGNORE INTO - `omc_db`.`sys_role` ( - `role_id`, - `role_name`, - `role_key`, - `role_sort`, - `data_scope`, - `menu_check_strictly`, - `dept_check_strictly`, - `status`, - `del_flag`, - `create_by`, - `create_time`, - `update_by`, - `update_time`, - `remark` - ) -VALUES ( - 5, - 'Visitor', - 'vistor', - 5, - '1', - '1', - '1', - '1', - '0', - 'admin', - 1698486975779, - 'admin', - 1698718839597, - '普通用户 只可看系统相关信息' - ); - --- for cn/en locales -UPDATE `omc_db`.`sys_role` -SET - `role_name` = 'role.admin', - `role_key` = 'supervisor', - `role_sort` = 1, - `data_scope` = '1', - `menu_check_strictly` = '1', - `dept_check_strictly` = '1', - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1697091437683, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'role.adminRemark' -WHERE `role_id` = 1; - -UPDATE `omc_db`.`sys_role` -SET - `role_name` = 'role.adminAssign', - `role_key` = 'administrator', - `role_sort` = 2, - `data_scope` = '1', - `menu_check_strictly` = '1', - `dept_check_strictly` = '1', - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1698486915894, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'role.adminAssignRemark' -WHERE `role_id` = 2; - -UPDATE `omc_db`.`sys_role` -SET - `role_name` = 'role.operator', - `role_key` = 'operator', - `role_sort` = 3, - `data_scope` = '1', - `menu_check_strictly` = '1', - `dept_check_strictly` = '1', - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1698486934900, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'role.operatorRemark' -WHERE `role_id` = 3; - -UPDATE `omc_db`.`sys_role` -SET - `role_name` = 'role.monitor', - `role_key` = 'monitor', - `role_sort` = 4, - `data_scope` = '1', - `menu_check_strictly` = '1', - `dept_check_strictly` = '1', - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1698486950714, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'role.monitorRemark' -WHERE `role_id` = 4; - -UPDATE `omc_db`.`sys_role` -SET - `role_name` = 'role.vistor', - `role_key` = 'vistor', - `role_sort` = 5, - `data_scope` = '1', - `menu_check_strictly` = '1', - `dept_check_strictly` = '1', - `status` = '1', - `del_flag` = '0', - `create_by` = 'supervisor', - `create_time` = 1698486975779, - `update_by` = NULL, - `update_time` = 0, - `remark` = 'role.vistorRemark' -WHERE `role_id` = 5; +INSERT IGNORE INTO `sys_role` VALUES (1, 'role.admin', 'supervisor', 1, '1', '1', '1', '1', '0', 'supervisor', 1697091437683, 'supervisor', 1697091437683, 'role.adminRemark'); +INSERT IGNORE INTO `sys_role` VALUES (2, 'role.adminAssign', 'administrator', 2, '1', '1', '1', '1', '0', 'supervisor', 1698486915894, 'supervisor', 1717143830709, 'role.adminAssignRemark'); +INSERT IGNORE INTO `sys_role` VALUES (3, 'role.operator', 'operator', 3, '1', '1', '1', '1', '0', 'supervisor', 1698486934900, 'supervisor', 1717143582784, 'role.operatorRemark'); +INSERT IGNORE INTO `sys_role` VALUES (4, 'role.monitor', 'monitor', 4, '1', '1', '1', '1', '0', 'supervisor', 1698486950714, 'supervisor', 1706774389300, 'role.monitorRemark'); +INSERT IGNORE INTO `sys_role` VALUES (5, 'role.vistor', 'vistor', 5, '1', '1', '1', '1', '0', 'supervisor', 1698486975779, 'supervisor', 1706774405096, 'role.vistorRemark'); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_sys_role_menu.sql b/database/upgrade/upg_sys_role_menu.sql index 74206fe8..6f3a80d9 100644 --- a/database/upgrade/upg_sys_role_menu.sql +++ b/database/upgrade/upg_sys_role_menu.sql @@ -38,12 +38,9 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (2, 102); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 103); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 104); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 105); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 106); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 107); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 108); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 111); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 112); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 113); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 115); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 116); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 117); @@ -74,11 +71,6 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1021); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1022); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1023); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1024); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1025); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1026); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1027); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1028); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1029); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1030); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1031); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1032); @@ -102,9 +94,7 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1055); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 1056); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2009); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2010); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2075); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2078); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2079); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2080); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2081); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2082); @@ -132,7 +122,6 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2107); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2108); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2109); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2111); -INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2112); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2113); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2114); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2118); @@ -149,6 +138,16 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2129); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2130); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2131); INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2137); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2142); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2143); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2145); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2146); +INSERT IGNORE INTO `sys_role_menu` VALUES (2, 2147); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 4); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 5); @@ -166,7 +165,6 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1042); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 1048); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2009); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2010); -INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2075); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2078); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2080); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2081); @@ -195,7 +193,6 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2107); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2108); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2109); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2111); -INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2112); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2113); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2118); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2119); @@ -210,6 +207,13 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2129); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2130); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2131); INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2137); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2143); +INSERT IGNORE INTO `sys_role_menu` VALUES (3, 2147); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 1); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 5); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 112); @@ -251,6 +255,11 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2129); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2130); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2131); INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2132); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2133); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2138); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2140); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2141); +INSERT IGNORE INTO `sys_role_menu` VALUES (4, 2147); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 1); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 5); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 112); @@ -260,66 +269,5 @@ INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2082); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2087); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2131); INSERT IGNORE INTO `sys_role_menu` VALUES (5, 2132); -INSERT IGNORE INTO `sys_role_menu` VALUES (100, 1); -INSERT IGNORE INTO `sys_role_menu` VALUES (100, 100); -INSERT IGNORE INTO `sys_role_menu` VALUES (100, 1000); - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 106; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 107; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 113; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 1025; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 1026; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 1027; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 1028; - -DELETE FROM `omc_db`.`sys_role_menu` -WHERE - `role_id` = 2 - AND `menu_id` = 1029; - -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2133); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2138); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2140); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2141); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (3, 2133); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (3, 2138); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (3, 2140); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (3, 2141); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (4, 2133); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (4, 2138); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (4, 2140); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (4, 2141); - --- alarm event to role -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2144); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (3, 2144); -INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (4, 2144); SET FOREIGN_KEY_CHECKS = 1; diff --git a/database/upgrade/upg_sys_user_role.sql b/database/upgrade/upg_sys_user_role.sql index 64f08e0a..17a1679b 100644 --- a/database/upgrade/upg_sys_user_role.sql +++ b/database/upgrade/upg_sys_user_role.sql @@ -1,19 +1,5 @@ SET FOREIGN_KEY_CHECKS=0; -INSERT IGNORE INTO - `omc_db`.`sys_user_role` (`user_id`, `role_id`) -VALUES (1, 1); - -INSERT IGNORE INTO - `omc_db`.`sys_user_role` (`user_id`, `role_id`) -VALUES (2, 2); - -INSERT - IGNORE INTO `omc_db`.`sys_user_role` (`user_id`, `role_id`) -VALUES (103, 3); - -INSERT - IGNORE INTO `omc_db`.`sys_user_role` (`user_id`, `role_id`) -VALUES (104, 4); +INSERT IGNORE INTO `sys_user_role` VALUES (1,1),(2,2),(3,3),(4,4); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/database/upgrade/upg_u_sub_user.sql b/database/upgrade/upg_u_sub_user.sql new file mode 100644 index 00000000..c87abf29 --- /dev/null +++ b/database/upgrade/upg_u_sub_user.sql @@ -0,0 +1,60 @@ +-- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) +-- +-- Host: 192.168.2.219 Database: omc_db +-- ------------------------------------------------------ +-- Server version 10.3.38-MariaDB + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `u_sub_user` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `u_sub_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `msisdn` varchar(50) DEFAULT NULL COMMENT '相当手机号', + `imsi` varchar(50) DEFAULT NULL COMMENT 'SIM卡号', + `ambr` varchar(50) DEFAULT NULL COMMENT 'SubUeAMBRTemp', + `nssai` varchar(50) DEFAULT NULL COMMENT 'SubSNSSAITemp', + `rat` varchar(50) DEFAULT NULL COMMENT 'rat', + `arfb` varchar(50) DEFAULT NULL COMMENT 'forbiddenAreasTemp', + `sar` varchar(50) DEFAULT NULL COMMENT 'serviceAreaRestrictTemp', + `cn` varchar(50) DEFAULT NULL COMMENT 'cnType', + `sm_data` varchar(1500) DEFAULT NULL COMMENT 'smData', + `smf_sel` varchar(50) DEFAULT NULL COMMENT 'smfSel', + `eps_dat` varchar(1500) DEFAULT NULL COMMENT 'Eps', + `ne_id` varchar(50) DEFAULT '' COMMENT 'UDM网元标识-子系统', + `eps_flag` varchar(50) DEFAULT NULL COMMENT 'epsFlag', + `eps_odb` varchar(50) DEFAULT NULL COMMENT 'epsOdb', + `hplmn_odb` varchar(50) DEFAULT NULL COMMENT 'hplmnOdb', + `ard` varchar(50) DEFAULT NULL COMMENT 'Ard', + `epstpl` varchar(50) DEFAULT NULL COMMENT 'Epstpl', + `context_id` varchar(50) DEFAULT NULL COMMENT 'ContextId', + `apn_context` varchar(50) DEFAULT NULL COMMENT 'apnContext', + `static_ip` varchar(50) DEFAULT NULL COMMENT 'staticIpstatic_ip指给4G UE分配的静态IP,没有可不带此字段名', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `imsi_ne` (`imsi`,`ne_id`) USING BTREE COMMENT 'imsi_ne唯一索引' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='UDM签约用户'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-03-06 17:26:59 diff --git a/database/upgrade/vue3_20231017.sql b/database/upgrade/vue3_20231017.sql deleted file mode 100644 index bd5193fe..00000000 --- a/database/upgrade/vue3_20231017.sql +++ /dev/null @@ -1,49 +0,0 @@ -SET FOREIGN_KEY_CHECKS=0; - -CREATE TABLE IF NOT EXISTS `omc_db`.`sys_job_log` ( - `job_log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', - `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称', - `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名', - `invoke_target` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串', - `target_params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '调用目标传入参数', - `job_msg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志信息', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '执行状态(0失败 1正常)', - `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间', - `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '消耗时间(毫秒)', - PRIMARY KEY (`job_log_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度日志表' ROW_FORMAT = Dynamic; - -CREATE TABLE IF NOT EXISTS `omc_db`.`sys_log_login` ( - `login_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '登录ID', - `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户账号', - `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录IP地址', - `login_location` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录地点', - `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '浏览器类型', - `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作系统', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '登录状态(0失败 1成功)', - `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提示消息', - `login_time` bigint(20) NULL DEFAULT 0 COMMENT '登录时间', - PRIMARY KEY (`login_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统登录日志表' ROW_FORMAT = Dynamic; - -CREATE TABLE IF NOT EXISTS `omc_db`.`sys_log_operate` ( - `oper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志主键', - `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模块标题', - `business_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '业务类型(0其它 1新增 2修改 3删除 4授权 5导出 6导入 7强退 8清空数据)', - `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '方法名称', - `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求方式', - `operator_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '操作人员类别(0其它 1后台用户 2手机端用户)', - `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作人员', - `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称', - `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求URL', - `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机地址', - `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作地点', - `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求参数', - `oper_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作消息', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '操作状态(0异常 1正常)', - `oper_time` bigint(20) NULL DEFAULT 0 COMMENT '操作时间', - `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '消耗时间(毫秒)', - PRIMARY KEY (`oper_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/database/upgrade/vue3_20231028.sql b/database/upgrade/vue3_20231028.sql deleted file mode 100644 index 477d4588..00000000 --- a/database/upgrade/vue3_20231028.sql +++ /dev/null @@ -1,92 +0,0 @@ - - --- 创建表 监控_基本信息 - -ALTER TABLE `omc_db`.`monitor_base` DROP COLUMN IF EXISTS `created_at`; -ALTER TABLE - `omc_db`.`monitor_base` DROP COLUMN IF EXISTS `updated_at`; -ALTER TABLE `omc_db`.`monitor_base` DROP COLUMN IF EXISTS `db_size`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `id` bigint(20) NOT NULL COMMENT 'id' FIRST; -ALTER TABLE - `omc_db`.`monitor_base` -ADD - COLUMN IF NOT EXISTS `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间' AFTER `id`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `cpu` float NULL DEFAULT 0 COMMENT 'cpu使用率' AFTER `create_time`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `load_usage` float NULL DEFAULT 0 COMMENT 'cpu平均使用率' AFTER `cpu`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `cpu_load1` float NULL DEFAULT 0 COMMENT 'cpu使用1分钟' AFTER `load_usage`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `cpu_load5` float NULL DEFAULT 0 COMMENT 'cpu使用5分钟' AFTER `cpu_load1`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `cpu_load15` float NULL DEFAULT 0 COMMENT 'cpu使用15分钟' AFTER `cpu_load5`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `memory` float NULL DEFAULT 0 COMMENT '内存使用率' AFTER `cpu_load15`; -ALTER TABLE - `omc_db`.`monitor_base` -ADD - COLUMN IF NOT EXISTS `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元类型' AFTER `memory`; -ALTER TABLE - `omc_db`.`monitor_base` -ADD - COLUMN IF NOT EXISTS `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元ID' AFTER `ne_type`; -ALTER TABLE - `omc_db`.`monitor_base` MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id'; - --- 创建表 监控_磁盘IO - -ALTER TABLE `omc_db`.`monitor_io` DROP COLUMN IF EXISTS `created_at`; -ALTER TABLE `omc_db`.`monitor_io` DROP COLUMN IF EXISTS `updated_at`; -ALTER TABLE - `omc_db`.`monitor_io` MODIFY COLUMN `id` bigint(20) NOT NULL COMMENT 'id' FIRST; -ALTER TABLE - `omc_db`.`monitor_io` -ADD - COLUMN IF NOT EXISTS `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间' AFTER `id`; -ALTER TABLE - `omc_db`.`monitor_io` MODIFY COLUMN `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '磁盘名' AFTER `create_time`; -ALTER TABLE - `omc_db`.`monitor_io` MODIFY COLUMN `read` int(11) NULL DEFAULT 0 COMMENT '读取K' AFTER `name`; -ALTER TABLE - `omc_db`.`monitor_io` MODIFY COLUMN `write` int(11) NULL DEFAULT 0 COMMENT '写入K' AFTER `read`; -ALTER TABLE `omc_db`.`monitor_io` MODIFY COLUMN `count` int NULL DEFAULT 0 COMMENT '读写次数' AFTER `write`; -ALTER TABLE `omc_db`.`monitor_io` MODIFY COLUMN `time` int NULL DEFAULT 0 COMMENT '读写延迟' AFTER `count`; -ALTER TABLE - `omc_db`.`monitor_io` -ADD - COLUMN IF NOT EXISTS `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元类型' AFTER `time`; -ALTER TABLE - `omc_db`.`monitor_io` -ADD - COLUMN IF NOT EXISTS `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元ID' AFTER `ne_type`; -ALTER TABLE - `omc_db`.`monitor_io` MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id'; - --- 创建表 监控_网络IO - -ALTER TABLE `omc_db`.`monitor_network` DROP COLUMN IF EXISTS `created_at`; -ALTER TABLE `omc_db`.`monitor_network` DROP COLUMN IF EXISTS `updated_at`; -ALTER TABLE - `omc_db`.`monitor_network` MODIFY COLUMN `id` bigint(20) NOT NULL COMMENT 'id' FIRST; -ALTER TABLE - `omc_db`.`monitor_network` -ADD - COLUMN IF NOT EXISTS `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间' AFTER `id`; -ALTER TABLE - `omc_db`.`monitor_network` MODIFY COLUMN `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网卡名' AFTER `create_time`; -ALTER TABLE - `omc_db`.`monitor_network` MODIFY COLUMN `up` float NULL DEFAULT 0 COMMENT '上行' AFTER `name`; -ALTER TABLE - `omc_db`.`monitor_network` MODIFY COLUMN `down` float NULL DEFAULT 0 COMMENT '下行' AFTER `up`; -ALTER TABLE - `omc_db`.`monitor_network` -ADD - COLUMN IF NOT EXISTS `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元类型' AFTER `down`; -ALTER TABLE - `omc_db`.`monitor_network` -ADD - COLUMN IF NOT EXISTS `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网元ID' AFTER `ne_type`; -ALTER TABLE - `omc_db`.`monitor_network` MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id'; diff --git a/database/upgrade/zupgrade.sql b/database/upgrade/zupgrade.sql index c7bb2138..9602307e 100644 --- a/database/upgrade/zupgrade.sql +++ b/database/upgrade/zupgrade.sql @@ -3,52 +3,22 @@ DROP TRIGGER IF EXISTS `tg_account_menu`; ALTER TABLE `omc_db`.`gold_kpi` MODIFY COLUMN `value` bigint NULL DEFAULT 0 AFTER `kpi_id`; -ALTER TABLE `omc_db`.`user` -DROP INDEX IF EXISTS `account_id`, -DROP INDEX IF EXISTS `idx_uni_user_acc_id`, -ADD UNIQUE INDEX `idx_uni_user_acc_id`(`account_id`) USING BTREE; - ALTER TABLE `omc_db`.`ne_link` DROP INDEX IF EXISTS `idx_netype_neid`; -ALTER TABLE `omc_db`.`user` -MODIFY COLUMN `password_expiration` date NULL DEFAULT NULL AFTER `change_password_flag`, -MODIFY COLUMN `user_expiration` date NULL DEFAULT NULL AFTER `status`; - ALTER TABLE `omc_db`.`config` ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `update_time`; ALTER TABLE `omc_db`.`nbi_operation_log` MODIFY COLUMN `created_at` datetime NULL DEFAULT NULL AFTER `log_time`; - -ALTER TABLE `omc_db`.`permission` -ADD COLUMN IF NOT EXISTS `management` varchar(32) NULL DEFAULT '*' AFTER `method`; - -ALTER TABLE `omc_db`.`permission` -CHANGE COLUMN IF EXISTS `create_at` `created_at` datetime NULL DEFAULT current_timestamp AFTER `description`, -MODIFY COLUMN `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' AFTER `permission_name`, -MODIFY COLUMN `management` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' AFTER `method`, -MODIFY COLUMN `element` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' AFTER `management`, -MODIFY COLUMN `object` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' AFTER `element`, -ADD COLUMN IF NOT EXISTS `updated_at` datetime NULL AFTER `created_at`, -ADD COLUMN IF NOT EXISTS `deleted_at` datetime NULL AFTER `updated_at`; - -ALTER TABLE `omc_db`.`permission` -ADD UNIQUE INDEX IF NOT EXISTS `permission_name`(`permission_name`) USING BTREE; - + ALTER TABLE `omc_db`.`alarm_log` ADD COLUMN IF NOT EXISTS `alarm_seq` int NULL AFTER `ne_id`; -ALTER TABLE `omc_db`.`ne_software` -ADD COLUMN IF NOT EXISTS `patch_time` datetime NULL AFTER `update_time`; - ALTER TABLE `omc_db`.`nbi_alarm_log` ADD COLUMN IF NOT EXISTS `alarm_status` int NULL COMMENT '0/1: 清除告警/活动告警' AFTER `alarm_code`; ALTER TABLE `omc_db`.`cert_info` DROP INDEX IF EXISTS `idx_netype_neid`; -ALTER TABLE `omc_db`.`user` -MODIFY COLUMN `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `account_id`; - ALTER TABLE `omc_db`.`measure_threshold` CHANGE COLUMN IF EXISTS `alarm_id` `alarm_code` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '10200' AFTER `orig_severity`; @@ -59,16 +29,10 @@ ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `account_id`; ALTER TABLE `omc_db`.`trace_task` ADD COLUMN IF NOT EXISTS `account_id` varchar(32) NULL AFTER `status`, ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `account_id`; - -ALTER TABLE `omc_db`.`u_auth_user` ENGINE = InnoDB; -ALTER TABLE `omc_db`.`u_sub_user` ENGINE = InnoDB; - + INSERT IGNORE INTO `omc_db`.`config` (`id`, `module_name`, `config_tag`, `title_json`, `value`, `value_json`, `comment`) VALUES ('37', 'System', 'logo', '{\"cn\":\"系统LOGO\",\"en\":\"System LOGO\"}', 'logo30.png', '', ''); -ALTER TABLE `omc_db`.`security_log` -MODIFY COLUMN `id` int(10) NOT NULL AUTO_INCREMENT FIRST; - ALTER TABLE `omc_db`.`param_config` ADD COLUMN IF NOT EXISTS `method` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' COMMENT 'method allow: \"get\", \"get,post,put\", \"*\"' AFTER `top_display`; @@ -78,32 +42,15 @@ MODIFY COLUMN `timestamp` bigint NULL DEFAULT NULL AFTER `msg_direct`; ALTER TABLE `omc_db`.`param_config` MODIFY COLUMN `method` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'method allow: \"get\", \"get,post,put\", \"delete\"' AFTER `top_display`; - -ALTER TABLE `omc_db`.`ne_license` -MODIFY COLUMN `status` enum('ACTIVE','INACTIVE','PENDING') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'ACTIVE' AFTER `expiration_date`, -ADD COLUMN IF NOT EXISTS `path` varchar(128) NULL AFTER `status`, -ADD COLUMN IF NOT EXISTS `file_name` varchar(64) NULL AFTER `path`, -ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `file_name`; - -DELETE FROM ne_license WHERE file_name IS NULL; - + ALTER TABLE `omc_db`.`trace_data` ADD COLUMN IF NOT EXISTS `length` int NULL AFTER `msg_direct`; - --- UDM签约存储长度不足 -ALTER TABLE `omc_db`.`u_sub_user` -MODIFY COLUMN `sm_data` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'smData' AFTER `cn`, -MODIFY COLUMN `eps_dat` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Eps' AFTER `smf_sel`; - + ALTER TABLE `omc_db`.`ne_backup` ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `md5_sum`; -ALTER TABLE - `omc_db`.`sys_dict_data` MODIFY COLUMN `dict_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典标签' AFTER `dict_sort`, - MODIFY COLUMN `dict_value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典键值' AFTER `dict_label`; - ALTER TABLE `omc_db`.`mml_command` ADD @@ -129,28 +76,9 @@ ALTER TABLE ADD COLUMN IF NOT EXISTS `operation` varchar(16) NULL AFTER `process_id`; -UPDATE ne_info SET `province` = '-' WHERE `province` = 'GD'; - -UPDATE ne_info -SET - `vendor_name` = "AGrandTech" -WHERE `vendor_name` = "AGT"; - -UPDATE ne_info SET `dn` = "-" WHERE `dn` = "TN"; - -ALTER TABLE - `omc_db`.`sys_dept` MODIFY COLUMN `dept_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称' AFTER `ancestors`; - -ALTER TABLE `omc_db`.`sys_dict_data` -MODIFY COLUMN `dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码' FIRST; - ALTER TABLE `omc_db`.`gold_kpi` ADD COLUMN IF NOT EXISTS `granularity` tinyint NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`; - -ALTER TABLE `omc_db`.`ne_info` -DROP PRIMARY KEY, -ADD PRIMARY KEY (`id`) USING BTREE; - + ALTER TABLE `omc_db`.`gold_kpi` ADD INDEX IF NOT EXISTS `idx_kpiid` (`kpi_id`) USING BTREE, ADD INDEX IF NOT EXISTS `idx_timestamp` (`timestamp`) USING BTREE; @@ -170,13 +98,7 @@ ADD INDEX IF NOT EXISTS `idx_kpi_id` (`kpi_id`) USING BTREE; ALTER TABLE `omc_db`.`alarm` ADD UNIQUE INDEX IF NOT EXISTS `idx_pk_id` (`id`) USING BTREE; - -REPLACE INTO - `omc_db`.`sys_dict_data` -VALUES ( - 4034, 4034, 'menu.dashboard.overview', 'Overview', 'i18n_en', NULL, NULL, '1', 'supervisor', 1705550000000, NULL, 0, NULL - ); - + ALTER TABLE `omc_db`.`alarm` ADD INDEX IF NOT EXISTS `idx_severity_status` ( `alarm_status`, `orig_severity` diff --git a/features/cm/license.go b/features/cm/license.go index 30b2e1f1..ffee447b 100644 --- a/features/cm/license.go +++ b/features/cm/license.go @@ -8,11 +8,13 @@ import ( "os/exec" "strings" + "be.ems/lib/core/utils/ctx" "be.ems/lib/dborm" "be.ems/lib/log" "be.ems/lib/services" "be.ems/restagent/config" - + neModel "be.ems/src/modules/network_element/model" + neService "be.ems/src/modules/network_element/service" "github.com/gorilla/mux" ) @@ -503,22 +505,54 @@ func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) { } } */ - neLicense := dborm.NeLicense{ - NeType: neTypeUpper, - NeID: neId, - Status: "ACTIVE", - Path: licensePath, - FileName: licenseFileName, - Comment: comment, + + // neLicense := dborm.NeLicense{ + // NeType: neTypeUpper, + // NeID: neId, + // Status: "ACTIVE", + // Path: licensePath, + // FileName: licenseFileName, + // Comment: comment, + // } + + // log.Debug("neLicense:", neLicense) + // _, err = dborm.XormInsertTableOne("ne_license", neLicense) + // if err != nil { + // log.Error("Faile to XormInsertTableOne:", err) + // services.ResponseInternalServerError500ProcessError(w, err) + // } + + neLicense := neModel.NeLicense{ + NeType: neTypeUpper, + NeId: neId, + Status: "0", + LicensePath: neFilePath, + Remark: comment, } log.Debug("neLicense:", neLicense) - _, err = dborm.XormInsertTableOne("ne_license", neLicense) - if err != nil { - log.Error("Faile to XormInsertTableOne:", err) - services.ResponseInternalServerError500ProcessError(w, err) - return + + // 检查是否存在授权记录 + neLicense2 := neService.NewNeLicenseImpl.SelectByNeTypeAndNeID(neTypeUpper, neId) + if neLicense2.NeId != neId { + // 读取授权码 + code, _ := neService.NewNeLicenseImpl.ReadLicenseInfo(neLicense) + neLicense.ActivationRequestCode = code + + neLicense.CreateBy = ctx.LoginUserToUserName(r) + insertId := neService.NewNeLicenseImpl.Insert(neLicense) + if insertId != "" { + services.ResponseStatusOK204NoContent(w) + return + } + } else { + neLicense2.UpdateBy = ctx.LoginUserToUserName(r) + upRows := neService.NewNeLicenseImpl.Update(neLicense2) + if upRows > 0 { + services.ResponseStatusOK204NoContent(w) + return + } } - services.ResponseStatusOK204NoContent(w) + services.ResponseInternalServerError500ProcessError(w, err) } diff --git a/features/cm/software.go b/features/cm/software.go index 4b7fa8a2..2085b5c5 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -20,9 +20,9 @@ import ( ) const ( - SoftwareStatusUploaded = "Uploaded" - SoftwareStatusInactive = "Inactive" - SoftwareStatusActive = "Active" + SoftwareStatusUploaded = "3" + SoftwareStatusInactive = "3" + SoftwareStatusActive = "1" DigestsSignOkString = "digests signatures OK" SoftwareVerifiedOk = "Verified OK" ) @@ -419,7 +419,7 @@ func DownloadSoftwareFile(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] md5Sum := (*neSoftware)[0]["md5_sum"] @@ -473,7 +473,7 @@ func DeleteSoftwareFile(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] filePath := fmt.Sprintf("%s/%s", path, fileName) err = os.Remove(filePath) @@ -560,7 +560,7 @@ func DistributeSoftwareToNF(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] srcFile := fmt.Sprintf("%s/%s", path, fileName) @@ -611,7 +611,7 @@ func DistributeSoftwareToNF(w http.ResponseWriter, r *http.Request) { Version: (*neSoftware)[0]["version"], FilePath: fmt.Sprintf("%s/software/%s/%s", config.GetYamlConfig().NE.OmcDir, neTypeLower, fileName), PreVersion: (*neVersion)[0]["version"], - PreFile: (*neVersion)[0]["file_path"], + PreFile: (*neVersion)[0]["path"], Status: SoftwareStatusInactive, } @@ -695,7 +695,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) { log.Trace("neVersion:", neVersion) if !config.GetYamlConfig().OMC.TestMode { - filePath := (*neVersion)[0]["file_path"] + filePath := (*neVersion)[0]["path"] sshHost := fmt.Sprintf("%s@%s", config.GetYamlConfig().NE.User, neInfo.Ip) runCmd := fmt.Sprintf("sudo rm -f %s/actpkg.sh", config.GetYamlConfig().NE.ScpDir) @@ -935,7 +935,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) { PreVersion: "-", PreFile: "-", NewVersion: (*neVersion)[0]["version"], - NewFile: (*neVersion)[0]["file_path"], + NewFile: (*neVersion)[0]["path"], Status: SoftwareStatusActive, } @@ -1037,7 +1037,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) { PreVersion: "-", PreFile: "-", NewVersion: (*neVersion)[0]["version"], - NewFile: (*neVersion)[0]["file_path"], + NewFile: (*neVersion)[0]["path"], Status: SoftwareStatusActive, } diff --git a/features/file/file.go b/features/file/file.go index 7abfe87d..7162b3f8 100644 --- a/features/file/file.go +++ b/features/file/file.go @@ -72,13 +72,13 @@ func UploadFile(w http.ResponseWriter, r *http.Request) { fileName = fileNamePath } else { path = config.GetYamlConfig().OMC.FrontUpload - fileName, err := services.HandleUploadFile(r, path, fileName) + fileNamePath, err := services.HandleUploadFile(r, path, fileName) if err != nil { log.Error("Faile to HandleUploadFile:", err) services.ResponseInternalServerError500ProcessError(w, err) return } - fileName = fileName + fileName = fileNamePath } log.Debugf("upload file=%s to path=%s", fileName, path) diff --git a/features/maintenance/maintenance.go b/features/maintenance/maintenance.go deleted file mode 100644 index 2ee014a6..00000000 --- a/features/maintenance/maintenance.go +++ /dev/null @@ -1,313 +0,0 @@ -package maintenance - -import ( - "encoding/json" - "fmt" - "net/http" - "os" - "os/exec" - "path" - "runtime" - "time" - - "be.ems/lib/core/utils/ctx" - "be.ems/lib/dborm" - "be.ems/lib/log" - "be.ems/lib/services" - "be.ems/restagent/config" - "github.com/shirou/gopsutil/cpu" - "github.com/shirou/gopsutil/disk" - "github.com/shirou/gopsutil/mem" -) - -// (1) OMC能够对相关的文件系统资源、内存、CPU资源、数据存储空间、数据库空间等系统指标进行监控管理; -// 对于虚拟化部署OMC系统,能够对虚机内存、虚机CPU、虚拟存储空间、文件系统资源、数据库空间等指标进行监控,提供界面截图 ; - -// (2) 系统监控指标的采样时间和阈值可由用户设定,超过阈值将产生不同级别的告警,提供界面截图 ; - -// (3) OMC能够方便的查询数据库连接情况;并可手工干预数据库的连接,能方便的终结非法的数据库连接 ; - -// (4) 用户能方便的查询系统进程、应用进程等的进程名、进程类型、开始时间、运行主机等信息,提供界面截图 -// (5) 用户能方便的对系统进程、应用进程等做中断或者启动操作,提供界面截图 - -// (6) 对于文件系统资源、内存、CPU资源、数据存储空间、数据库空间等系统指标数据,要求OMC能够保存至少3个月,提供界面截图 ; -// (7) 用户可以按照需求自定义报表模板并生成OMC系统维护数据报表,提供界面截图 ; - -// (8) OMC具备自身告警管理功能,对于传统OMC系统,如:服务器单电源告警,存储硬盘告警、OMC系统软件故障等; -// 对于虚拟化OMC系统,如虚机告警、虚拟硬盘告警等,提供界面截图 。 - -var ( - // parameter config management - Uri = config.UriPrefix + "/maintenance/{apiVersion}/zz" - - // (1) OMC能够对相关的文件系统资源、内存、CPU资源、数据存储空间、数据库空间等系统指标进行监控管理; - UriPref = config.UriPrefix + "/maintenance/{apiVersion}/pref" - - // (6) 对于文件系统资源、内存、CPU资源、数据存储空间、数据库空间等系统指标数据,要求OMC能够保存至少3个月,提供界面截图 ; - UriPrefLog = config.UriPrefix + "/maintenance/{apiVersion}/prefLog" - - // (2) 系统监控指标的采样时间和阈值可由用户设定,超过阈值将产生不同级别的告警,提供界面截图 ; - UriConfig = config.UriPrefix + "/maintenance/{apiVersion}/config" - - // (3) OMC能够方便的查询数据库连接情况;并可手工干预数据库的连接,能方便的终结非法的数据库连接 - UriSqlClient = config.UriPrefix + "/maintenance/{apiVersion}/sqlClient" - - // (4) 用户能方便的查询系统进程、应用进程等的进程名、进程类型、开始时间、运行主机等信息,提供界面截图 - // (5) 用户能方便的对系统进程、应用进程等做中断或者启动操作,提供界面截图 - UriTop = config.UriPrefix + "/maintenance/{apiVersion}/top" -) - -func init() { - // 定時收集 TODO - prefLogSave("") -} - -func List(w http.ResponseWriter, r *http.Request) { - fmt.Println("zz List") - services.ResponseStatusOK200Null(w) -} - -// 性能指標 -func prefInfo(dirName string) map[string]any { - data := make(map[string]any) - - // 显示文件資源目录 - dirPath := "D://" - if runtime.GOOS == "linux" { - dirPath = "/home" - } - // 訪問下級 - if dirName != "" { - dirPath = path.Join(dirPath, dirName) - } - dir_list, e := os.ReadDir(dirPath) - if e != nil { - log.Error(e) - } - list := make([]map[string]any, 0) - for _, v := range dir_list { - o, err := v.Info() - if err != nil { - continue - } - list = append(list, map[string]any{ - "name": o.Name(), - "size": o.Size(), - "mode": o.Mode().String(), - "modTime": o.ModTime().Format("2006-01-02 15:04:05"), - "isDir": o.IsDir(), - }) - } - data["dirList"] = list - - // 文件資源使用率 - u, _ := disk.Usage(dirPath) - usedGB := int(u.Used) / (1024 * 1024 * 1024 * 1) - data["dirUse"] = fmt.Sprintf("%d", usedGB) - - // CPU使用率 - percent, err := cpu.Percent(time.Second, false) - if err != nil { - log.Error(err) - } - data["cpuUse"] = fmt.Sprintf("%.2f", percent[0]) - - // 内存使用率 - memInfo, err := mem.VirtualMemory() - if err != nil { - log.Error(err) - } - data["memUse"] = memInfo.UsedPercent - - // 獲取數據庫占用空間 - if dborm.DbClient.XEngine != nil { - conf := config.GetYamlConfig() - result, err := dborm.DbClient.XEngine.QueryString(`SELECT - CONCAT(TRUNCATE(SUM(data_length)/1024/1024,2),'MB') AS data_size, - CONCAT(TRUNCATE(SUM(max_data_length)/1024/1024,2),'MB') AS max_data_size, - CONCAT(TRUNCATE(SUM(data_free)/1024/1024,2),'MB') AS data_free, - CONCAT(TRUNCATE(SUM(index_length)/1024/1024,2),'MB') AS index_size - FROM information_schema.tables WHERE TABLE_SCHEMA = ?; - `, conf.Database.Name) - if err == nil { - data["dbInfo"] = result[0] - } else { - data["dbInfo"] = map[string]string{} - } - } - return data -} - -// 性能指標存入數據庫 -func prefLogSave(dirName string) { - if dborm.DbClient.XEngine != nil { - data := prefInfo(dirName) - - dirListByte, err := json.Marshal(data["dirList"]) - if err != nil { - log.Error(err) - } - dbInfoByte, err := json.Marshal(data["dbInfo"]) - if err != nil { - log.Error(err) - } - rse, err := dborm.DbClient.XEngine.Exec(`INSERT INTO sys_perf_data - (id, create_time, dir_used, dir_list, db_info, mem_used, cpu_used) - VALUES(NULL, NOW(), ?, ?, ?, ?, ?); - `, data["dirUse"], string(dirListByte), string(dbInfoByte), data["memUse"], data["cpuUse"]) - if err != nil { - log.Error(err) - } - fmt.Println(rse.LastInsertId()) - } -} - -// GET http://192.168.21.183:3040/api/rest/maintenance/v1/pref?dir=true -func Pref(w http.ResponseWriter, r *http.Request) { - // 知道下級文件資源目录 - dirName := r.URL.Query().Get("dirName") - data := prefInfo(dirName) - services.ResponseWithJson(w, http.StatusOK, data) -} - -// POST http://192.168.21.183:3040/api/rest/maintenance/v1/config -func Config(w http.ResponseWriter, r *http.Request) { - // json 請求參數獲取 - var bodyArgs struct { - Key string `json:"key"` - Value string `json:"value"` - } - err := ctx.ShouldBindJSON(r, &bodyArgs) - if err != nil { - log.Error("io.ReadAll is failed:", err) - services.ResponseNotFound404UriNotExist(w, r) - return - } - - // 進行值更新 - if dborm.DbClient.XEngine != nil { - result, err := dborm.DbClient.XEngine.QueryString("SELECT * FROM information_schema.processlist") - if err != nil { - fmt.Println(err) - } - fmt.Println(result) - rse, err := dborm.DbClient.XEngine.Exec("UPDATE sys_config SET value = ? where id = ?", "true", 100) - if err != nil { - fmt.Println(err) - } - fmt.Println(rse) - } - - services.ResponseStatusOK200Null(w) -} - -// http://192.168.21.183:3040/api/rest/maintenance/v1/sqlClient?type=close -// http://192.168.21.183:3040/api/rest/maintenance/v1/sqlClient?type=connet -// http://192.168.21.183:3040/api/rest/maintenance/v1/sqlClient?type=user -func SqlClient(w http.ResponseWriter, r *http.Request) { - // 关闭 - isClose := r.URL.Query().Get("type") - if isClose == "close" && dborm.DbClient.XEngine != nil { - dborm.DbClient.XEngine.Close() - } - - // 重连 - isConnet := r.URL.Query().Get("type") - if isConnet == "connet" && dborm.DbClient.XEngine == nil { - conf := config.GetYamlConfig() - err := dborm.InitDbClient(conf.Database.Type, conf.Database.User, conf.Database.Password, - conf.Database.Host, conf.Database.Port, conf.Database.Name, conf.Database.ConnParam) - if err != nil { - fmt.Println("dborm.initDbClient err:", err) - services.ResponseInternalServerError500DatabaseOperationFailed(w) - return - } - } - - // 查询实例 - isUser := r.URL.Query().Get("type") - if isUser == "user" && dborm.DbClient.XEngine != nil { - result, err := dborm.DbClient.XEngine.QueryString("SELECT * FROM information_schema.processlist") - if err != nil { - fmt.Println(err) - } - fmt.Println(result) - rse, err := dborm.DbClient.XEngine.Exec("KILL CONNECTION CONNECTION_ID()") - if err != nil { - fmt.Println(err) - } - fmt.Println(rse) - } - - // 进行连接测试 - err := dborm.DbClient.XEngine.Ping() - if err != nil { - fmt.Println(err) - } - services.ResponseStatusOK200Null(w) -} - -// GET http://192.168.21.183:3040/api/rest/maintenance/v1/top?grep= -func Top(w http.ResponseWriter, r *http.Request) { - // 過濾命令 - grep := r.URL.Query().Get("grep") - // 命令拼接 - var cmd *exec.Cmd - switch runtime.GOOS { - case "linux": - command := "ps -ef " - if grep != "" { - command += grep - } - cmd = exec.Command(command) - case "windows": - command := "wmic process list brief " - if grep != "" { - command += grep - } - cmd = exec.Command("cmd", "/C", command) - } - - out, err := cmd.CombinedOutput() - fmt.Println(string(out)) - if err != nil { - fmt.Println(err) - } - services.ResponseWithJson(w, http.StatusOK, string(out)) -} - -// PATCH http://192.168.21.183:3040/api/rest/maintenance/v1/top?ops=&name= -func TopOps(w http.ResponseWriter, r *http.Request) { - // json 請求參數獲取 - var bodyArgs struct { - Ops string `json:"ops"` - Pid string `json:"pid"` - } - err := ctx.ShouldBindJSON(r, &bodyArgs) - if err != nil { - log.Error("io.ReadAll is failed:", err) - services.ResponseNotFound404UriNotExist(w, r) - return - } - // 命令拼接 - var cmd *exec.Cmd - switch runtime.GOOS { - case "linux": - switch bodyArgs.Ops { - case "kill": - cmd = exec.Command("kill", "-9", bodyArgs.Pid) - } - case "windows": - switch bodyArgs.Ops { - case "kill": - cmd = exec.Command("cmd", "/C", "taskkill", "-PID", bodyArgs.Pid, "-F") - } - } - - out, err := cmd.CombinedOutput() - fmt.Println(string(out)) - if err != nil { - fmt.Println(err) - } - services.ResponseWithJson(w, http.StatusOK, string(out)) -} diff --git a/features/monitor/monitor/model.go b/features/monitor/monitor/model.go deleted file mode 100644 index 8997a226..00000000 --- a/features/monitor/monitor/model.go +++ /dev/null @@ -1,55 +0,0 @@ -package monitor - -import "time" - -type MonitorBase struct { - ID uint `xorm:"id" json:"id"` - CreatedAt time.Time `xorm:"created_at" json:"createdAt"` - UpdatedAt time.Time `xorm:"updated_at" json:"updatedAt"` - - Cpu float64 `xorm:"cpu" json:"cpu"` - - LoadUsage float64 `xorm:"load_usage" json:"loadUsage"` - CpuLoad1 float64 `xorm:"cpu_load1" json:"cpuLoad1"` - CpuLoad5 float64 `xorm:"cpu_load5" json:"cpuLoad5"` - CpuLoad15 float64 `xorm:"cpu_load15" json:"cpuLoad15"` - - Memory float64 `xorm:"memory" json:"memory"` - - DbSize uint `xorm:"db_size" json:"dbSize"` -} - -type MonitorIO struct { - ID uint `xorm:"id" json:"id"` - CreatedAt time.Time `xorm:"created_at" json:"createdAt"` - UpdatedAt time.Time `xorm:"updated_at" json:"updatedAt"` - - Name string `xorm:"name" json:"name"` - Read uint64 `xorm:"read" json:"read"` - Write uint64 `xorm:"write" json:"write"` - Count uint64 `xorm:"count" json:"count"` - Time uint64 `xorm:"time" json:"time"` -} - -type MonitorNetwork struct { - ID uint `xorm:"id" json:"id"` - CreatedAt time.Time `xorm:"created_at" json:"createdAt"` - UpdatedAt time.Time `xorm:"updated_at" json:"updatedAt"` - - Name string `xorm:"name" json:"name"` - Up float64 `xorm:"up" json:"up"` - Down float64 `xorm:"down" json:"down"` -} - -type MonitorSearch struct { - Param string `json:"param" validate:"required,oneof=all cpu memory load io network"` - Info string `json:"info"` - StartTime time.Time `json:"startTime"` - EndTime time.Time `json:"endTime"` -} - -type MonitorData struct { - Param string `json:"param" validate:"required,oneof=cpu memory load io network"` - Date []time.Time `json:"date"` - Value []interface{} `json:"value"` -} diff --git a/features/monitor/monitor/monitor.go b/features/monitor/monitor/monitor.go deleted file mode 100644 index 4409e7dc..00000000 --- a/features/monitor/monitor/monitor.go +++ /dev/null @@ -1,162 +0,0 @@ -package monitor - -import ( - "net/http" - "sort" - "strings" - "time" - - "be.ems/lib/core/utils/ctx" - "be.ems/lib/dborm" - "be.ems/lib/services" - "be.ems/restagent/config" - "github.com/shirou/gopsutil/disk" - "github.com/shirou/gopsutil/net" -) - -// 点击【主机 - 监控】菜单,进入监控报表,直观的了解服务器的运行状态,包含【平均负载】、【CPU性能监控】、【内存使用监控】、【磁盘IO监控】、【网络IO监控】 - -// 可以查看昨天,今天,最近7天,最近30天,自定义时间的监控指标情况。 -// 默认监控是开启的,可以在【面板设置 - 监控】页面中根据需求对监控进行开启和关闭。 -// 监控数据默认保存30天,可以自行修改,也可手动清理该日志。 - -var ( - // IP地址 - UriIPAddr = config.DefaultUriPrefix + "/monitor/{apiVersion}/monitor/ipaddr" - // 可选网络 - UriNetOpt = config.DefaultUriPrefix + "/monitor/{apiVersion}/monitor/netoptions" - // 可选磁盘 - UriIoOpt = config.DefaultUriPrefix + "/monitor/{apiVersion}/monitor/iooptions" - // 加载 - UriLoad = config.DefaultUriPrefix + "/monitor/{apiVersion}/monitor/load" - - // IP地址 - UriIPAddrOAM = config.UriPrefix + "/monitor/{apiVersion}/monitor/ipaddr" - // 可选网络 - UriNetOptOAM = config.UriPrefix + "/monitor/{apiVersion}/monitor/netoptions" - // 可选磁盘 - UriIoOptOAM = config.UriPrefix + "/monitor/{apiVersion}/monitor/iooptions" - // 加载 - UriLoadOAM = config.UriPrefix + "/monitor/{apiVersion}/monitor/load" -) - -// IPAddr IP地址 -func IPAddr(w http.ResponseWriter, r *http.Request) { - ipAddrs := []map[string]string{} - interfaces, err := net.Interfaces() - if err == nil { - for _, iface := range interfaces { - addrs := map[string]string{} - for _, v := range iface.Addrs { - prefix := strings.Split(v.Addr, "/")[0] - if strings.Contains(prefix, "::") { - addrs["IPv6"] = prefix - } - if strings.Contains(prefix, ".") { - addrs["IPv4"] = prefix - } - } - ipAddrs = append(ipAddrs, addrs) - } - } - services.ResponseWithJson(w, 200, ipAddrs) -} - -// Netoptions 可选网络 -func Netoptions(w http.ResponseWriter, r *http.Request) { - netStat, _ := net.IOCounters(true) - var options []string - options = append(options, "all") - for _, net := range netStat { - options = append(options, net.Name) - } - sort.Strings(options) - services.ResponseWithJson(w, 200, options) -} - -// Iooptions 可选磁盘 -func Iooptions(w http.ResponseWriter, r *http.Request) { - diskStat, _ := disk.IOCounters() - var options []string - options = append(options, "all") - for _, net := range diskStat { - options = append(options, net.Name) - } - sort.Strings(options) - services.ResponseWithJson(w, 200, options) -} - -// LoadMonitor 载入监控 -func LoadMonitor(w http.ResponseWriter, r *http.Request) { - // json 請求參數獲取 - var bodyArgs MonitorSearch - err := ctx.ShouldBindJSON(r, &bodyArgs) - if err != nil || dborm.DbClient.XEngine == nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - loc := time.Now().Location() - bodyArgs.StartTime = bodyArgs.StartTime.In(loc) - bodyArgs.EndTime = bodyArgs.EndTime.In(loc) - - var backdatas []MonitorData - if bodyArgs.Param == "all" || bodyArgs.Param == "cpu" || bodyArgs.Param == "memory" || bodyArgs.Param == "load" { - var bases []MonitorBase - err := dborm.DbClient.XEngine.Table("monitor_base"). - Where("created_at > ? AND created_at < ?", bodyArgs.StartTime, bodyArgs.EndTime). - Desc("created_at"). - Find(&bases) - if err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - var itemData MonitorData - itemData.Param = "base" - for _, base := range bases { - itemData.Date = append(itemData.Date, base.CreatedAt) - itemData.Value = append(itemData.Value, base) - } - backdatas = append(backdatas, itemData) - } - if bodyArgs.Param == "all" || bodyArgs.Param == "io" { - var bases []MonitorIO - err := dborm.DbClient.XEngine.Table("monitor_io"). - Where("created_at > ? AND created_at < ?", bodyArgs.StartTime, bodyArgs.EndTime). - Desc("created_at"). - Find(&bases) - if err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - var itemData MonitorData - itemData.Param = "io" - for _, base := range bases { - itemData.Date = append(itemData.Date, base.CreatedAt) - itemData.Value = append(itemData.Value, base) - } - backdatas = append(backdatas, itemData) - } - if bodyArgs.Param == "all" || bodyArgs.Param == "network" { - var bases []MonitorNetwork - err := dborm.DbClient.XEngine.Table("monitor_network"). - Where("name = ? AND created_at > ? AND created_at < ?", bodyArgs.Info, bodyArgs.StartTime, bodyArgs.EndTime). - Desc("created_at"). - Find(&bases) - if err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - var itemData MonitorData - itemData.Param = "network" - for _, base := range bases { - itemData.Date = append(itemData.Date, base.CreatedAt) - itemData.Value = append(itemData.Value, base) - } - backdatas = append(backdatas, itemData) - } - services.ResponseWithJson(w, 200, backdatas) -} diff --git a/features/monitor/monitor/task.go b/features/monitor/monitor/task.go deleted file mode 100644 index a30521a4..00000000 --- a/features/monitor/monitor/task.go +++ /dev/null @@ -1,233 +0,0 @@ -package monitor - -import ( - "encoding/json" - "fmt" - "strconv" - "time" - - "be.ems/lib/dborm" - "be.ems/lib/log" - "be.ems/restagent/config" - "github.com/robfig/cron/v3" - "github.com/shirou/gopsutil/v3/cpu" - "github.com/shirou/gopsutil/v3/disk" - "github.com/shirou/gopsutil/v3/load" - "github.com/shirou/gopsutil/v3/mem" - "github.com/shirou/gopsutil/v3/net" -) - -type MonitorService struct{} - -type IMonitorService interface { - Run() -} - -func NewIMonitorService() IMonitorService { - return &MonitorService{} -} - -func (m *MonitorService) Run() { - // monitorStatus, _ := dborm.XormGetConfig("SystemMonitor", "MonitorStatus") - // if monitorStatus["value"] == "disable" { - // return - // } - var itemModel MonitorBase - itemModel.CreatedAt = time.Now() - itemModel.UpdatedAt = time.Now() - - totalPercent, _ := cpu.Percent(3*time.Second, false) - if len(totalPercent) == 1 { - itemModel.Cpu = totalPercent[0] - } - cpuCount, _ := cpu.Counts(false) - - loadInfo, _ := load.Avg() - itemModel.CpuLoad1 = loadInfo.Load1 - itemModel.CpuLoad5 = loadInfo.Load5 - itemModel.CpuLoad15 = loadInfo.Load15 - itemModel.LoadUsage = loadInfo.Load1 / (float64(cpuCount*2) * 0.75) * 100 - - memoryInfo, _ := mem.VirtualMemory() - itemModel.Memory = memoryInfo.UsedPercent - - var dataSize int - conf := config.GetYamlConfig() - result, err := dborm.DbClient.XEngine.QueryString("SELECT SUM(data_length) AS data_size FROM information_schema.tables WHERE TABLE_SCHEMA = ?;", conf.Database.Name) - if err != nil { - dataSize = 0 - } else { - v, _ := strconv.Atoi(result[0]["data_size"]) - dataSize = v - } - itemModel.DbSize = uint(dataSize) - - _, errx := dborm.DbClient.XEngine.Table("monitor_base").Insert(itemModel) - if errx != nil { - log.Errorf("Insert basic monitoring data failed, err: %v", err) - } - - go loadDiskIO() - go loadNetIO() - - // 删除保留的记录 - // monitorStoreDays, _ := dborm.XormGetConfig("SystemMonitor", "MonitorStoreDays") - // if monitorStoreDays["value"] != "" { - // return - // } - // storeDays, err := strconv.Atoi(MonitorStoreDays.Value) - // if err != nil { - // timeForDelete := time.Now().AddDate(0, 0, -storeDays) - // DelMonitorBase(timeForDelete) - // DelMonitorIO(timeForDelete) - // DelMonitorNet(timeForDelete) - // } - -} - -func loadDiskIO() { - ioStat, _ := disk.IOCounters() - - time.Sleep(60 * time.Second) - - ioStat2, _ := disk.IOCounters() - var ioList []MonitorIO - for _, io2 := range ioStat2 { - for _, io1 := range ioStat { - if io2.Name == io1.Name { - var itemIO MonitorIO - itemIO.CreatedAt = time.Now() - itemIO.UpdatedAt = time.Now() - - itemIO.Name = io1.Name - if io2.ReadBytes != 0 && io1.ReadBytes != 0 && io2.ReadBytes > io1.ReadBytes { - itemIO.Read = uint64(float64(io2.ReadBytes-io1.ReadBytes) / 60) - } - if io2.WriteBytes != 0 && io1.WriteBytes != 0 && io2.WriteBytes > io1.WriteBytes { - itemIO.Write = uint64(float64(io2.WriteBytes-io1.WriteBytes) / 60) - } - - if io2.ReadCount != 0 && io1.ReadCount != 0 && io2.ReadCount > io1.ReadCount { - itemIO.Count = uint64(float64(io2.ReadCount-io1.ReadCount) / 60) - } - writeCount := uint64(0) - if io2.WriteCount != 0 && io1.WriteCount != 0 && io2.WriteCount > io1.WriteCount { - writeCount = uint64(float64(io2.WriteCount-io1.WriteCount) / 60) - } - if writeCount > itemIO.Count { - itemIO.Count = writeCount - } - - if io2.ReadTime != 0 && io1.ReadTime != 0 && io2.ReadTime > io1.ReadTime { - itemIO.Time = uint64(float64(io2.ReadTime-io1.ReadTime) / 60) - } - writeTime := uint64(0) - if io2.WriteTime != 0 && io1.WriteTime != 0 && io2.WriteTime > io1.WriteTime { - writeTime = uint64(float64(io2.WriteTime-io1.WriteTime) / 60) - } - if writeTime > itemIO.Time { - itemIO.Time = writeTime - } - ioList = append(ioList, itemIO) - break - } - } - } - _, err := dborm.DbClient.XEngine.Table("monitor_io").Insert(ioList) - if err != nil { - log.Errorf("Insert io monitoring data failed, err: %v", err) - } -} - -func loadNetIO() { - netStat, _ := net.IOCounters(true) - netStatAll, _ := net.IOCounters(false) - - time.Sleep(60 * time.Second) - - netStat2, _ := net.IOCounters(true) - var netList []MonitorNetwork - for _, net2 := range netStat2 { - for _, net1 := range netStat { - if net2.Name == net1.Name { - var itemNet MonitorNetwork - itemNet.CreatedAt = time.Now() - itemNet.UpdatedAt = time.Now() - - itemNet.Name = net1.Name - - if net2.BytesSent != 0 && net1.BytesSent != 0 && net2.BytesSent > net1.BytesSent { - itemNet.Up = float64(net2.BytesSent-net1.BytesSent) / 1024 / 60 - } - if net2.BytesRecv != 0 && net1.BytesRecv != 0 && net2.BytesRecv > net1.BytesRecv { - itemNet.Down = float64(net2.BytesRecv-net1.BytesRecv) / 1024 / 60 - } - netList = append(netList, itemNet) - break - } - } - } - netStatAll2, _ := net.IOCounters(false) - for _, net2 := range netStatAll2 { - for _, net1 := range netStatAll { - if net2.Name == net1.Name { - var itemNet MonitorNetwork - itemNet.Name = net1.Name - if net2.BytesSent != 0 && net1.BytesSent != 0 && net2.BytesSent > net1.BytesSent { - itemNet.Up = float64(net2.BytesSent-net1.BytesSent) / 1024 / 60 - } - - if net2.BytesRecv != 0 && net1.BytesRecv != 0 && net2.BytesRecv > net1.BytesRecv { - itemNet.Down = float64(net2.BytesRecv-net1.BytesRecv) / 1024 / 60 - } - netList = append(netList, itemNet) - break - } - } - } - - _, err := dborm.DbClient.XEngine.Table("monitor_network").Insert(netList) - if err != nil { - log.Errorf("Insert network monitoring data failed, err: %v", err) - } -} - -var c *cron.Cron -var monitorCronID int - -func init() { - c = cron.New() - c.Start() - monitorCronID = 0 -} - -// StartMonitor 开始监控任务 removeBefore删除上次任务,间隔interval分钟 -func StartMonitor(removeBefore bool, interval string) error { - if removeBefore { - c.Remove(cron.EntryID(monitorCronID)) - } - - // 读取配置 - if interval == "" { - v, err := dborm.XormGetConfig("SystemMonitor", "sampleTime") - if err != nil { - return err - } - data := make(map[string]any) - err = json.Unmarshal([]byte(v["value_json"].(string)), &data) - if err != nil { - log.Error("json StartMonitor:%s", err.Error()) - return err - } - interval = data["sampleTime"].(string) - } - - imservice := NewIMonitorService() - monitorID, err := c.AddJob(fmt.Sprintf("@every %sm", interval), imservice) - if err != nil { - return err - } - imservice.Run() - monitorCronID = int(monitorID) - return nil -} diff --git a/features/monitor/psnet/psnet.go b/features/monitor/psnet/psnet.go deleted file mode 100644 index fa0ca827..00000000 --- a/features/monitor/psnet/psnet.go +++ /dev/null @@ -1,93 +0,0 @@ -package psnet - -import ( - "fmt" - "net" - "net/http" - "time" - - "be.ems/lib/core/utils/ctx" - "be.ems/lib/log" - "be.ems/lib/services" - "be.ems/lib/wsinfo" - "be.ems/restagent/config" - "github.com/gorilla/websocket" - "github.com/shirou/gopsutil/process" -) - -var ( - // websockte通信 - UriWs = config.DefaultUriPrefix + "/monitor/{apiVersion}/psnet/ws" - // 停止进程 - UriStop = config.DefaultUriPrefix + "/monitor/{apiVersion}/psnet/stop" - - // 检查ip端口请求 - UriPing = config.DefaultUriPrefix + "/monitor/{apiVersion}/psnet/ping" -) - -// 进程管理 -var wsUpgrade = websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { - return true - }, -} - -// ProcessWs -func ProcessWs(w http.ResponseWriter, r *http.Request) { - ws, err := wsUpgrade.Upgrade(w, r, nil) - if err != nil { - return - } - wsClient := wsinfo.NewWsClient("processClient", ws) - go wsClient.Read() - go wsClient.Write() -} - -// 停止进程 {"PID":30040} -func StopProcess(w http.ResponseWriter, r *http.Request) { - // json 請求參數獲取 - var bodyArgs struct { - PID int32 `json:"PID" validate:"required"` - } - err := ctx.ShouldBindJSON(r, &bodyArgs) - if err != nil { - log.Error("io.ReadAll is failed:", err) - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - proc, err := process.NewProcess(bodyArgs.PID) - if err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - if err := proc.Kill(); err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - services.ResponseStatusOK200Null(w) -} - -// 检查ip端口请求 -func Ping(w http.ResponseWriter, r *http.Request) { - // json 請求參數獲取 - var bodyArgs struct { - Host string `json:"host" validate:"required"` - Port string `json:"port" validate:"required"` - } - err := ctx.ShouldBindJSON(r, &bodyArgs) - if err != nil { - log.Error("io.ReadAll is failed:", err) - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - - conn, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%s", bodyArgs.Host, bodyArgs.Port), 3*time.Second) - if err != nil { - services.ResponseErrorWithJson(w, 400, err.Error()) - return - } - defer conn.Close() - services.ResponseStatusOK200Null(w) - -} diff --git a/features/security/account.go b/features/security/account.go index c1190fc3..9440aba9 100644 --- a/features/security/account.go +++ b/features/security/account.go @@ -2,30 +2,16 @@ package security import ( "encoding/json" - "fmt" - "image/color" "io" "net/http" - "strconv" "strings" - "time" - "be.ems/features/security/service" - sysConfigService "be.ems/features/sys_config/service" - "be.ems/lib/core/account" - "be.ems/lib/core/cache" - "be.ems/lib/core/constants/cachekey" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/vo/result" "be.ems/lib/dborm" "be.ems/lib/global" "be.ems/lib/log" "be.ems/lib/oauth" "be.ems/lib/services" "be.ems/restagent/config" - srcConfig "be.ems/src/framework/config" - "be.ems/src/framework/redis" - "github.com/mojocn/base64Captcha" ) var ( @@ -34,22 +20,6 @@ var ( CustomUriOauthToken = config.UriPrefix + "/securityManagement/{apiVersion}/{elementTypeValue}/token" CustomUriOauthHandshake = config.UriPrefix + "/securityManagement/{apiVersion}/{elementTypeValue}/handshake" - - // 系统登录 - UriLogin = config.DefaultUriPrefix + "/securityManagement/{apiVersion}/login" - CustomUriLogin = config.UriPrefix + "/securityManagement/{apiVersion}/login" - - // 获取验证码 - UriCaptchaImage = config.DefaultUriPrefix + "/securityManagement/{apiVersion}/captchaImage" - CustomUriCaptchaImage = config.UriPrefix + "/securityManagement/{apiVersion}/captchaImage" - - // 登录用户信息 - UriUserInfo = config.DefaultUriPrefix + "/securityManagement/{apiVersion}/getUserInfo" - CustomUriUserInfo = config.UriPrefix + "/securityManagement/{apiVersion}/getUserInfo" - - // 登录用户路由信息 - UriRouters = config.DefaultUriPrefix + "/securityManagement/{apiVersion}/getRouters" - CustomUriRouters = config.UriPrefix + "/securityManagement/{apiVersion}/getRouters" ) func LoginFromOMC(w http.ResponseWriter, r *http.Request) { @@ -134,14 +104,8 @@ func LoginFromOMC(w http.ResponseWriter, r *http.Request) { } if user != nil { - // 缓存用户信息 - account.CacheLoginUser(user) - redis.SetByExpire("", "session_token", token, time.Second*1800) - // 角色权限集合,管理员拥有所有权限 - userId := fmt.Sprint(user.Id) - isAdmin := srcConfig.IsAdmin(userId) - roles, perms := service.NewServiceAccount.RoleAndMenuPerms(userId, isAdmin) - services.ResponseStatusOK200LoginWhitRP(w, token, user, roles, perms) + empty := []string{} + services.ResponseStatusOK200LoginWhitRP(w, token, user, empty, empty) return } services.ResponseBadRequest400IncorrectLogin(w) @@ -223,189 +187,3 @@ func HandshakeFromOMC(w http.ResponseWriter, r *http.Request) { } services.ResponseStatusOK200Null(w) } - -// 系统登录 -// -// POST /login -func LoginOMC(w http.ResponseWriter, r *http.Request) { - log.Info("LoginOMC processing... ") - var body struct { - Username string `json:"username" binding:"required"` // Username 用户名 - Password string `json:"password" binding:"required"` // Password 用户密码 - Code string `json:"code"` // Code 验证码 - UUID string `json:"uuid"` // UUID 验证码唯一标识 - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil { - log.Error("Invalid Json Format") - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // response 400-5 - if body.Username == "" || body.Password == "" { - log.Error("Wrong parameter value") - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 校验验证码 - // 从数据库配置获取验证码开关 true开启,false关闭 - captchaEnabledStr := sysConfigService.NewServiceSysConfig.SelectConfigValueByKey("sys.account.captchaEnabled") - captchaEnabled, err := strconv.ParseBool(captchaEnabledStr) - if err != nil { - captchaEnabled = false - } - if captchaEnabled { - if body.Code == "" || body.UUID == "" { - log.Error("Authentication failed, mismatch captcha") - ctx.JSON(w, 400, result.CodeMsg(400, "Verification code information error")) - return - } - verifyKey := cachekey.CAPTCHA_CODE_KEY + body.UUID - captcha, ok := cache.GetLocalTTL(verifyKey) - if captcha == nil || !ok { - log.Error("Authentication failed, captcha emtry") - ctx.JSON(w, 400, result.CodeMsg(400, "The verification code has expired")) - return - } - cache.DeleteLocalTTL(verifyKey) - if captcha.(string) != body.Code { - log.Error("Authentication failed, not match captcha") - ctx.JSON(w, 400, result.CodeMsg(400, "Verification code error")) - return - } - } - - validUser, user, err := dborm.XormCheckLoginUser(body.Username, body.Password, config.GetYamlConfig().Auth.Crypt) - if !validUser || err != nil { - // response 400-4 - log.Error("Authentication failed, mismatch user or password") - ctx.JSON(w, 400, result.CodeMsg(400, err.Error())) - return - } - - token := oauth.GenRandToken("omc") // Generate new token to session ID - sourceAddr := r.RemoteAddr[:strings.Index(r.RemoteAddr, ":")] - affected, err := dborm.XormInsertSession(body.Username, sourceAddr, token, - config.GetExpiresFromConfig(), config.GetYamlConfig().Auth.Session) - if err != nil { - log.Error("Failed to XormInsertSession:", err) - if affected == -1 { - services.ResponseForbidden403MultiLoginNotAllowed(w) - } else { - services.ResponseBadRequest400IncorrectLogin(w) - } - - return - } - - if user != nil { - // 缓存用户信息 - account.CacheLoginUser(user) - redis.SetByExpire("", "session_token", token, time.Second*1800) - ctx.JSON(w, 200, result.OkData(map[string]any{ - "accessToken": token, - })) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 获取验证码 -// -// GET /captchaImage -func CaptchaImage(w http.ResponseWriter, r *http.Request) { - configService := sysConfigService.NewServiceSysConfig - - // 从数据库配置获取验证码开关 true开启,false关闭 - captchaEnabledStr := configService.SelectConfigValueByKey("sys.account.captchaEnabled") - captchaEnabled, err := strconv.ParseBool(captchaEnabledStr) - if err != nil { - captchaEnabled = false - } - if !captchaEnabled { - ctx.JSON(w, 200, result.Ok(map[string]any{ - "captchaEnabled": captchaEnabled, - })) - return - } - - // 生成唯一标识 - verifyKey := "" - data := map[string]any{ - "captchaEnabled": captchaEnabled, - "uuid": "", - "img": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", - } - - // char 字符验证 - driverCaptcha := &base64Captcha.DriverString{ - //Height png height in pixel. - Height: 40, - // Width Captcha png width in pixel. - Width: 120, - //NoiseCount text noise count. - NoiseCount: 4, - //Length random string length. - Length: 4, - //Source is a unicode which is the rand string from. - Source: "023456789abcdefghjkmnprstuvwxyz", - //ShowLineOptions := OptionShowHollowLine | OptionShowSlimeLine | OptionShowSineLine . - ShowLineOptions: base64Captcha.OptionShowHollowLine, - //BgColor captcha image background color (optional) - BgColor: &color.RGBA{ - R: 250, - G: 250, - B: 250, - A: 255, // 不透明 - }, - } - // 验证码生成 - id, question, answer := driverCaptcha.GenerateIdQuestionAnswer() - // 验证码表达式解析输出 - item, err := driverCaptcha.DrawCaptcha(question) - if err != nil { - log.Infof("Generate Id Question Answer %s : %v", question, err) - } else { - data["uuid"] = id - data["img"] = item.EncodeB64string() - verifyKey = cachekey.CAPTCHA_CODE_KEY + id - cache.SetLocalTTL(verifyKey, answer, 120*time.Second) - } - - // 本地开发下返回验证码结果,方便接口调试 - // text, ok := cache.GetLocalTTL(verifyKey) - // if ok { - // data["text"] = text.(string) - // } - - ctx.JSON(w, 200, result.Ok(data)) -} - -// 登录用户信息 -func UserInfo(w http.ResponseWriter, r *http.Request) { - loginUser, err := ctx.LoginUser(r) - if err != nil { - ctx.JSON(w, 200, result.OkData(err.Error())) - } - // 角色权限集合,管理员拥有所有权限 - userId := fmt.Sprint(loginUser.UserID) - isAdmin := srcConfig.IsAdmin(userId) - roles, perms := service.NewServiceAccount.RoleAndMenuPerms(userId, isAdmin) - - ctx.JSON(w, 200, result.OkData(map[string]any{ - "user": loginUser.User, - "roles": roles, - "permissions": perms, - })) -} - -// 登录用户路由信息 -func Routers(w http.ResponseWriter, r *http.Request) { - userID := ctx.LoginUserToUserID(r) - - // 前端路由,管理员拥有所有 - isAdmin := srcConfig.IsAdmin(userID) - buildMenus := service.NewServiceAccount.RouteMenus(userID, isAdmin) - ctx.JSON(w, 200, result.OkData(buildMenus)) -} diff --git a/features/security/service/service_account.go b/features/security/service/service_account.go deleted file mode 100644 index 28aa2c84..00000000 --- a/features/security/service/service_account.go +++ /dev/null @@ -1,56 +0,0 @@ -package service - -import ( - menuService "be.ems/features/sys_menu/service" - roleService "be.ems/features/sys_role/service" - userService "be.ems/features/sys_user/service" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo" -) - -// 实例化服务层 ServiceAccount 结构体 -var NewServiceAccount = &ServiceAccount{ - sysUserService: userService.NewServiceSysUser, - sysRoleService: roleService.NewServiceSysRole, - sysMenuService: menuService.NewServiceSysMenu, -} - -// 账号身份操作服务 服务层处理 -type ServiceAccount struct { - // 用户信息服务 - sysUserService *userService.ServiceSysUser - // 角色服务 - sysRoleService *roleService.ServiceSysRole - // 菜单服务 - sysMenuService *menuService.ServiceSysMenu -} - -// RoleAndMenuPerms 角色和菜单数据权限 -func (s *ServiceAccount) RoleAndMenuPerms(userId string, isAdmin bool) ([]string, []string) { - if isAdmin { - return []string{"admin"}, []string{"*:*:*"} - } else { - // 角色key - roleGroup := []string{} - roles := s.sysRoleService.SelectRoleListByUserId(userId) - for _, role := range roles { - roleGroup = append(roleGroup, role.RoleKey) - } - // 菜单权限key - perms := s.sysMenuService.SelectMenuPermsByUserId(userId) - return parse.RemoveDuplicates(roleGroup), parse.RemoveDuplicates(perms) - } -} - -// RouteMenus 前端路由所需要的菜单 -func (s *ServiceAccount) RouteMenus(userId string, isAdmin bool) []vo.Router { - var buildMenus []vo.Router - if isAdmin { - menus := s.sysMenuService.SelectMenuTreeByUserId("*") - buildMenus = s.sysMenuService.BuildRouteMenus(menus, "") - } else { - menus := s.sysMenuService.SelectMenuTreeByUserId(userId) - buildMenus = s.sysMenuService.BuildRouteMenus(menus, "") - } - return buildMenus -} diff --git a/features/sys_config/api_sys_config.go b/features/sys_config/api_sys_config.go deleted file mode 100644 index b8cbb5f1..00000000 --- a/features/sys_config/api_sys_config.go +++ /dev/null @@ -1,230 +0,0 @@ -package sysconfig - -import ( - "fmt" - "net/http" - "strings" - - "be.ems/features/sys_config/model" - "be.ems/features/sys_config/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" -) - -// 参数配置信息接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysConfigApi 结构体 - var apis = &SysConfigApi{ - sysConfigService: service.NewServiceSysConfig, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/configs", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/config/{configId}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/config", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/config", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/config/{configIds}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/config/refreshCache", - Handler: apis.RefreshCache, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/config/configKey/{configKey}", - Handler: apis.ConfigKey, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/configManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// 参数配置信息 -// -// PATH /configManage -type SysConfigApi struct { - // 参数配置服务 - sysConfigService *service.ServiceSysConfig -} - -// 参数配置列表 -// -// GET /list -func (s *SysConfigApi) List(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - data := s.sysConfigService.SelectConfigPage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 参数配置信息 -// -// GET /:configId -func (s *SysConfigApi) Info(w http.ResponseWriter, r *http.Request) { - configId := ctx.Param(r, "configId") - if configId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - data := s.sysConfigService.SelectConfigById(configId) - if data.ConfigID == configId { - ctx.JSON(w, 200, result.OkData(data)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 参数配置新增 -// -// POST / -func (s *SysConfigApi) Add(w http.ResponseWriter, r *http.Request) { - var body model.SysConfig - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.ConfigID != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查属性值唯一 - uniqueConfigKey := s.sysConfigService.CheckUniqueConfigKey(body.ConfigKey, "") - if !uniqueConfigKey { - msg := fmt.Sprintf("[%s] Parameter key name already exists", body.ConfigKey) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(r) - insertId := s.sysConfigService.InsertConfig(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 参数配置修改 -// -// PUT / -func (s *SysConfigApi) Edit(w http.ResponseWriter, r *http.Request) { - var body model.SysConfig - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.ConfigID == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查属性值唯一 - uniqueConfigKey := s.sysConfigService.CheckUniqueConfigKey(body.ConfigKey, body.ConfigID) - if !uniqueConfigKey { - msg := fmt.Sprintf("[%s] Parameter key name already exists", body.ConfigKey) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查是否存在 - config := s.sysConfigService.SelectConfigById(body.ConfigID) - if config.ConfigID != body.ConfigID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access parameter configuration data!")) - return - } - - body.UpdateBy = ctx.LoginUserToUserName(r) - rows := s.sysConfigService.UpdateConfig(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 参数配置删除 -// -// DELETE /:configIds -func (s *SysConfigApi) Remove(w http.ResponseWriter, r *http.Request) { - configIds := ctx.Param(r, "configIds") - if configIds == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(configIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - rows, err := s.sysConfigService.DeleteConfigByIds(uniqueIDs) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - msg := fmt.Sprintf("删除成功:%d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) -} - -// 参数配置刷新缓存 -// -// PUT /refreshCache -func (s *SysConfigApi) RefreshCache(w http.ResponseWriter, r *http.Request) { - s.sysConfigService.ResetConfigCache() - ctx.JSON(w, 200, result.Ok(nil)) -} - -// 参数配置根据参数键名 -// -// GET /configKey/:configKey -func (s *SysConfigApi) ConfigKey(w http.ResponseWriter, r *http.Request) { - configKey := ctx.Param(r, "configKey") - if configKey == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - key := s.sysConfigService.SelectConfigValueByKey(configKey) - if key != "" { - ctx.JSON(w, 200, result.OkData(key)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} diff --git a/features/sys_config/model/sys_config.go b/features/sys_config/model/sys_config.go deleted file mode 100644 index 8949c67b..00000000 --- a/features/sys_config/model/sys_config.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -// 参数配置对象 sys_config -type SysConfig struct { - // 参数主键 - ConfigID string `json:"configId"` - // 参数名称 - ConfigName string `json:"configName" binding:"required"` - // 参数键名 - ConfigKey string `json:"configKey" binding:"required"` - // 参数键值 - ConfigValue string `json:"configValue" binding:"required"` - // 系统内置(Y是 N否) - ConfigType string `json:"configType"` - // 创建者 - CreateBy string `json:"createBy"` - // 创建时间 - CreateTime int64 `json:"createTime"` - // 更新者 - UpdateBy string `json:"updateBy"` - // 更新时间 - UpdateTime int64 `json:"updateTime"` - // 备注 - Remark string `json:"remark"` -} diff --git a/features/sys_config/service/repo_sys_config.go b/features/sys_config/service/repo_sys_config.go deleted file mode 100644 index c4065269..00000000 --- a/features/sys_config/service/repo_sys_config.go +++ /dev/null @@ -1,336 +0,0 @@ -package service - -import ( - "fmt" - "strings" - "time" - - "be.ems/features/sys_config/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/date" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysConfig 结构体 -var NewRepoSysConfig = &RepoSysConfig{ - selectSql: `select - config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark - from sys_config`, - - resultMap: map[string]string{ - "config_id": "ConfigID", - "config_name": "ConfigName", - "config_key": "ConfigKey", - "config_value": "ConfigValue", - "config_type": "ConfigType", - "remark": "Remark", - "create_by": "CreateBy", - "create_time": "CreateTime", - "update_by": "UpdateBy", - "update_time": "UpdateTime", - }, -} - -// RepoSysConfig 参数配置表 数据层处理 -type RepoSysConfig struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysConfig) convertResultRows(rows []map[string]any) []model.SysConfig { - arr := make([]model.SysConfig, 0) - for _, row := range rows { - sysConfig := model.SysConfig{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&sysConfig, keyMapper, value) - } - } - arr = append(arr, sysConfig) - } - return arr -} - -// SelectDictDataPage 分页查询参数配置列表数据 -func (r *RepoSysConfig) SelectConfigPage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["configName"]; ok && v != "" { - conditions = append(conditions, "config_name like concat(?, '%')") - params = append(params, v) - } - if v, ok := query["configType"]; ok && v != "" { - conditions = append(conditions, "config_type = ?") - params = append(params, v) - } - if v, ok := query["configKey"]; ok && v != "" { - conditions = append(conditions, "config_key like concat(?, '%')") - params = append(params, v) - } - beginTime, ok := query["beginTime"] - if !ok { - beginTime, ok = query["params[beginTime]"] - } - if ok && beginTime != "" { - conditions = append(conditions, "create_time >= ?") - beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD) - params = append(params, beginDate.UnixMilli()) - } - endTime, ok := query["endTime"] - if !ok { - endTime, ok = query["params[endTime]"] - } - if ok && endTime != "" { - conditions = append(conditions, "create_time <= ?") - endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD) - params = append(params, endDate.UnixMilli()) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := "select count(1) as 'total' from sys_config" - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []model.SysConfig{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := r.selectSql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectConfigList 查询参数配置列表 -func (r *RepoSysConfig) SelectConfigList(sysConfig model.SysConfig) []model.SysConfig { - // 查询条件拼接 - var conditions []string - var params []any - if sysConfig.ConfigName != "" { - conditions = append(conditions, "config_name like concat(?, '%')") - params = append(params, sysConfig.ConfigName) - } - if sysConfig.ConfigType != "" { - conditions = append(conditions, "config_type = ?") - params = append(params, sysConfig.ConfigType) - } - if sysConfig.ConfigKey != "" { - conditions = append(conditions, "config_key like concat(?, '%')") - params = append(params, sysConfig.ConfigKey) - } - if sysConfig.CreateTime > 0 { - conditions = append(conditions, "create_time >= ?") - params = append(params, sysConfig.CreateTime) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - querySql := r.selectSql + whereSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysConfig{} - } - - // 转换实体 - return r.convertResultRows(results) -} - -// SelectConfigValueByKey 通过参数键名查询参数键值 -func (r *RepoSysConfig) SelectConfigValueByKey(configKey string) string { - querySql := "select config_value as 'str' from sys_config where config_key = ?" - results, err := datasource.RawDB("", querySql, []any{configKey}) - if err != nil { - log.Errorf("query err => %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - -// SelectConfigByIds 通过配置ID查询参数配置信息 -func (r *RepoSysConfig) SelectConfigByIds(configIds []string) []model.SysConfig { - placeholder := datasource.KeyPlaceholderByQuery(len(configIds)) - querySql := r.selectSql + " where config_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(configIds) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysConfig{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// CheckUniqueConfig 校验配置参数是否唯一 -func (r *RepoSysConfig) CheckUniqueConfig(sysConfig model.SysConfig) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysConfig.ConfigKey != "" { - conditions = append(conditions, "config_key = ?") - params = append(params, sysConfig.ConfigKey) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select config_id as 'str' from sys_config " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - -// InsertConfig 新增参数配置 -func (r *RepoSysConfig) InsertConfig(sysConfig model.SysConfig) string { - // 参数拼接 - params := make(map[string]any) - if sysConfig.ConfigName != "" { - params["config_name"] = sysConfig.ConfigName - } - if sysConfig.ConfigKey != "" { - params["config_key"] = sysConfig.ConfigKey - } - if sysConfig.ConfigValue != "" { - params["config_value"] = sysConfig.ConfigValue - } - if sysConfig.ConfigType != "" { - params["config_type"] = sysConfig.ConfigType - } - if sysConfig.Remark != "" { - params["remark"] = sysConfig.Remark - } - if sysConfig.CreateBy != "" { - params["create_by"] = sysConfig.CreateBy - params["create_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into sys_config (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// UpdateConfig 修改参数配置 -func (r *RepoSysConfig) UpdateConfig(sysConfig model.SysConfig) int64 { - // 参数拼接 - params := make(map[string]any) - if sysConfig.ConfigName != "" { - params["config_name"] = sysConfig.ConfigName - } - if sysConfig.ConfigKey != "" { - params["config_key"] = sysConfig.ConfigKey - } - if sysConfig.ConfigValue != "" { - params["config_value"] = sysConfig.ConfigValue - } - if sysConfig.ConfigType != "" { - params["config_type"] = sysConfig.ConfigType - } - if sysConfig.Remark != "" { - params["remark"] = sysConfig.Remark - } - if sysConfig.UpdateBy != "" { - params["update_by"] = sysConfig.UpdateBy - params["update_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update sys_config set " + strings.Join(keys, ",") + " where config_id = ?" - - // 执行更新 - values = append(values, sysConfig.ConfigID) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// DeleteConfigByIds 批量删除参数配置信息 -func (r *RepoSysConfig) DeleteConfigByIds(configIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(configIds)) - sql := "delete from sys_config where config_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(configIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} diff --git a/features/sys_config/service/service_sys_config.go b/features/sys_config/service/service_sys_config.go deleted file mode 100644 index ede49ab7..00000000 --- a/features/sys_config/service/service_sys_config.go +++ /dev/null @@ -1,155 +0,0 @@ -package service - -import ( - "errors" - - "be.ems/features/sys_config/model" - "be.ems/lib/core/cache" - "be.ems/lib/core/constants/cachekey" -) - -// 实例化服务层 ServiceSysConfig 结构体 -var NewServiceSysConfig = &ServiceSysConfig{ - sysConfigRepository: NewRepoSysConfig, -} - -// ServiceSysConfig 参数配置 服务层处理 -type ServiceSysConfig struct { - // 参数配置表 - sysConfigRepository *RepoSysConfig -} - -// SelectDictDataPage 分页查询参数配置列表数据 -func (r *ServiceSysConfig) SelectConfigPage(query map[string]any) map[string]any { - return r.sysConfigRepository.SelectConfigPage(query) -} - -// SelectConfigList 查询参数配置列表 -func (r *ServiceSysConfig) SelectConfigList(sysConfig model.SysConfig) []model.SysConfig { - return r.sysConfigRepository.SelectConfigList(sysConfig) -} - -// SelectConfigValueByKey 通过参数键名查询参数键值 -func (r *ServiceSysConfig) SelectConfigValueByKey(configKey string) string { - cacheKey := r.getCacheKey(configKey) - // 从缓存中读取 - cacheValue, ok := cache.GetLocal(cacheKey) - if cacheValue != nil && ok { - return cacheValue.(string) - } - // 无缓存时读取数据放入缓存中 - configValue := r.sysConfigRepository.SelectConfigValueByKey(configKey) - if configValue != "" { - cache.SetLocal(cacheKey, configValue) - return configValue - } - return "" -} - -// SelectConfigById 通过配置ID查询参数配置信息 -func (r *ServiceSysConfig) SelectConfigById(configId string) model.SysConfig { - if configId == "" { - return model.SysConfig{} - } - configs := r.sysConfigRepository.SelectConfigByIds([]string{configId}) - if len(configs) > 0 { - return configs[0] - } - return model.SysConfig{} -} - -// CheckUniqueConfigKey 校验参数键名是否唯一 -func (r *ServiceSysConfig) CheckUniqueConfigKey(configKey, configId string) bool { - uniqueId := r.sysConfigRepository.CheckUniqueConfig(model.SysConfig{ - ConfigKey: configKey, - }) - if uniqueId == configId { - return true - } - return uniqueId == "" -} - -// InsertConfig 新增参数配置 -func (r *ServiceSysConfig) InsertConfig(sysConfig model.SysConfig) string { - configId := r.sysConfigRepository.InsertConfig(sysConfig) - if configId != "" { - r.loadingConfigCache(sysConfig.ConfigKey) - } - return configId -} - -// UpdateConfig 修改参数配置 -func (r *ServiceSysConfig) UpdateConfig(sysConfig model.SysConfig) int64 { - rows := r.sysConfigRepository.UpdateConfig(sysConfig) - if rows > 0 { - r.loadingConfigCache(sysConfig.ConfigKey) - } - return rows -} - -// DeleteConfigByIds 批量删除参数配置信息 -func (r *ServiceSysConfig) DeleteConfigByIds(configIds []string) (int64, error) { - // 检查是否存在 - configs := r.sysConfigRepository.SelectConfigByIds(configIds) - if len(configs) <= 0 { - return 0, errors.New("does not have permission to access parameter configuration data") - } - for _, config := range configs { - // 检查是否为内置参数 - if config.ConfigType == "Y" { - return 0, errors.New(config.ConfigID + " Configuration parameters are built-in parameters and their deletion is prohibited!") - } - // 清除缓存 - r.clearConfigCache(config.ConfigKey) - } - if len(configs) == len(configIds) { - rows := r.sysConfigRepository.DeleteConfigByIds(configIds) - return rows, nil - } - return 0, errors.New("failed to delete parameter configuration information") -} - -// ResetConfigCache 重置参数缓存数据 -func (r *ServiceSysConfig) ResetConfigCache() { - r.clearConfigCache("*") - r.loadingConfigCache("*") -} - -// getCacheKey 组装缓存key -func (r *ServiceSysConfig) getCacheKey(configKey string) string { - return cachekey.SYS_CONFIG_KEY + configKey -} - -// loadingConfigCache 加载参数缓存数据 -func (r *ServiceSysConfig) loadingConfigCache(configKey string) { - // 查询全部参数 - if configKey == "*" { - sysConfigs := r.SelectConfigList(model.SysConfig{}) - for _, v := range sysConfigs { - key := r.getCacheKey(v.ConfigKey) - cache.DeleteLocal(key) - cache.SetLocal(key, v.ConfigValue) - } - return - } - // 指定参数 - if configKey != "" { - cacheValue := r.sysConfigRepository.SelectConfigValueByKey(configKey) - if cacheValue != "" { - key := r.getCacheKey(configKey) - cache.DeleteLocal(key) - cache.SetLocal(key, cacheValue) - } - return - } -} - -// clearConfigCache 清空参数缓存数据 -func (r *ServiceSysConfig) clearConfigCache(configKey string) bool { - key := r.getCacheKey(configKey) - keys := cache.GetLocalKeys(key) - for _, v := range keys { - cache.DeleteLocal(v) - } - return len(keys) > 0 -} diff --git a/features/sys_dict_data/api_sys_dict_data.go b/features/sys_dict_data/api_sys_dict_data.go deleted file mode 100644 index 748ed55f..00000000 --- a/features/sys_dict_data/api_sys_dict_data.go +++ /dev/null @@ -1,247 +0,0 @@ -package sysdictdata - -import ( - "fmt" - "net/http" - "strings" - - "be.ems/features/sys_dict_data/model" - sysDictDataService "be.ems/features/sys_dict_data/service" - sysDictTypeService "be.ems/features/sys_dict_type/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" -) - -// 字典类型对应的字典数据信息接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysDictDataApi 结构体 - var apis = &SysDictDataApi{ - sysDictDataService: sysDictDataService.NewServiceSysDictData, - sysDictTypeService: sysDictTypeService.NewServiceSysDictType, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/dictDatas", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/dictData/{dictCode}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/dictData", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/dictData", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/dictData/{dictCodes}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/dictData/type/{dictType}", - Handler: apis.DictType, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/dictDataManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// 字典类型对应的字典数据信息 -// -// PATH /dictDataManage -type SysDictDataApi struct { - // 字典数据服务 - sysDictDataService *sysDictDataService.ServiceSysDictData - // 字典类型服务 - sysDictTypeService *sysDictTypeService.ServiceSysDictType -} - -// 字典数据列表 -// -// GET /list -func (s *SysDictDataApi) List(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - data := s.sysDictDataService.SelectDictDataPage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 字典数据详情 -// -// GET /:dictCode -func (s *SysDictDataApi) Info(w http.ResponseWriter, r *http.Request) { - dictCode := ctx.Param(r, "dictCode") - if dictCode == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - data := s.sysDictDataService.SelectDictDataByCode(dictCode) - if data.DictCode == dictCode { - ctx.JSON(w, 200, result.OkData(data)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典数据新增 -// -// POST / -func (s *SysDictDataApi) Add(w http.ResponseWriter, r *http.Request) { - var body model.SysDictData - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.DictCode != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查字典类型是否存在 - sysDictType := s.sysDictTypeService.SelectDictTypeByType(body.DictType) - if sysDictType.DictType != body.DictType { - ctx.JSON(w, 200, result.ErrMsg("No permission to access dictionary type data!")) - return - } - - // 检查字典标签唯一 - uniqueDictLabel := s.sysDictDataService.CheckUniqueDictLabel(body.DictType, body.DictLabel, "") - if !uniqueDictLabel { - msg := fmt.Sprintf("[%s] The subscript signature of this dictionary type already exists", body.DictLabel) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查字典键值唯一 - uniqueDictValue := s.sysDictDataService.CheckUniqueDictValue(body.DictType, body.DictValue, "") - if !uniqueDictValue { - msg := fmt.Sprintf("[%s] The label value under this dictionary type already exists", body.DictValue) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(r) - insertId := s.sysDictDataService.InsertDictData(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典类型修改 -// -// PUT / -func (s *SysDictDataApi) Edit(w http.ResponseWriter, r *http.Request) { - var body model.SysDictData - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.DictCode == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查字典类型是否存在 - sysDictType := s.sysDictTypeService.SelectDictTypeByType(body.DictType) - if sysDictType.DictType != body.DictType { - ctx.JSON(w, 200, result.ErrMsg("No permission to access dictionary type data!")) - return - } - - // 检查字典编码是否存在 - SysDictDataApi := s.sysDictDataService.SelectDictDataByCode(body.DictCode) - if SysDictDataApi.DictCode != body.DictCode { - ctx.JSON(w, 200, result.ErrMsg("No permission to access dictionary encoding data!")) - return - } - - // 检查字典标签唯一 - uniqueDictLabel := s.sysDictDataService.CheckUniqueDictLabel(body.DictType, body.DictLabel, body.DictCode) - if !uniqueDictLabel { - msg := fmt.Sprintf("Data modification failed for [%s], the dictionary type subscript signature already exists", body.DictLabel) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查字典键值唯一 - uniqueDictValue := s.sysDictDataService.CheckUniqueDictValue(body.DictType, body.DictValue, body.DictCode) - if !uniqueDictValue { - msg := fmt.Sprintf("Data modification failed for [%s], label value already exists under this dictionary type", body.DictValue) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.UpdateBy = ctx.LoginUserToUserName(r) - rows := s.sysDictDataService.UpdateDictData(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典数据删除 -// -// DELETE /:dictCodes -func (s *SysDictDataApi) Remove(w http.ResponseWriter, r *http.Request) { - dictCodes := ctx.Param(r, "dictCodes") - if dictCodes == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(dictCodes, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - rows, err := s.sysDictDataService.DeleteDictDataByCodes(uniqueIDs) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - msg := fmt.Sprintf("Successfully deleted: %d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) -} - -// 字典数据列表(指定字典类型) -// -// GET /type/:dictType -func (s *SysDictDataApi) DictType(w http.ResponseWriter, r *http.Request) { - dictType := ctx.Param(r, "dictType") - if dictType == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - data := s.sysDictDataService.SelectDictDataByType(dictType) - ctx.JSON(w, 200, result.OkData(data)) -} diff --git a/features/sys_dict_data/model/sys_dict_data.go b/features/sys_dict_data/model/sys_dict_data.go deleted file mode 100644 index 7c8cd06a..00000000 --- a/features/sys_dict_data/model/sys_dict_data.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -// SysDictData 字典数据对象 sys_dict_data -type SysDictData struct { - // 字典编码 - DictCode string `json:"dictCode"` - // 字典排序 - DictSort int `json:"dictSort"` - // 字典标签 - DictLabel string `json:"dictLabel" binding:"required"` - // 字典键值 - DictValue string `json:"dictValue" binding:"required"` - // 字典类型 - DictType string `json:"dictType" binding:"required"` - // 样式属性(样式扩展) - TagClass string `json:"tagClass"` - // 标签类型(预设颜色) - TagType string `json:"tagType"` - // 状态(0停用 1正常) - Status string `json:"status"` - // 创建者 - CreateBy string `json:"createBy"` - // 创建时间 - CreateTime int64 `json:"createTime"` - // 更新者 - UpdateBy string `json:"updateBy"` - // 更新时间 - UpdateTime int64 `json:"updateTime"` - // 备注 - Remark string `json:"remark"` -} diff --git a/features/sys_dict_data/repo/repo_sys_dict_data.go b/features/sys_dict_data/repo/repo_sys_dict_data.go deleted file mode 100644 index 02b0b37d..00000000 --- a/features/sys_dict_data/repo/repo_sys_dict_data.go +++ /dev/null @@ -1,369 +0,0 @@ -package repo - -import ( - "fmt" - "strings" - "time" - - "be.ems/features/sys_dict_data/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysDictData 结构体 -var NewRepoSysDictData = &RepoSysDictData{ - selectSql: `select - dict_code, dict_sort, dict_label, dict_value, dict_type, tag_class, tag_type, status, create_by, create_time, remark - from sys_dict_data`, - - resultMap: map[string]string{ - "dict_code": "DictCode", - "dict_sort": "DictSort", - "dict_label": "DictLabel", - "dict_value": "DictValue", - "dict_type": "DictType", - "tag_class": "TagClass", - "tag_type": "TagType", - "status": "Status", - "remark": "Remark", - "create_by": "CreateBy", - "create_time": "CreateTime", - "update_by": "UpdateBy", - "update_time": "UpdateTime", - }, -} - -// RepoSysDictData 字典类型数据表 数据层处理 -type RepoSysDictData struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysDictData) convertResultRows(rows []map[string]any) []model.SysDictData { - arr := make([]model.SysDictData, 0) - for _, row := range rows { - sysDictData := model.SysDictData{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&sysDictData, keyMapper, value) - } - } - arr = append(arr, sysDictData) - } - return arr -} - -// SelectDictDataPage 根据条件分页查询字典数据 -func (r *RepoSysDictData) SelectDictDataPage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["dictType"]; ok && v != "" { - conditions = append(conditions, "dict_type = ?") - params = append(params, v) - } - if v, ok := query["dictLabel"]; ok && v != "" { - conditions = append(conditions, "dict_label like concat(?, '%')") - params = append(params, v) - } - if v, ok := query["status"]; ok && v != "" { - conditions = append(conditions, "status = ?") - params = append(params, v) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := "select count(1) as 'total' from sys_dict_data" - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []model.SysDictData{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " order by dict_sort asc limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := r.selectSql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectDictDataList 根据条件查询字典数据 -func (r *RepoSysDictData) SelectDictDataList(sysDictData model.SysDictData) []model.SysDictData { - // 查询条件拼接 - var conditions []string - var params []any - if sysDictData.DictLabel != "" { - conditions = append(conditions, "dict_label like concat(?, '%')") - params = append(params, sysDictData.DictLabel) - } - if sysDictData.DictType != "" { - conditions = append(conditions, "dict_type = ?") - params = append(params, sysDictData.DictType) - } - if sysDictData.Status != "" { - conditions = append(conditions, "status = ?") - params = append(params, sysDictData.Status) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - orderSql := " order by dict_sort asc " - querySql := r.selectSql + whereSql + orderSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysDictData{} - } - - // 转换实体 - return r.convertResultRows(results) -} - -// SelectDictDataByCodes 根据字典数据编码查询信息 -func (r *RepoSysDictData) SelectDictDataByCodes(dictCodes []string) []model.SysDictData { - placeholder := datasource.KeyPlaceholderByQuery(len(dictCodes)) - querySql := r.selectSql + " where dict_code in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(dictCodes) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysDictData{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// CountDictDataByType 查询字典数据 -func (r *RepoSysDictData) CountDictDataByType(dictType string) int64 { - querySql := "select count(1) as 'total' from sys_dict_data where dict_type = ?" - results, err := datasource.RawDB("", querySql, []any{dictType}) - if err != nil { - log.Errorf("query err => %v", err) - return 0 - } - if len(results) > 0 { - return parse.Number(results[0]["total"]) - } - return 0 -} - -// CheckUniqueDictData 校验字典数据是否唯一 -func (r *RepoSysDictData) CheckUniqueDictData(sysDictData model.SysDictData) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysDictData.DictType != "" { - conditions = append(conditions, "dict_type = ?") - params = append(params, sysDictData.DictType) - } - if sysDictData.DictLabel != "" { - conditions = append(conditions, "dict_label = ?") - params = append(params, sysDictData.DictLabel) - } - if sysDictData.DictValue != "" { - conditions = append(conditions, "dict_value = ?") - params = append(params, sysDictData.DictValue) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select dict_code as 'str' from sys_dict_data " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - -// DeleteDictDataByCodes 批量删除字典数据信息 -func (r *RepoSysDictData) DeleteDictDataByCodes(dictCodes []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(dictCodes)) - sql := "delete from sys_dict_data where dict_code in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(dictCodes) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// InsertDictData 新增字典数据信息 -func (r *RepoSysDictData) InsertDictData(sysDictData model.SysDictData) string { - // 参数拼接 - params := make(map[string]any) - if sysDictData.DictSort > 0 { - params["dict_sort"] = sysDictData.DictSort - } - if sysDictData.DictLabel != "" { - params["dict_label"] = sysDictData.DictLabel - } - if sysDictData.DictValue != "" { - params["dict_value"] = sysDictData.DictValue - } - if sysDictData.DictType != "" { - params["dict_type"] = sysDictData.DictType - } - if sysDictData.TagClass != "" { - params["tag_class"] = sysDictData.TagClass - } - if sysDictData.TagType != "" { - params["tag_type"] = sysDictData.TagType - } - if sysDictData.Status != "" { - params["status"] = sysDictData.Status - } - if sysDictData.Remark != "" { - params["remark"] = sysDictData.Remark - } - if sysDictData.CreateBy != "" { - params["create_by"] = sysDictData.CreateBy - params["create_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into sys_dict_data (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// UpdateDictData 修改字典数据信息 -func (r *RepoSysDictData) UpdateDictData(sysDictData model.SysDictData) int64 { - // 参数拼接 - params := make(map[string]any) - if sysDictData.DictSort > 0 { - params["dict_sort"] = sysDictData.DictSort - } - if sysDictData.DictLabel != "" { - params["dict_label"] = sysDictData.DictLabel - } - if sysDictData.DictValue != "" { - params["dict_value"] = sysDictData.DictValue - } - if sysDictData.DictType != "" { - params["dict_type"] = sysDictData.DictType - } - if sysDictData.TagClass != "" { - params["tag_class"] = sysDictData.TagClass - } - if sysDictData.TagType != "" { - params["tag_type"] = sysDictData.TagType - } - if sysDictData.Status != "" { - params["status"] = sysDictData.Status - } - if sysDictData.Remark != "" { - params["remark"] = sysDictData.Remark - } - if sysDictData.UpdateBy != "" { - params["update_by"] = sysDictData.UpdateBy - params["update_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update sys_dict_data set " + strings.Join(keys, ",") + " where dict_code = ?" - - // 执行更新 - values = append(values, sysDictData.DictCode) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// UpdateDictDataType 同步修改字典类型 -func (r *RepoSysDictData) UpdateDictDataType(oldDictType string, newDictType string) int64 { - // 参数拼接 - params := make([]any, 0) - if oldDictType == "" || newDictType == "" { - return 0 - } - params = append(params, newDictType) - params = append(params, oldDictType) - - // 构建执行语句 - sql := "update sys_dict_data set dict_type = ? where dict_type = ?" - - // 执行更新 - results, err := datasource.ExecDB("", sql, params) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} diff --git a/features/sys_dict_data/service/service_sys_dict_data.go b/features/sys_dict_data/service/service_sys_dict_data.go deleted file mode 100644 index 68a2cff2..00000000 --- a/features/sys_dict_data/service/service_sys_dict_data.go +++ /dev/null @@ -1,111 +0,0 @@ -package service - -import ( - "errors" - - "be.ems/features/sys_dict_data/model" - "be.ems/features/sys_dict_data/repo" - sysDictTypeService "be.ems/features/sys_dict_type/service" -) - -// 实例化服务层 ServiceSysDictData 结构体 -var NewServiceSysDictData = &ServiceSysDictData{ - sysDictDataRepository: *repo.NewRepoSysDictData, - sysDictTypeService: *sysDictTypeService.NewServiceSysDictType, -} - -// ServiceSysDictData 字典类型数据 服务层处理 -type ServiceSysDictData struct { - // 字典数据服务 - sysDictDataRepository repo.RepoSysDictData - // 字典类型服务 - sysDictTypeService sysDictTypeService.ServiceSysDictType -} - -// SelectDictDataPage 根据条件分页查询字典数据 -func (r *ServiceSysDictData) SelectDictDataPage(query map[string]any) map[string]any { - return r.sysDictDataRepository.SelectDictDataPage(query) -} - -// SelectDictDataList 根据条件查询字典数据 -func (r *ServiceSysDictData) SelectDictDataList(sysDictData model.SysDictData) []model.SysDictData { - return r.sysDictDataRepository.SelectDictDataList(sysDictData) -} - -// SelectDictDataByCode 根据字典数据编码查询信息 -func (r *ServiceSysDictData) SelectDictDataByCode(dictCode string) model.SysDictData { - if dictCode == "" { - return model.SysDictData{} - } - dictCodes := r.sysDictDataRepository.SelectDictDataByCodes([]string{dictCode}) - if len(dictCodes) > 0 { - return dictCodes[0] - } - return model.SysDictData{} -} - -// SelectDictDataByType 根据字典类型查询信息 -func (r *ServiceSysDictData) SelectDictDataByType(dictType string) []model.SysDictData { - return r.sysDictTypeService.DictDataCache(dictType) -} - -// CheckUniqueDictLabel 校验字典标签是否唯一 -func (r *ServiceSysDictData) CheckUniqueDictLabel(dictType, dictLabel, dictCode string) bool { - uniqueId := r.sysDictDataRepository.CheckUniqueDictData(model.SysDictData{ - DictType: dictType, - DictLabel: dictLabel, - }) - if uniqueId == dictCode { - return true - } - return uniqueId == "" -} - -// CheckUniqueDictValue 校验字典键值是否唯一 -func (r *ServiceSysDictData) CheckUniqueDictValue(dictType, dictValue, dictCode string) bool { - uniqueId := r.sysDictDataRepository.CheckUniqueDictData(model.SysDictData{ - DictType: dictType, - DictValue: dictValue, - }) - if uniqueId == dictCode { - return true - } - return uniqueId == "" -} - -// DeleteDictDataByCodes 批量删除字典数据信息 -func (r *ServiceSysDictData) DeleteDictDataByCodes(dictCodes []string) (int64, error) { - // 检查是否存在 - dictDatas := r.sysDictDataRepository.SelectDictDataByCodes(dictCodes) - if len(dictDatas) <= 0 { - return 0, errors.New("does not have permission to access dictionary-encoded data") - } - if len(dictDatas) == len(dictCodes) { - for _, v := range dictDatas { - // 刷新缓存 - r.sysDictTypeService.ClearDictCache(v.DictType) - r.sysDictTypeService.LoadingDictCache(v.DictType) - } - rows := r.sysDictDataRepository.DeleteDictDataByCodes(dictCodes) - return rows, nil - } - return 0, errors.New("failed to delete dictionary data information") -} - -// InsertDictData 新增字典数据信息 -func (r *ServiceSysDictData) InsertDictData(sysDictData model.SysDictData) string { - insertId := r.sysDictDataRepository.InsertDictData(sysDictData) - if insertId != "" { - r.sysDictTypeService.LoadingDictCache(sysDictData.DictType) - } - return insertId -} - -// UpdateDictData 修改字典数据信息 -func (r *ServiceSysDictData) UpdateDictData(sysDictData model.SysDictData) int64 { - rows := r.sysDictDataRepository.UpdateDictData(sysDictData) - if rows > 0 { - r.sysDictTypeService.LoadingDictCache(sysDictData.DictType) - } - return rows -} diff --git a/features/sys_dict_type/api_sys_dict_type.go b/features/sys_dict_type/api_sys_dict_type.go deleted file mode 100644 index d3780707..00000000 --- a/features/sys_dict_type/api_sys_dict_type.go +++ /dev/null @@ -1,253 +0,0 @@ -package sysdicttype - -import ( - "fmt" - "net/http" - "strings" - - "be.ems/features/sys_dict_type/model" - sysDictTypeService "be.ems/features/sys_dict_type/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" -) - -// 字典类型信息接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysDictTypeApi 结构体 - var apis = &SysDictTypeApi{ - sysDictTypeService: *sysDictTypeService.NewServiceSysDictType, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/dictTypes", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/dictType/{dictId}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/dictType", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/dictType", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/dictType/{dictIds}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/dictType/refreshCache", - Handler: apis.RefreshCache, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/dictTypes/optionselect", - Handler: apis.DictOptionselect, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/dictTypegManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// 字典类型信息 -// -// PATH /dictTypegManage -type SysDictTypeApi struct { - // 字典类型服务 - sysDictTypeService sysDictTypeService.ServiceSysDictType -} - -// 字典类型列表 -// -// GET /list -func (s *SysDictTypeApi) List(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - data := s.sysDictTypeService.SelectDictTypePage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 字典类型信息 -// -// GET /:dictId -func (s *SysDictTypeApi) Info(w http.ResponseWriter, r *http.Request) { - dictId := ctx.Param(r, "dictId") - if dictId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - data := s.sysDictTypeService.SelectDictTypeByID(dictId) - if data.DictID == dictId { - ctx.JSON(w, 200, result.OkData(data)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典类型新增 -// -// POST / -func (s *SysDictTypeApi) Add(w http.ResponseWriter, r *http.Request) { - var body model.SysDictType - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.DictID != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查字典名称唯一 - uniqueDictName := s.sysDictTypeService.CheckUniqueDictName(body.DictName, "") - if !uniqueDictName { - msg := fmt.Sprintf("Failed to add dictionary '%s', dictionary name already exists", body.DictName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查字典类型唯一 - uniqueDictType := s.sysDictTypeService.CheckUniqueDictType(body.DictType, "") - if !uniqueDictType { - msg := fmt.Sprintf("Failed to add dictionary '%s', dictionary type already exists", body.DictType) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(r) - insertId := s.sysDictTypeService.InsertDictType(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典类型修改 -// -// PUT / -func (s *SysDictTypeApi) Edit(w http.ResponseWriter, r *http.Request) { - var body model.SysDictType - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.DictID == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查数据是否存在 - dictInfo := s.sysDictTypeService.SelectDictTypeByID(body.DictID) - if dictInfo.DictID != body.DictID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access dictionary type data!")) - return - } - - // 检查字典名称唯一 - uniqueDictName := s.sysDictTypeService.CheckUniqueDictName(body.DictName, body.DictID) - if !uniqueDictName { - msg := fmt.Sprintf("Dictionary modification failed for [%s], dictionary name already exists", body.DictName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查字典类型唯一 - uniqueDictType := s.sysDictTypeService.CheckUniqueDictType(body.DictType, body.DictID) - if !uniqueDictType { - msg := fmt.Sprintf("Dictionary modification failed for [%s], dictionary type already exists", body.DictType) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.UpdateBy = ctx.LoginUserToUserName(r) - rows := s.sysDictTypeService.UpdateDictType(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 字典类型删除 -// -// DELETE /:dictIds -func (s *SysDictTypeApi) Remove(w http.ResponseWriter, r *http.Request) { - dictIds := ctx.Param(r, "dictIds") - if dictIds == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(dictIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - rows, err := s.sysDictTypeService.DeleteDictTypeByIDs(uniqueIDs) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - msg := fmt.Sprintf("Successfully deleted: %d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) -} - -// 字典类型刷新缓存 -// -// PUT /refreshCache -func (s *SysDictTypeApi) RefreshCache(w http.ResponseWriter, r *http.Request) { - s.sysDictTypeService.ResetDictCache() - ctx.JSON(w, 200, result.Ok(nil)) -} - -// 字典类型选择框列表 -// -// GET /getDictOptionselect -func (s *SysDictTypeApi) DictOptionselect(w http.ResponseWriter, r *http.Request) { - data := s.sysDictTypeService.SelectDictTypeList(model.SysDictType{ - Status: "1", - }) - - type labelValue struct { - Label string `json:"label"` - Value string `json:"value"` - } - - // 数据组 - arr := []labelValue{} - for _, v := range data { - arr = append(arr, labelValue{ - Label: v.DictName, - Value: v.DictType, - }) - } - ctx.JSON(w, 200, result.OkData(arr)) -} diff --git a/features/sys_dict_type/model/sys_dict_type.go b/features/sys_dict_type/model/sys_dict_type.go deleted file mode 100644 index 0ad0b1ab..00000000 --- a/features/sys_dict_type/model/sys_dict_type.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -// SysDictType 字典类型对象 sys_dict_type -type SysDictType struct { - // 字典主键 - DictID string `json:"dictId"` - // 字典名称 - DictName string `json:"dictName" binding:"required"` - // 字典类型 - DictType string `json:"dictType" binding:"required"` - // 状态(0停用 1正常) - Status string `json:"status"` - // 创建者 - CreateBy string `json:"createBy"` - // 创建时间 - CreateTime int64 `json:"createTime"` - // 更新者 - UpdateBy string `json:"updateBy"` - // 更新时间 - UpdateTime int64 `json:"updateTime"` - // 备注 - Remark string `json:"remark"` -} diff --git a/features/sys_dict_type/repo/repo_sys_dict_type.go b/features/sys_dict_type/repo/repo_sys_dict_type.go deleted file mode 100644 index 261f6489..00000000 --- a/features/sys_dict_type/repo/repo_sys_dict_type.go +++ /dev/null @@ -1,330 +0,0 @@ -package repo - -import ( - "fmt" - "strings" - "time" - - "be.ems/features/sys_dict_type/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/date" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysDictType 结构体 -var NewRepoSysDictType = &RepoSysDictType{ - selectSql: `select - dict_id, dict_name, dict_type, status, create_by, create_time, remark - from sys_dict_type`, - - resultMap: map[string]string{ - "dict_id": "DictID", - "dict_name": "DictName", - "dict_type": "DictType", - "remark": "Remark", - "status": "Status", - "create_by": "CreateBy", - "create_time": "CreateTime", - "update_by": "UpdateBy", - "update_time": "UpdateTime", - }, -} - -// RepoSysDictType 字典类型表 数据层处理 -type RepoSysDictType struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysDictType) convertResultRows(rows []map[string]any) []model.SysDictType { - arr := make([]model.SysDictType, 0) - for _, row := range rows { - sysDictType := model.SysDictType{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&sysDictType, keyMapper, value) - } - } - arr = append(arr, sysDictType) - } - return arr -} - -// SelectDictTypePage 根据条件分页查询字典类型 -func (r *RepoSysDictType) SelectDictTypePage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["dictName"]; ok && v != "" { - conditions = append(conditions, "dict_name like concat(?, '%')") - params = append(params, v) - } - if v, ok := query["dictType"]; ok && v != "" { - conditions = append(conditions, "dict_type like concat(?, '%')") - params = append(params, v) - } - if v, ok := query["status"]; ok && v != "" { - conditions = append(conditions, "status = ?") - params = append(params, v) - } - beginTime, ok := query["beginTime"] - if !ok { - beginTime, ok = query["params[beginTime]"] - } - if ok && beginTime != "" { - conditions = append(conditions, "create_time >= ?") - beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD) - params = append(params, beginDate.UnixMilli()) - } - endTime, ok := query["endTime"] - if !ok { - endTime, ok = query["params[endTime]"] - } - if ok && endTime != "" { - conditions = append(conditions, "create_time <= ?") - endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD) - params = append(params, endDate.UnixMilli()) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := "select count(1) as 'total' from sys_dict_type" - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []model.SysDictType{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := r.selectSql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectDictTypeList 根据条件查询字典类型 -func (r *RepoSysDictType) SelectDictTypeList(sysDictType model.SysDictType) []model.SysDictType { - // 查询条件拼接 - var conditions []string - var params []any - if sysDictType.DictName != "" { - conditions = append(conditions, "dict_name like concat(?, '%')") - params = append(params, sysDictType.DictName) - } - if sysDictType.DictType != "" { - conditions = append(conditions, "dict_type like concat(?, '%')") - params = append(params, sysDictType.DictType) - } - if sysDictType.Status != "" { - conditions = append(conditions, "status = ?") - params = append(params, sysDictType.Status) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - querySql := r.selectSql + whereSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysDictType{} - } - - // 转换实体 - return r.convertResultRows(results) -} - -// SelectDictTypeByIDs 根据字典类型ID查询信息 -func (r *RepoSysDictType) SelectDictTypeByIDs(dictIDs []string) []model.SysDictType { - placeholder := datasource.KeyPlaceholderByQuery(len(dictIDs)) - querySql := r.selectSql + " where dict_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(dictIDs) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysDictType{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// SelectDictTypeByType 根据字典类型查询信息 -func (r *RepoSysDictType) SelectDictTypeByType(dictType string) model.SysDictType { - querySql := r.selectSql + " where dict_type = ?" - results, err := datasource.RawDB("", querySql, []any{dictType}) - if err != nil { - log.Errorf("query err => %v", err) - return model.SysDictType{} - } - // 转换实体 - rows := r.convertResultRows(results) - if len(rows) > 0 { - return rows[0] - } - return model.SysDictType{} -} - -// CheckUniqueDictType 校验字典是否唯一 -func (r *RepoSysDictType) CheckUniqueDictType(sysDictType model.SysDictType) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysDictType.DictName != "" { - conditions = append(conditions, "dict_name = ?") - params = append(params, sysDictType.DictName) - } - if sysDictType.DictType != "" { - conditions = append(conditions, "dict_type = ?") - params = append(params, sysDictType.DictType) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select dict_id as 'str' from sys_dict_type " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - -// InsertDictType 新增字典类型信息 -func (r *RepoSysDictType) InsertDictType(sysDictType model.SysDictType) string { - // 参数拼接 - params := make(map[string]any) - if sysDictType.DictName != "" { - params["dict_name"] = sysDictType.DictName - } - if sysDictType.DictType != "" { - params["dict_type"] = sysDictType.DictType - } - if sysDictType.Status != "" { - params["status"] = sysDictType.Status - } - if sysDictType.Remark != "" { - params["remark"] = sysDictType.Remark - } - if sysDictType.CreateBy != "" { - params["create_by"] = sysDictType.CreateBy - params["create_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into sys_dict_type (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// UpdateDictType 修改字典类型信息 -func (r *RepoSysDictType) UpdateDictType(sysDictType model.SysDictType) int64 { - // 参数拼接 - params := make(map[string]any) - if sysDictType.DictName != "" { - params["dict_name"] = sysDictType.DictName - } - if sysDictType.DictType != "" { - params["dict_type"] = sysDictType.DictType - } - if sysDictType.Status != "" { - params["status"] = sysDictType.Status - } - if sysDictType.Remark != "" { - params["remark"] = sysDictType.Remark - } - if sysDictType.UpdateBy != "" { - params["update_by"] = sysDictType.UpdateBy - params["update_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update sys_dict_type set " + strings.Join(keys, ",") + " where dict_id = ?" - - // 执行更新 - values = append(values, sysDictType.DictID) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// DeleteDictTypeByIDs 批量删除字典类型信息 -func (r *RepoSysDictType) DeleteDictTypeByIDs(dictIDs []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(dictIDs)) - sql := "delete from sys_dict_type where dict_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(dictIDs) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} diff --git a/features/sys_dict_type/service/service_sys_dict_type.go b/features/sys_dict_type/service/service_sys_dict_type.go deleted file mode 100644 index 66674a17..00000000 --- a/features/sys_dict_type/service/service_sys_dict_type.go +++ /dev/null @@ -1,211 +0,0 @@ -package service - -import ( - "encoding/json" - "errors" - "fmt" - - sysDictDataModel "be.ems/features/sys_dict_data/model" - sysDictDataRepo "be.ems/features/sys_dict_data/repo" - sysDictTypeModel "be.ems/features/sys_dict_type/model" - "be.ems/features/sys_dict_type/repo" - "be.ems/lib/core/cache" - "be.ems/lib/core/constants/cachekey" -) - -// 实例化服务层 ServiceSysDictType 结构体 -var NewServiceSysDictType = &ServiceSysDictType{ - sysDictTypeRepository: *repo.NewRepoSysDictType, - sysDictDataRepository: *sysDictDataRepo.NewRepoSysDictData, -} - -// ServiceSysDictType 字典类型 服务层处理 -type ServiceSysDictType struct { - // 字典类型服务 - sysDictTypeRepository repo.RepoSysDictType - // 字典数据服务 - sysDictDataRepository sysDictDataRepo.RepoSysDictData -} - -// SelectDictTypePage 根据条件分页查询字典类型 -func (r *ServiceSysDictType) SelectDictTypePage(query map[string]any) map[string]any { - return r.sysDictTypeRepository.SelectDictTypePage(query) -} - -// SelectDictTypeList 根据条件查询字典类型 -func (r *ServiceSysDictType) SelectDictTypeList(sysDictType sysDictTypeModel.SysDictType) []sysDictTypeModel.SysDictType { - return r.sysDictTypeRepository.SelectDictTypeList(sysDictType) -} - -// SelectDictTypeByID 根据字典类型ID查询信息 -func (r *ServiceSysDictType) SelectDictTypeByID(dictID string) sysDictTypeModel.SysDictType { - if dictID == "" { - return sysDictTypeModel.SysDictType{} - } - dictTypes := r.sysDictTypeRepository.SelectDictTypeByIDs([]string{dictID}) - if len(dictTypes) > 0 { - return dictTypes[0] - } - return sysDictTypeModel.SysDictType{} -} - -// SelectDictTypeByType 根据字典类型查询信息 -func (r *ServiceSysDictType) SelectDictTypeByType(dictType string) sysDictTypeModel.SysDictType { - return r.sysDictTypeRepository.SelectDictTypeByType(dictType) -} - -// CheckUniqueDictName 校验字典名称是否唯一 -func (r *ServiceSysDictType) CheckUniqueDictName(dictName, dictID string) bool { - uniqueId := r.sysDictTypeRepository.CheckUniqueDictType(sysDictTypeModel.SysDictType{ - DictName: dictName, - }) - if uniqueId == dictID { - return true - } - return uniqueId == "" -} - -// CheckUniqueDictType 校验字典类型是否唯一 -func (r *ServiceSysDictType) CheckUniqueDictType(dictType, dictID string) bool { - uniqueId := r.sysDictTypeRepository.CheckUniqueDictType(sysDictTypeModel.SysDictType{ - DictType: dictType, - }) - if uniqueId == dictID { - return true - } - return uniqueId == "" -} - -// InsertDictType 新增字典类型信息 -func (r *ServiceSysDictType) InsertDictType(sysDictType sysDictTypeModel.SysDictType) string { - insertId := r.sysDictTypeRepository.InsertDictType(sysDictType) - if insertId != "" { - r.LoadingDictCache(sysDictType.DictType) - } - return insertId -} - -// UpdateDictType 修改字典类型信息 -func (r *ServiceSysDictType) UpdateDictType(sysDictType sysDictTypeModel.SysDictType) int64 { - data := r.sysDictTypeRepository.SelectDictTypeByIDs([]string{sysDictType.DictID}) - if len(data) == 0 { - return 0 - } - // 修改字典类型key时同步更新其字典数据的类型key - oldDictType := data[0].DictType - rows := r.sysDictTypeRepository.UpdateDictType(sysDictType) - if rows > 0 && oldDictType != "" && oldDictType != sysDictType.DictType { - r.sysDictDataRepository.UpdateDictDataType(oldDictType, sysDictType.DictType) - } - // 刷新缓存 - r.ClearDictCache(oldDictType) - r.LoadingDictCache(sysDictType.DictType) - return rows -} - -// DeleteDictTypeByIDs 批量删除字典类型信息 -func (r *ServiceSysDictType) DeleteDictTypeByIDs(dictIDs []string) (int64, error) { - // 检查是否存在 - dictTypes := r.sysDictTypeRepository.SelectDictTypeByIDs(dictIDs) - if len(dictTypes) <= 0 { - return 0, errors.New("no permission to access dictionary type data") - } - for _, v := range dictTypes { - // 字典类型下级含有数据 - useCount := r.sysDictDataRepository.CountDictDataByType(v.DictType) - if useCount > 0 { - msg := fmt.Sprintf("[%s] Dictionary data exists and cannot be deleted. ", v.DictName) - return 0, errors.New(msg) - } - // 清除缓存 - r.ClearDictCache(v.DictType) - } - if len(dictTypes) == len(dictIDs) { - rows := r.sysDictTypeRepository.DeleteDictTypeByIDs(dictIDs) - return rows, nil - } - return 0, errors.New("failed to delete dictionary data information") -} - -// ResetDictCache 重置字典缓存数据 -func (r *ServiceSysDictType) ResetDictCache() { - r.ClearDictCache("*") - r.LoadingDictCache("") -} - -// getCacheKey 组装缓存key -func (r *ServiceSysDictType) getDictCache(dictType string) string { - return cachekey.SYS_DICT_KEY + dictType -} - -// LoadingDictCache 加载字典缓存数据 -func (r *ServiceSysDictType) LoadingDictCache(dictType string) { - sysDictData := sysDictDataModel.SysDictData{ - Status: "1", - } - - // 指定字典类型 - if dictType != "" { - sysDictData.DictType = dictType - // 删除缓存 - key := r.getDictCache(dictType) - cache.DeleteLocal(key) - } - - sysDictDataList := r.sysDictDataRepository.SelectDictDataList(sysDictData) - if len(sysDictDataList) == 0 { - return - } - - // 将字典数据按类型分组 - m := make(map[string][]sysDictDataModel.SysDictData, 0) - for _, v := range sysDictDataList { - key := v.DictType - if item, ok := m[key]; ok { - m[key] = append(item, v) - } else { - m[key] = []sysDictDataModel.SysDictData{v} - } - } - - // 放入缓存 - for k, v := range m { - key := r.getDictCache(k) - values, _ := json.Marshal(v) - cache.SetLocal(key, string(values)) - } -} - -// ClearDictCache 清空字典缓存数据 -func (r *ServiceSysDictType) ClearDictCache(dictType string) bool { - key := r.getDictCache(dictType) - keys := cache.GetLocalKeys(key) - for _, v := range keys { - cache.DeleteLocal(v) - } - return len(keys) > 0 -} - -// DictDataCache 获取字典数据缓存数据 -func (r *ServiceSysDictType) DictDataCache(dictType string) []sysDictDataModel.SysDictData { - data := []sysDictDataModel.SysDictData{} - key := r.getDictCache(dictType) - jsonAny, ok := cache.GetLocal(key) - if jsonAny != nil && ok { - err := json.Unmarshal([]byte(jsonAny.(string)), &data) - if err != nil { - data = []sysDictDataModel.SysDictData{} - } - } else { - data = r.sysDictDataRepository.SelectDictDataList(sysDictDataModel.SysDictData{ - Status: "1", - DictType: dictType, - }) - if len(data) > 0 { - cache.DeleteLocal(key) - values, _ := json.Marshal(data) - cache.SetLocal(key, string(values)) - } - } - return data -} diff --git a/features/sys_menu/api_sys_menu.go b/features/sys_menu/api_sys_menu.go deleted file mode 100644 index b949a159..00000000 --- a/features/sys_menu/api_sys_menu.go +++ /dev/null @@ -1,354 +0,0 @@ -package sysmenu - -import ( - "fmt" - "net/http" - - "be.ems/features/sys_menu/consts" - "be.ems/features/sys_menu/model" - "be.ems/features/sys_menu/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/regular" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" - srcConfig "be.ems/src/framework/config" -) - -// 菜单接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysMenuApi 结构体 - var apis = &SysMenuApi{ - sysMenuService: service.NewServiceSysMenu, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/menus", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/menu/{menuId}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/menu", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/menu", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/menu/{menuId}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/menus/treeSelect", - Handler: apis.TreeSelect, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/menu/roleMenuTreeSelect/{roleId}", - Handler: apis.RoleMenuTreeSelect, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/menuManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// // 实例化控制层 SysMenuApi 结构体 -// var NewSysMenu = &SysMenuApi{ -// sysMenuService: NewServiceSysMenu, -// } - -// 菜单信息 -// -// PATH /menuManage -type SysMenuApi struct { - // 菜单服务 - sysMenuService *service.ServiceSysMenu -} - -// 菜单列表 -// -// GET /list -func (s *SysMenuApi) List(w http.ResponseWriter, r *http.Request) { - query := model.SysMenu{} - if v := ctx.GetQuery(r, "menuName"); v != "" { - query.MenuName = v - } - if v := ctx.GetQuery(r, "status"); v != "" { - query.Status = v - } - - userId := ctx.LoginUserToUserID(r) - if srcConfig.IsAdmin(userId) { - userId = "*" - } - data := s.sysMenuService.SelectMenuList(query, userId) - ctx.JSON(w, 200, result.OkData(data)) -} - -// 菜单信息 -// -// GET /:menuId -func (s *SysMenuApi) Info(w http.ResponseWriter, r *http.Request) { - menuId := ctx.Param(r, "menuId") - if menuId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - data := s.sysMenuService.SelectMenuById(menuId) - if data.MenuID == menuId { - ctx.JSON(w, 200, result.OkData(data)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 菜单新增 -// -// POST / -func (s *SysMenuApi) Add(w http.ResponseWriter, r *http.Request) { - var body model.SysMenu - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.MenuID != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 目录和菜单检查地址唯一 - if consts.TYPE_DIR == body.MenuType || consts.TYPE_MENU == body.MenuType { - uniqueNenuPath := s.sysMenuService.CheckUniqueMenuPath(body.Path, "") - if !uniqueNenuPath { - msg := fmt.Sprintf("菜单新增【%s】失败,菜单路由地址已存在", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - } - - // 检查名称唯一 - uniqueNenuName := s.sysMenuService.CheckUniqueMenuName(body.MenuName, body.ParentID, "") - if !uniqueNenuName { - msg := fmt.Sprintf("菜单新增【%s】失败,菜单名称已存在", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 外链菜单需要符合网站http(s)开头 - if body.IsFrame == "0" && !regular.ValidHttp(body.Path) { - msg := fmt.Sprintf("菜单新增【%s】失败,非内部地址必须以http(s)://开头", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(r) - insertId := s.sysMenuService.InsertMenu(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 菜单修改 -// -// PUT / -func (s *SysMenuApi) Edit(w http.ResponseWriter, r *http.Request) { - var body model.SysMenu - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.MenuID == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 上级菜单不能选自己 - if body.MenuID == body.ParentID { - msg := fmt.Sprintf("Menu modification failed for [%s], parent menu cannot select itself", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查数据是否存在 - menuInfo := s.sysMenuService.SelectMenuById(body.MenuID) - if menuInfo.MenuID != body.MenuID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access menu data")) - return - } - // 父级ID不为0是要检查 - if body.ParentID != "0" { - menuParent := s.sysMenuService.SelectMenuById(body.ParentID) - if menuParent.MenuID != body.ParentID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access menu data")) - return - } - // 禁用菜单时检查父菜单是否使用 - if body.Status == "1" && menuParent.Status == "0" { - ctx.JSON(w, 200, result.ErrMsg("Parent menu not enabled!")) - return - } - } - - // 目录和菜单检查地址唯一 - if consts.TYPE_DIR == body.MenuType || consts.TYPE_MENU == body.MenuType { - uniqueNenuPath := s.sysMenuService.CheckUniqueMenuPath(body.Path, body.MenuID) - if !uniqueNenuPath { - msg := fmt.Sprintf("菜单修改【%s】失败,菜单路由地址已存在", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - } - - // 检查名称唯一 - uniqueNenuName := s.sysMenuService.CheckUniqueMenuName(body.MenuName, body.ParentID, body.MenuID) - if !uniqueNenuName { - msg := fmt.Sprintf("菜单修改【%s】失败,菜单名称已存在", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 外链菜单需要符合网站http(s)开头 - if body.IsFrame == "0" && !regular.ValidHttp(body.Path) { - msg := fmt.Sprintf("菜单修改【%s】失败,非内部地址必须以http(s)://开头", body.MenuName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 禁用菜单时检查子菜单是否使用 - if body.Status == "0" { - hasStatus := s.sysMenuService.HasChildByMenuIdAndStatus(body.MenuID, "1") - if hasStatus > 0 { - msg := fmt.Sprintf("不允许禁用,存在使用子菜单数:%d", hasStatus) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - } - - body.UpdateBy = ctx.LoginUserToUserName(r) - rows := s.sysMenuService.UpdateMenu(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 菜单删除 -// -// DELETE /:menuId -func (s *SysMenuApi) Remove(w http.ResponseWriter, r *http.Request) { - menuId := ctx.Param(r, "menuId") - if menuId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查数据是否存在 - menu := s.sysMenuService.SelectMenuById(menuId) - if menu.MenuID != menuId { - ctx.JSON(w, 200, result.ErrMsg("No permission to access menu data!")) - return - } - - // 检查是否存在子菜单 - hasChild := s.sysMenuService.HasChildByMenuIdAndStatus(menuId, "") - if hasChild > 0 { - msg := fmt.Sprintf("Deletion not allowed, there are sub orders: %d", hasChild) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 检查是否分配给角色 - existRole := s.sysMenuService.CheckMenuExistRole(menuId) - if existRole > 0 { - msg := fmt.Sprintf("Deletion not allowed, menu already assigned to roles: %d", existRole) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - rows := s.sysMenuService.DeleteMenuById(menuId) - if rows > 0 { - msg := fmt.Sprintf("Successfully deleted: %d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 菜单树结构列表 -// -// GET /treeSelect -func (s *SysMenuApi) TreeSelect(w http.ResponseWriter, r *http.Request) { - query := model.SysMenu{} - if v := ctx.GetQuery(r, "menuName"); v != "" { - query.MenuName = v - } - if v := ctx.GetQuery(r, "status"); v != "" { - query.Status = v - } - - userId := ctx.LoginUserToUserID(r) - if srcConfig.IsAdmin(userId) { - userId = "*" - } - data := s.sysMenuService.SelectMenuTreeSelectByUserId(query, userId) - ctx.JSON(w, 200, result.OkData(data)) - -} - -// 菜单树结构列表(指定角色) -// -// GET /roleMenuTreeSelect/:roleId -func (s *SysMenuApi) RoleMenuTreeSelect(w http.ResponseWriter, r *http.Request) { - roleId := ctx.Param(r, "roleId") - if roleId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - query := model.SysMenu{} - if v := ctx.GetQuery(r, "menuName"); v != "" { - query.MenuName = v - } - if v := ctx.GetQuery(r, "status"); v != "" { - query.Status = v - } - - userId := ctx.LoginUserToUserID(r) - if srcConfig.IsAdmin(userId) { - userId = "*" - } - menuTreeSelect := s.sysMenuService.SelectMenuTreeSelectByUserId(query, userId) - checkedKeys := s.sysMenuService.SelectMenuListByRoleId(roleId) - ctx.JSON(w, 200, result.OkData(map[string]any{ - "menus": menuTreeSelect, - "checkedKeys": checkedKeys, - })) -} diff --git a/features/sys_menu/consts/consts_menu.go b/features/sys_menu/consts/consts_menu.go deleted file mode 100644 index 6a1dca31..00000000 --- a/features/sys_menu/consts/consts_menu.go +++ /dev/null @@ -1,24 +0,0 @@ -package consts - -// 系统菜单常量信息 - -const ( - // 组件布局类型-基础布局组件标识 - COMPONENT_LAYOUT_BASIC = "BasicLayout" - // 组件布局类型-空白布局组件标识 - COMPONENT_LAYOUT_BLANK = "BlankLayout" - // 组件布局类型-内链接布局组件标识 - COMPONENT_LAYOUT_LINK = "LinkLayout" -) - -const ( - // 菜单类型-目录 - TYPE_DIR = "D" - // 菜单类型-菜单 - TYPE_MENU = "M" - // 菜单类型-按钮 - TYPE_BUTTON = "B" -) - -// 菜单内嵌地址标识-带/前缀 -const PATH_INLINE = "/inline" diff --git a/features/sys_menu/model/sys_menu.go b/features/sys_menu/model/sys_menu.go deleted file mode 100644 index 397e30eb..00000000 --- a/features/sys_menu/model/sys_menu.go +++ /dev/null @@ -1,46 +0,0 @@ -package model - -// SysMenu 菜单权限对象 sys_menu -type SysMenu struct { - // 菜单ID - MenuID string `json:"menuId"` - // 菜单名称 - MenuName string `json:"menuName" binding:"required"` - // 父菜单ID 默认0 - ParentID string `json:"parentId" binding:"required"` - // 显示顺序 - MenuSort int `json:"menuSort"` - // 路由地址 - Path string `json:"path"` - // 组件路径 - Component string `json:"component"` - // 是否内部跳转(0否 1是) - IsFrame string `json:"isFrame"` - // 是否缓存(0不缓存 1缓存) - IsCache string `json:"isCache"` - // 菜单类型(D目录 M菜单 B按钮) - MenuType string `json:"menuType" binding:"required"` - // 是否显示(0隐藏 1显示) - Visible string `json:"visible"` - // 菜单状态(0停用 1正常) - Status string `json:"status"` - // 权限标识 - Perms string `json:"perms"` - // 菜单图标(#无图标) - Icon string `json:"icon"` - // 创建者 - CreateBy string `json:"createBy"` - // 创建时间 - CreateTime int64 `json:"createTime"` - // 更新者 - UpdateBy string `json:"updateBy"` - // 更新时间 - UpdateTime int64 `json:"updateTime"` - // 备注 - Remark string `json:"remark"` - - // ====== 非数据库字段属性 ====== - - // 子菜单 - Children []SysMenu `json:"children,omitempty"` -} diff --git a/features/sys_menu/service/repo_sys_menu.go b/features/sys_menu/service/repo_sys_menu.go deleted file mode 100644 index 1b8f50a3..00000000 --- a/features/sys_menu/service/repo_sys_menu.go +++ /dev/null @@ -1,475 +0,0 @@ -package service - -import ( - "fmt" - "strings" - "time" - - "be.ems/features/sys_menu/consts" - "be.ems/features/sys_menu/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysMenu 结构体 -var NewRepoSysMenu = &RepoSysMenu{ - selectSql: `select - m.menu_id, m.menu_name, m.parent_id, m.menu_sort, m.path, m.component, m.is_frame, m.is_cache, m.menu_type, m.visible, m.status, ifnull(m.perms,'') as perms, m.icon, m.create_time, m.remark - from sys_menu m`, - - selectSqlByUser: `select distinct - m.menu_id, m.menu_name, m.parent_id, m.menu_sort, m.path, m.component, m.is_frame, m.is_cache, m.menu_type, m.visible, m.status, ifnull(m.perms,'') as perms, m.icon, m.create_time, m.remark - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role ro on ur.role_id = ro.role_id`, - - resultMap: map[string]string{ - "menu_id": "MenuID", - "menu_name": "MenuName", - "parent_name": "ParentName", - "parent_id": "ParentID", - "path": "Path", - "menu_sort": "MenuSort", - "component": "Component", - "is_frame": "IsFrame", - "is_cache": "IsCache", - "menu_type": "MenuType", - "visible": "Visible", - "status": "Status", - "perms": "Perms", - "icon": "Icon", - "create_by": "CreateBy", - "create_time": "CreateTime", - "update_by": "UpdateBy", - "update_time": "UpdateTime", - "remark": "Remark", - }, -} - -// RepoSysMenu 菜单表 数据层处理 -type RepoSysMenu struct { - // 查询视图对象SQL - selectSql string - // 查询视图用户对象SQL - selectSqlByUser string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysMenu) convertResultRows(rows []map[string]any) []model.SysMenu { - arr := make([]model.SysMenu, 0) - for _, row := range rows { - sysMenu := model.SysMenu{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&sysMenu, keyMapper, value) - } - } - arr = append(arr, sysMenu) - } - return arr -} - -// SelectMenuList 查询系统菜单列表 -func (r *RepoSysMenu) SelectMenuList(sysMenu model.SysMenu, userId string) []model.SysMenu { - // 查询条件拼接 - var conditions []string - var params []any - if sysMenu.MenuName != "" { - conditions = append(conditions, "m.menu_name like concat('%', concat(?, '%'))") - params = append(params, sysMenu.MenuName) - } - if sysMenu.Visible != "" { - conditions = append(conditions, "m.visible = ?") - params = append(params, sysMenu.Visible) - } - if sysMenu.Status != "" { - conditions = append(conditions, "m.status = ?") - params = append(params, sysMenu.Status) - } - - fromSql := r.selectSql - - // 个人菜单 - if userId != "*" { - fromSql = r.selectSqlByUser - conditions = append(conditions, "ur.user_id = ?") - params = append(params, userId) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - orderSql := " order by m.parent_id, m.menu_sort" - querySql := fromSql + whereSql + orderSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysMenu{} - } - - // 转换实体 - return r.convertResultRows(results) -} - -// SelectMenuPermsByUserId 根据用户ID查询权限 -func (r *RepoSysMenu) SelectMenuPermsByUserId(userId string) []string { - querySql := `select distinct m.perms as 'str' from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role r on r.role_id = ur.role_id - where m.status = '1' and m.perms != '' and r.status = '1' and ur.user_id = ? ` - - // 查询结果 - results, err := datasource.RawDB("", querySql, []any{userId}) - if err != nil { - log.Errorf("query err => %v", err) - return []string{} - } - - // 读取结果 - rows := make([]string, 0) - for _, m := range results { - rows = append(rows, fmt.Sprintf("%v", m["str"])) - } - return rows -} - -// SelectMenuTreeByUserId 根据用户ID查询菜单 -func (r *RepoSysMenu) SelectMenuTreeByUserId(userId string) []model.SysMenu { - var params []any - var querySql string - - if userId == "*" { - // 管理员全部菜单 - querySql = r.selectSql + ` where - m.menu_type in (?,?) and m.status = '1' - order by m.parent_id, m.menu_sort` - params = append(params, consts.TYPE_DIR) - params = append(params, consts.TYPE_MENU) - } else { - // 用户ID权限 - querySql = r.selectSqlByUser + ` where - m.menu_type in (?, ?) and m.status = '1' - and ur.user_id = ? and ro.status = '1' - order by m.parent_id, m.menu_sort` - params = append(params, consts.TYPE_DIR) - params = append(params, consts.TYPE_MENU) - params = append(params, userId) - } - - // 查询结果 - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysMenu{} - } - - return r.convertResultRows(results) -} - -// SelectMenuListByRoleId 根据角色ID查询菜单树信息 -func (r *RepoSysMenu) SelectMenuListByRoleId(roleId string, menuCheckStrictly bool) []string { - querySql := `select m.menu_id as 'str' from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - where rm.role_id = ? ` - var params []any - params = append(params, roleId) - // 展开 - if menuCheckStrictly { - querySql += ` and m.menu_id not in - (select m.parent_id from sys_menu m - inner join sys_role_menu rm on m.menu_id = rm.menu_id - and rm.role_id = ?) ` - params = append(params, roleId) - } - - // 查询结果 - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []string{} - } - - if len(results) > 0 { - ids := make([]string, 0) - for _, v := range results { - ids = append(ids, fmt.Sprintf("%v", v["str"])) - } - return ids - } - return []string{} -} - -// SelectMenuByIds 根据菜单ID查询信息 -func (r *RepoSysMenu) SelectMenuByIds(menuIds []string) []model.SysMenu { - placeholder := datasource.KeyPlaceholderByQuery(len(menuIds)) - querySql := r.selectSql + " where m.menu_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(menuIds) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysMenu{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// HasChildByMenuIdAndStatus 存在菜单子节点数量与状态 -func (r *RepoSysMenu) HasChildByMenuIdAndStatus(menuId, status string) int64 { - querySql := "select count(1) as 'total' from sys_menu where parent_id = ?" - params := []any{menuId} - - // 菜单状态 - if status != "" { - querySql += " and status = ?" - params = append(params, status) - } - - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return 0 - } - if len(results) > 0 { - return parse.Number(results[0]["total"]) - } - return 0 -} - -// InsertMenu 新增菜单信息 -func (r *RepoSysMenu) InsertMenu(sysMenu model.SysMenu) string { - // 参数拼接 - params := make(map[string]any) - if sysMenu.MenuID != "" { - params["menu_id"] = sysMenu.MenuID - } - if sysMenu.ParentID != "" { - params["parent_id"] = sysMenu.ParentID - } - if sysMenu.MenuName != "" { - params["menu_name"] = sysMenu.MenuName - } - if sysMenu.MenuSort > 0 { - params["menu_sort"] = sysMenu.MenuSort - } - if sysMenu.Path != "" { - params["path"] = sysMenu.Path - } - if sysMenu.Component != "" { - params["component"] = sysMenu.Component - } - if sysMenu.IsFrame != "" { - params["is_frame"] = sysMenu.IsFrame - } - if sysMenu.IsCache != "" { - params["is_cache"] = sysMenu.IsCache - } - if sysMenu.MenuType != "" { - params["menu_type"] = sysMenu.MenuType - } - if sysMenu.Visible != "" { - params["visible"] = sysMenu.Visible - } - if sysMenu.Status != "" { - params["status"] = sysMenu.Status - } - if sysMenu.Perms != "" { - params["perms"] = sysMenu.Perms - } - if sysMenu.Icon != "" { - params["icon"] = sysMenu.Icon - } else { - params["icon"] = "#" - } - if sysMenu.Remark != "" { - params["remark"] = sysMenu.Remark - } - if sysMenu.CreateBy != "" { - params["create_by"] = sysMenu.CreateBy - params["create_time"] = time.Now().UnixMilli() - } - - // 根据菜单类型重置参数 - if sysMenu.MenuType == consts.TYPE_BUTTON { - params["component"] = "" - params["path"] = "" - params["icon"] = "#" - params["is_cache"] = "1" - params["is_frame"] = "1" - params["visible"] = "1" - params["status"] = "1" - } - if sysMenu.MenuType == consts.TYPE_DIR { - params["component"] = "" - params["perms"] = "" - } - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into sys_menu (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// UpdateMenu 修改菜单信息 -func (r *RepoSysMenu) UpdateMenu(sysMenu model.SysMenu) int64 { - // 参数拼接 - params := make(map[string]any) - if sysMenu.MenuID != "" { - params["menu_id"] = sysMenu.MenuID - } - if sysMenu.ParentID != "" { - params["parent_id"] = sysMenu.ParentID - } - if sysMenu.MenuName != "" { - params["menu_name"] = sysMenu.MenuName - } - if sysMenu.MenuSort > 0 { - params["menu_sort"] = sysMenu.MenuSort - } - if sysMenu.Path != "" { - params["path"] = sysMenu.Path - } - if sysMenu.Component != "" { - params["component"] = sysMenu.Component - } - if sysMenu.IsFrame != "" { - params["is_frame"] = sysMenu.IsFrame - } - if sysMenu.IsCache != "" { - params["is_cache"] = sysMenu.IsCache - } - if sysMenu.MenuType != "" { - params["menu_type"] = sysMenu.MenuType - } - if sysMenu.Visible != "" { - params["visible"] = sysMenu.Visible - } - if sysMenu.Status != "" { - params["status"] = sysMenu.Status - } - if sysMenu.Perms != "" { - params["perms"] = sysMenu.Perms - } - if sysMenu.Icon != "" { - params["icon"] = sysMenu.Icon - } else { - params["icon"] = "#" - } - if sysMenu.Remark != "" { - params["remark"] = sysMenu.Remark - } - if sysMenu.UpdateBy != "" { - params["update_by"] = sysMenu.UpdateBy - params["update_time"] = time.Now().UnixMilli() - } - - // 根据菜单类型重置参数 - if sysMenu.MenuType == consts.TYPE_BUTTON { - params["component"] = "" - params["path"] = "" - params["icon"] = "#" - params["is_cache"] = "1" - params["is_frame"] = "1" - params["visible"] = "1" - params["status"] = "1" - } - if sysMenu.MenuType == consts.TYPE_DIR { - params["component"] = "" - params["perms"] = "" - } - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update sys_menu set " + strings.Join(keys, ",") + " where menu_id = ?" - - // 执行更新 - values = append(values, sysMenu.MenuID) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// DeleteMenuById 删除菜单管理信息 -func (r *RepoSysMenu) DeleteMenuById(menuId string) int64 { - sql := "delete from sys_menu where menu_id = ?" - results, err := datasource.ExecDB("", sql, []any{menuId}) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// CheckUniqueMenu 校验菜单是否唯一 -func (r *RepoSysMenu) CheckUniqueMenu(sysMenu model.SysMenu) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysMenu.MenuName != "" { - conditions = append(conditions, "menu_name = ?") - params = append(params, sysMenu.MenuName) - } - if sysMenu.ParentID != "" { - conditions = append(conditions, "parent_id = ?") - params = append(params, sysMenu.ParentID) - } - if sysMenu.Path != "" { - conditions = append(conditions, "path = ?") - params = append(params, sysMenu.Path) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - if whereSql == "" { - return "" - } - - // 查询数据 - querySql := "select menu_id as 'str' from sys_menu " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} diff --git a/features/sys_menu/service/service_sys_menu.go b/features/sys_menu/service/service_sys_menu.go deleted file mode 100644 index 0da85e34..00000000 --- a/features/sys_menu/service/service_sys_menu.go +++ /dev/null @@ -1,408 +0,0 @@ -package service - -import ( - "encoding/base64" - "strings" - - "be.ems/features/sys_menu/consts" - "be.ems/features/sys_menu/model" - sysRoleService "be.ems/features/sys_role/service" - sysrolemenu "be.ems/features/sys_role_menu" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/utils/regular" - "be.ems/lib/core/vo" -) - -// 实例化服务层 ServiceSysMenu 结构体 -var NewServiceSysMenu = &ServiceSysMenu{ - sysMenuRepository: NewRepoSysMenu, - sysRoleMenuRepository: sysrolemenu.NewRepoSysRoleMenu, - sysRoleRepository: sysRoleService.NewRepoSysRole, -} - -// ServiceSysMenu 菜单 服务层处理 -type ServiceSysMenu struct { - // 菜单服务 - sysMenuRepository *RepoSysMenu - // 角色与菜单关联服务 - sysRoleMenuRepository *sysrolemenu.RepoSysRoleMenu - // 角色服务 - sysRoleRepository *sysRoleService.RepoSysRole -} - -// SelectMenuList 查询系统菜单列表 -func (r *ServiceSysMenu) SelectMenuList(sysMenu model.SysMenu, userId string) []model.SysMenu { - return r.sysMenuRepository.SelectMenuList(sysMenu, userId) -} - -// SelectMenuPermsByUserId 根据用户ID查询权限 -func (r *ServiceSysMenu) SelectMenuPermsByUserId(userId string) []string { - return r.sysMenuRepository.SelectMenuPermsByUserId(userId) -} - -// SelectMenuTreeByUserId 根据用户ID查询菜单 -func (r *ServiceSysMenu) SelectMenuTreeByUserId(userId string) []model.SysMenu { - sysMenus := r.sysMenuRepository.SelectMenuTreeByUserId(userId) - return r.parseDataToTree(sysMenus) -} - -// SelectMenuTreeSelectByUserId 根据用户ID查询菜单树结构信息 -func (r *ServiceSysMenu) SelectMenuTreeSelectByUserId(sysMenu model.SysMenu, userId string) []vo.TreeSelect { - sysMenus := r.sysMenuRepository.SelectMenuList(sysMenu, userId) - - // 过滤旧前端菜单 - sysMenusF := []model.SysMenu{} - for _, v := range sysMenus { - if v.Perms != "page" { - continue - } - sysMenusF = append(sysMenusF, v) - } - - menus := r.parseDataToTree(sysMenusF) - tree := make([]vo.TreeSelect, 0) - for _, menu := range menus { - tree = append(tree, sysMenuTreeSelect(menu)) - } - return tree -} - -// sysMenuTreeSelect 使用给定的 SysMenu 对象解析为 TreeSelect 对象 -func sysMenuTreeSelect(sysMenu model.SysMenu) vo.TreeSelect { - t := vo.TreeSelect{} - t.ID = sysMenu.MenuID - t.Label = sysMenu.MenuName - t.Title = sysMenu.MenuName - - if len(sysMenu.Children) > 0 { - for _, menu := range sysMenu.Children { - child := sysMenuTreeSelect(menu) - t.Children = append(t.Children, child) - } - } else { - t.Children = []vo.TreeSelect{} - } - - return t -} - -// SelectMenuListByRoleId 根据角色ID查询菜单树信息 TODO -func (r *ServiceSysMenu) SelectMenuListByRoleId(roleId string) []string { - roles := r.sysRoleRepository.SelectRoleByIds([]string{roleId}) - if len(roles) > 0 { - role := roles[0] - if role.RoleID == roleId { - return r.sysMenuRepository.SelectMenuListByRoleId( - role.RoleID, - role.MenuCheckStrictly == "1", - ) - } - } - return []string{} -} - -// SelectMenuById 根据菜单ID查询信息 -func (r *ServiceSysMenu) SelectMenuById(menuId string) model.SysMenu { - if menuId == "" { - return model.SysMenu{} - } - menus := r.sysMenuRepository.SelectMenuByIds([]string{menuId}) - if len(menus) > 0 { - return menus[0] - } - return model.SysMenu{} -} - -// HasChildByMenuIdAndStatus 存在菜单子节点数量与状态 -func (r *ServiceSysMenu) HasChildByMenuIdAndStatus(menuId, status string) int64 { - return r.sysMenuRepository.HasChildByMenuIdAndStatus(menuId, status) -} - -// CheckMenuExistRole 查询菜单是否存在角色 -func (r *ServiceSysMenu) CheckMenuExistRole(menuId string) int64 { - return r.sysRoleMenuRepository.CheckMenuExistRole(menuId) -} - -// InsertMenu 新增菜单信息 -func (r *ServiceSysMenu) InsertMenu(sysMenu model.SysMenu) string { - return r.sysMenuRepository.InsertMenu(sysMenu) -} - -// UpdateMenu 修改菜单信息 -func (r *ServiceSysMenu) UpdateMenu(sysMenu model.SysMenu) int64 { - return r.sysMenuRepository.UpdateMenu(sysMenu) -} - -// DeleteMenuById 删除菜单管理信息 -func (r *ServiceSysMenu) DeleteMenuById(menuId string) int64 { - // 删除菜单与角色关联 - r.sysRoleMenuRepository.DeleteMenuRole([]string{menuId}) - return r.sysMenuRepository.DeleteMenuById(menuId) -} - -// CheckUniqueMenuName 校验菜单名称是否唯一 -func (r *ServiceSysMenu) CheckUniqueMenuName(menuName, parentId, menuId string) bool { - uniqueId := r.sysMenuRepository.CheckUniqueMenu(model.SysMenu{ - MenuName: menuName, - ParentID: parentId, - }) - if uniqueId == menuId { - return true - } - return uniqueId == "" -} - -// CheckUniqueMenuPath 校验路由地址是否唯一(针对目录和菜单) -func (r *ServiceSysMenu) CheckUniqueMenuPath(path, menuId string) bool { - uniqueId := r.sysMenuRepository.CheckUniqueMenu(model.SysMenu{ - Path: path, - }) - if uniqueId == menuId { - return true - } - return uniqueId == "" -} - -// BuildRouteMenus 构建前端路由所需要的菜单 -func (r *ServiceSysMenu) BuildRouteMenus(sysMenus []model.SysMenu, prefix string) []vo.Router { - routers := []vo.Router{} - for _, item := range sysMenus { - router := vo.Router{} - router.Name = r.getRouteName(item) - router.Path = r.getRouterPath(item) - router.Component = r.getComponent(item) - router.Meta = r.getRouteMeta(item) - - // 子项菜单 目录类型 非路径链接 - cMenus := item.Children - if len(cMenus) > 0 && item.MenuType == consts.TYPE_DIR && !regular.ValidHttp(item.Path) { - // 获取重定向地址 - redirectPrefix, redirectPath := r.getRouteRedirect( - cMenus, - router.Path, - prefix, - ) - router.Redirect = redirectPath - // 子菜单进入递归 - router.Children = r.BuildRouteMenus(cMenus, redirectPrefix) - } else if item.ParentID == "0" && item.IsFrame == "1" && item.MenuType == consts.TYPE_MENU { - // 父菜单 内部跳转 菜单类型 - menuPath := "/" + item.MenuID - childPath := menuPath + r.getRouterPath(item) - children := vo.Router{ - Name: r.getRouteName(item), - Path: childPath, - Component: item.Component, - Meta: r.getRouteMeta(item), - } - router.Meta.HideChildInMenu = true - router.Children = append(router.Children, children) - router.Name = item.MenuID - router.Path = menuPath - router.Redirect = childPath - router.Component = consts.COMPONENT_LAYOUT_BASIC - } else if item.ParentID == "0" && item.IsFrame == "1" && regular.ValidHttp(item.Path) { - // 父菜单 内部跳转 路径链接 - menuPath := "/" + item.MenuID - childPath := menuPath + r.getRouterPath(item) - children := vo.Router{ - Name: r.getRouteName(item), - Path: childPath, - Component: consts.COMPONENT_LAYOUT_LINK, - Meta: r.getRouteMeta(item), - } - router.Meta.HideChildInMenu = true - router.Children = append(router.Children, children) - router.Name = item.MenuID - router.Path = menuPath - router.Redirect = childPath - router.Component = consts.COMPONENT_LAYOUT_BASIC - } - - routers = append(routers, router) - } - return routers -} - -// getRouteName 获取路由名称 路径英文首字母大写 -func (r *ServiceSysMenu) getRouteName(sysMenu model.SysMenu) string { - routerName := parse.FirstUpper(sysMenu.Path) - // 路径链接 - if regular.ValidHttp(sysMenu.Path) { - return routerName[:5] + "Link" + sysMenu.MenuID - } - return routerName -} - -// getRouterPath 获取路由地址 -func (r *ServiceSysMenu) getRouterPath(sysMenu model.SysMenu) string { - routerPath := sysMenu.Path - - // 显式路径 - if routerPath == "" || strings.HasPrefix(routerPath, "/") { - return routerPath - } - - // 路径链接 内部跳转 - if regular.ValidHttp(routerPath) && sysMenu.IsFrame == "1" { - routerPath = regular.Replace(routerPath, `/^http(s)?:\/\/+/`, "") - routerPath = base64.StdEncoding.EncodeToString([]byte(routerPath)) - } - - // 父菜单 内部跳转 - if sysMenu.ParentID == "0" && sysMenu.IsFrame == "1" { - routerPath = "/" + routerPath - } - - return routerPath -} - -// getComponent 获取组件信息 -func (r *ServiceSysMenu) getComponent(sysMenu model.SysMenu) string { - // 内部跳转 路径链接 - if sysMenu.IsFrame == "1" && regular.ValidHttp(sysMenu.Path) { - return consts.COMPONENT_LAYOUT_LINK - } - - // 非父菜单 目录类型 - if sysMenu.ParentID != "0" && sysMenu.MenuType == consts.TYPE_DIR { - return consts.COMPONENT_LAYOUT_BLANK - } - - // 组件路径 内部跳转 菜单类型 - if sysMenu.Component != "" && sysMenu.IsFrame == "1" && sysMenu.MenuType == consts.TYPE_MENU { - // 父菜单套外层布局 - if sysMenu.ParentID == "0" { - return consts.COMPONENT_LAYOUT_BASIC - } - return sysMenu.Component - } - - return consts.COMPONENT_LAYOUT_BASIC -} - -// getRouteMeta 获取路由元信息 -func (r *ServiceSysMenu) getRouteMeta(sysMenu model.SysMenu) vo.RouterMeta { - meta := vo.RouterMeta{} - if sysMenu.Icon == "#" { - meta.Icon = "" - } else { - meta.Icon = sysMenu.Icon - } - meta.Title = sysMenu.MenuName - meta.HideChildInMenu = false - meta.HideInMenu = sysMenu.Visible == "0" - meta.Cache = sysMenu.IsCache == "1" - meta.Target = "" - - // 路径链接 非内部跳转 - if regular.ValidHttp(sysMenu.Path) && sysMenu.IsFrame == "0" { - meta.Target = "_blank" - } - - return meta -} - -// getRouteRedirect 获取路由重定向地址(针对目录) -// -// cMenus 子菜单数组 -// routerPath 当前菜单路径 -// prefix 菜单重定向路径前缀 -func (r *ServiceSysMenu) getRouteRedirect(cMenus []model.SysMenu, routerPath string, prefix string) (string, string) { - redirectPath := "" - - // 重定向为首个显示并启用的子菜单 - var firstChild *model.SysMenu - for _, item := range cMenus { - if item.IsFrame == "1" && item.Visible == "1" { - firstChild = &item - break - } - } - - // 检查内嵌隐藏菜单是否可做重定向 - if firstChild == nil { - for _, item := range cMenus { - if item.IsFrame == "1" && item.Visible == "1" && strings.Contains(item.Path, consts.PATH_INLINE) { - firstChild = &item - break - } - } - } - - if firstChild != nil { - firstChildPath := r.getRouterPath(*firstChild) - if strings.HasPrefix(firstChildPath, "/") { - redirectPath = firstChildPath - } else { - // 拼接追加路径 - if !strings.HasPrefix(routerPath, "/") { - prefix += "/" - } - prefix = prefix + routerPath - redirectPath = prefix + "/" + firstChildPath - } - } - - return prefix, redirectPath -} - -// parseDataToTree 将数据解析为树结构,构建前端所需要下拉树结构 -func (r *ServiceSysMenu) parseDataToTree(sysMenus []model.SysMenu) []model.SysMenu { - // 节点分组 - nodesMap := make(map[string][]model.SysMenu) - // 节点id - treeIds := []string{} - // 树节点 - tree := []model.SysMenu{} - - for _, item := range sysMenus { - parentID := item.ParentID - // 分组 - mapItem, ok := nodesMap[parentID] - if !ok { - mapItem = []model.SysMenu{} - } - mapItem = append(mapItem, item) - nodesMap[parentID] = mapItem - // 记录节点ID - treeIds = append(treeIds, item.MenuID) - } - - for key, value := range nodesMap { - // 选择不是节点ID的作为树节点 - found := false - for _, id := range treeIds { - if id == key { - found = true - break - } - } - if !found { - tree = append(tree, value...) - } - } - - for i, node := range tree { - iN := r.parseDataToTreeComponet(node, &nodesMap) - tree[i] = iN - } - - return tree -} - -// parseDataToTreeComponet 递归函数处理子节点 -func (r *ServiceSysMenu) parseDataToTreeComponet(node model.SysMenu, nodesMap *map[string][]model.SysMenu) model.SysMenu { - id := node.MenuID - children, ok := (*nodesMap)[id] - if ok { - node.Children = children - } - if len(node.Children) > 0 { - for i, child := range node.Children { - icN := r.parseDataToTreeComponet(child, nodesMap) - node.Children[i] = icN - } - } - return node -} diff --git a/features/sys_role/api_sys_role.go b/features/sys_role/api_sys_role.go deleted file mode 100644 index ec43a1e5..00000000 --- a/features/sys_role/api_sys_role.go +++ /dev/null @@ -1,368 +0,0 @@ -package sysrole - -import ( - "fmt" - "net/http" - "strings" - - "be.ems/features/sys_role/model" - "be.ems/features/sys_role/service" - userService "be.ems/features/sys_user/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" -) - -// 角色接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysRoleApi 结构体 - var apis = &SysRoleApi{ - sysRoleService: service.NewServiceSysRole, - sysUserService: userService.NewServiceSysUser, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/roles", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/role/{roleId}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/role", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/role", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/role/{roleIds}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/role/changeStatus", - Handler: apis.Status, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/role/authUser/allocatedList", - Handler: apis.AuthUserAllocatedList, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/role/authUser/checked", - Handler: apis.AuthUserChecked, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/roleManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// // 实例化控制层 SysRoleApi 结构体 -// var NewSysRole = &SysRoleApi{ -// sysRoleService: sysrole.NewServiceSysRole, -// sysUserService: sysuser.NewServiceSysUser, -// } - -// 角色信息 -// -// PATH /roleManage -type SysRoleApi struct { - // 角色服务 - sysRoleService *service.ServiceSysRole - // 用户服务 - sysUserService *userService.ServiceSysUser -} - -// 角色列表 -// -// GET /list -func (s *SysRoleApi) List(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - data := s.sysRoleService.SelectRolePage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 角色信息详情 -// -// GET /:roleId -func (s *SysRoleApi) Info(w http.ResponseWriter, r *http.Request) { - roleId := ctx.Param(r, "roleId") - if roleId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - data := s.sysRoleService.SelectRoleById(roleId) - if data.RoleID == roleId { - ctx.JSON(w, 200, result.OkData(data)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 角色信息新增 -// -// POST / -func (s *SysRoleApi) Add(w http.ResponseWriter, r *http.Request) { - var body model.SysRole - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.RoleID != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 判断角色名称是否唯一 - uniqueRoleName := s.sysRoleService.CheckUniqueRoleName(body.RoleName, "") - if !uniqueRoleName { - msg := fmt.Sprintf("[%s] Role name already exists", body.RoleName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 判断角色键值是否唯一 - uniqueRoleKey := s.sysRoleService.CheckUniqueRoleKey(body.RoleKey, "") - if !uniqueRoleKey { - msg := fmt.Sprintf("[%s] The role key value already exists", body.RoleName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(r) - insertId := s.sysRoleService.InsertRole(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 角色信息修改 -// -// PUT / -func (s *SysRoleApi) Edit(w http.ResponseWriter, r *http.Request) { - var body model.SysRole - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.RoleID == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否管理员角色 - if body.RoleID == "1" { - ctx.JSON(w, 200, result.ErrMsg("Operation of administrator role is not allowed")) - return - } - - // 检查是否存在 - role := s.sysRoleService.SelectRoleById(body.RoleID) - if role.RoleID != body.RoleID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access role data!")) - return - } - - // 判断角色名称是否唯一 - uniqueRoleName := s.sysRoleService.CheckUniqueRoleName(body.RoleName, body.RoleID) - if !uniqueRoleName { - msg := fmt.Sprintf("[%s] Role name already exists", body.RoleName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - // 判断角色键值是否唯一 - uniqueRoleKey := s.sysRoleService.CheckUniqueRoleKey(body.RoleKey, body.RoleID) - if !uniqueRoleKey { - msg := fmt.Sprintf("[%s] The role key value already exists", body.RoleName) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.UpdateBy = ctx.LoginUserToUserName(r) - rows := s.sysRoleService.UpdateRole(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 角色信息删除 -// -// DELETE /:roleIds -func (s *SysRoleApi) Remove(w http.ResponseWriter, r *http.Request) { - roleIds := ctx.Param(r, "roleIds") - if roleIds == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(roleIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - // 检查是否管理员角色 - for _, id := range uniqueIDs { - if id == "1" { - ctx.JSON(w, 200, result.ErrMsg("Operation of administrator role is not allowed")) - return - } - } - rows, err := s.sysRoleService.DeleteRoleByIds(uniqueIDs) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - msg := fmt.Sprintf("Successfully deleted: %d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) -} - -// 角色状态变更 -// -// PUT /changeStatus -func (s *SysRoleApi) Status(w http.ResponseWriter, r *http.Request) { - var body struct { - // 角色ID - RoleID string `json:"roleId" binding:"required"` - // 状态 - Status string `json:"status" binding:"required"` - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否管理员角色 - if body.RoleID == "1" { - ctx.JSON(w, 200, result.ErrMsg("Operation of administrator role is not allowed")) - return - } - - // 检查是否存在 - role := s.sysRoleService.SelectRoleById(body.RoleID) - if role.RoleID != body.RoleID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access role data!")) - return - } - - // 与旧值相等不变更 - if role.Status == body.Status { - ctx.JSON(w, 200, result.ErrMsg("Change status equals old value!")) - return - } - - // 更新状态不刷新缓存 - userName := ctx.LoginUserToUserName(r) - SysRoleApi := model.SysRole{ - RoleID: body.RoleID, - Status: body.Status, - UpdateBy: userName, - } - rows := s.sysRoleService.UpdateRole(SysRoleApi) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 角色分配用户列表 -// -// GET /authUser/allocatedList -func (s *SysRoleApi) AuthUserAllocatedList(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - roleId, ok := querys["roleId"] - if !ok || roleId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否存在 - role := s.sysRoleService.SelectRoleById(roleId.(string)) - if role.RoleID != roleId { - ctx.JSON(w, 200, result.ErrMsg("No permission to access role data!")) - return - } - - data := s.sysUserService.SelectAllocatedPage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 角色分配选择授权 -// -// PUT /authUser/checked -func (s *SysRoleApi) AuthUserChecked(w http.ResponseWriter, r *http.Request) { - var body struct { - // 角色ID - RoleID string `json:"roleId" binding:"required"` - // 用户ID组 - UserIDs string `json:"userIds" binding:"required"` - // 选择操作 添加true 取消false - Checked bool `json:"checked"` - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 处理字符转id数组后去重 - ids := strings.Split(body.UserIDs, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - - // 检查是否存在 - role := s.sysRoleService.SelectRoleById(body.RoleID) - if role.RoleID != body.RoleID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access role data!")) - return - } - - var rows int64 - if body.Checked { - rows = s.sysRoleService.InsertAuthUsers(body.RoleID, uniqueIDs) - } else { - rows = s.sysRoleService.DeleteAuthUsers(body.RoleID, uniqueIDs) - } - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} diff --git a/features/sys_role/model/sys_role.go b/features/sys_role/model/sys_role.go deleted file mode 100644 index 921fd252..00000000 --- a/features/sys_role/model/sys_role.go +++ /dev/null @@ -1,38 +0,0 @@ -package model - -// SysRole 角色对象 sys_role -type SysRole struct { - // 角色ID - RoleID string `json:"roleId"` - // 角色名称 - RoleName string `json:"roleName" binding:"required"` - // 角色键值 - RoleKey string `json:"roleKey" binding:"required"` - // 显示顺序 - RoleSort int `json:"roleSort"` - // 菜单树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示) - MenuCheckStrictly string `json:"menuCheckStrictly"` - // 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示) - DeptCheckStrictly string `json:"deptCheckStrictly"` - // 角色状态(0停用 1正常) - Status string `json:"status"` - // 删除标志(0代表存在 1代表删除) - DelFlag string `json:"delFlag"` - // 创建者 - CreateBy string `json:"createBy"` - // 创建时间 - CreateTime int64 `json:"createTime"` - // 更新者 - UpdateBy string `json:"updateBy"` - // 更新时间 - UpdateTime int64 `json:"updateTime"` - // 备注 - Remark string `json:"remark"` - - // ====== 非数据库字段属性 ====== - - // 菜单组 - MenuIds []string `json:"menuIds,omitempty"` - // 部门组(数据权限) - DeptIds []string `json:"deptIds,omitempty"` -} diff --git a/features/sys_role/service/repo_sys_role.go b/features/sys_role/service/repo_sys_role.go deleted file mode 100644 index c4182ac3..00000000 --- a/features/sys_role/service/repo_sys_role.go +++ /dev/null @@ -1,362 +0,0 @@ -package service - -import ( - "fmt" - "strings" - "time" - - "be.ems/features/sys_role/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/date" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysRole 结构体 -var NewRepoSysRole = &RepoSysRole{ - selectSql: `select distinct - r.role_id, r.role_name, r.role_key, r.role_sort, r.menu_check_strictly, - r.dept_check_strictly, r.status, r.del_flag, r.create_time, r.remark - from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join user u on u.id = ur.user_id`, - - resultMap: map[string]string{ - "role_id": "RoleID", - "role_name": "RoleName", - "role_key": "RoleKey", - "role_sort": "RoleSort", - "menu_check_strictly": "MenuCheckStrictly", - "dept_check_strictly": "DeptCheckStrictly", - "status": "Status", - "del_flag": "DelFlag", - "create_by": "CreateBy", - "create_time": "CreateTime", - "update_by": "UpdateBy", - "update_time": "UpdateTime", - "remark": "Remark", - }, -} - -// RepoSysRole 角色表 数据层处理 -type RepoSysRole struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysRole) convertResultRows(rows []map[string]any) []model.SysRole { - arr := make([]model.SysRole, 0) - for _, row := range rows { - sysRole := model.SysRole{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&sysRole, keyMapper, value) - } - } - arr = append(arr, sysRole) - } - return arr -} - -// SelectRolePage 根据条件分页查询角色数据 -func (r *RepoSysRole) SelectRolePage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["roleId"]; ok && v != "" { - conditions = append(conditions, "r.role_id = ?") - params = append(params, v) - } - if v, ok := query["roleName"]; ok && v != "" { - conditions = append(conditions, "r.role_name like concat('%', concat(?, '%'))") - params = append(params, v) - } - if v, ok := query["roleKey"]; ok && v != "" { - conditions = append(conditions, "r.role_key like concat('%', concat(?, '%'))") - params = append(params, v) - } - if v, ok := query["status"]; ok && v != "" { - conditions = append(conditions, "r.status = ?") - params = append(params, v) - } - beginTime, ok := query["beginTime"] - if !ok { - beginTime, ok = query["params[beginTime]"] - } - if ok && beginTime != "" { - conditions = append(conditions, "r.create_time >= ?") - beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD) - params = append(params, beginDate.UnixMilli()) - } - endTime, ok := query["endTime"] - if !ok { - endTime, ok = query["params[endTime]"] - } - if ok && endTime != "" { - conditions = append(conditions, "r.create_time <= ?") - endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD) - params = append(params, endDate.UnixMilli()) - } - - // 构建查询条件语句 - whereSql := " where r.del_flag = '0' " - if len(conditions) > 0 { - whereSql += " and " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := `select count(distinct r.role_id) as 'total' from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join user u on u.id = ur.user_id` - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []model.SysRole{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " order by r.role_sort asc limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := r.selectSql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectRoleList 根据条件查询角色数据 -func (r *RepoSysRole) SelectRoleList(sysRole model.SysRole) []model.SysRole { - // 查询条件拼接 - var conditions []string - var params []any - if sysRole.RoleID != "" { - conditions = append(conditions, "r.role_id = ?") - params = append(params, sysRole.RoleID) - } - if sysRole.RoleKey != "" { - conditions = append(conditions, "r.role_key like concat('%', concat(?, '%'))") - params = append(params, sysRole.RoleKey) - } - if sysRole.RoleName != "" { - conditions = append(conditions, "r.role_name like concat('%', concat(?, '%'))") - params = append(params, sysRole.RoleName) - } - if sysRole.Status != "" { - conditions = append(conditions, "r.status = ?") - params = append(params, sysRole.Status) - } - - // 构建查询条件语句 - whereSql := " where r.del_flag = '0' " - if len(conditions) > 0 { - whereSql += " and " + strings.Join(conditions, " and ") - } - - // 查询数据 - orderSql := " order by r.role_sort" - querySql := r.selectSql + whereSql + orderSql - rows, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysRole{} - } - return r.convertResultRows(rows) -} - -// SelectRoleListByUserId 根据用户ID获取角色选择框列表 -func (r *RepoSysRole) SelectRoleListByUserId(userId string) []model.SysRole { - querySql := r.selectSql + " where r.del_flag = '0' and ur.user_id = ?" - results, err := datasource.RawDB("", querySql, []any{userId}) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysRole{} - } - return r.convertResultRows(results) -} - -// SelectRoleByIds 通过角色ID查询角色 -func (r *RepoSysRole) SelectRoleByIds(roleIds []string) []model.SysRole { - placeholder := datasource.KeyPlaceholderByQuery(len(roleIds)) - querySql := r.selectSql + " where r.role_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(roleIds) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []model.SysRole{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// UpdateRole 修改角色信息 -func (r *RepoSysRole) UpdateRole(sysRole model.SysRole) int64 { - // 参数拼接 - params := make(map[string]any) - if sysRole.RoleName != "" { - params["role_name"] = sysRole.RoleName - } - if sysRole.RoleKey != "" { - params["role_key"] = sysRole.RoleKey - } - if sysRole.RoleSort > 0 { - params["role_sort"] = sysRole.RoleSort - } - if sysRole.MenuCheckStrictly != "" { - params["menu_check_strictly"] = sysRole.MenuCheckStrictly - } - if sysRole.DeptCheckStrictly != "" { - params["dept_check_strictly"] = sysRole.DeptCheckStrictly - } - if sysRole.Status != "" { - params["status"] = sysRole.Status - } - if sysRole.Remark != "" { - params["remark"] = sysRole.Remark - } - if sysRole.UpdateBy != "" { - params["update_by"] = sysRole.UpdateBy - params["update_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update sys_role set " + strings.Join(keys, ",") + " where role_id = ?" - - // 执行更新 - values = append(values, sysRole.RoleID) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// InsertRole 新增角色信息 -func (r *RepoSysRole) InsertRole(sysRole model.SysRole) string { - // 参数拼接 - params := make(map[string]any) - if sysRole.RoleID != "" { - params["role_id"] = sysRole.RoleID - } - if sysRole.RoleName != "" { - params["role_name"] = sysRole.RoleName - } - if sysRole.RoleKey != "" { - params["role_key"] = sysRole.RoleKey - } - if sysRole.RoleSort > 0 { - params["role_sort"] = sysRole.RoleSort - } - if sysRole.MenuCheckStrictly != "" { - params["menu_check_strictly"] = sysRole.MenuCheckStrictly - } - if sysRole.DeptCheckStrictly != "" { - params["dept_check_strictly"] = sysRole.DeptCheckStrictly - } - if sysRole.Status != "" { - params["status"] = sysRole.Status - } - if sysRole.Remark != "" { - params["remark"] = sysRole.Remark - } - if sysRole.CreateBy != "" { - params["create_by"] = sysRole.CreateBy - params["create_time"] = time.Now().UnixMilli() - } - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into sys_role (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// DeleteRoleByIds 批量删除角色信息 -func (r *RepoSysRole) DeleteRoleByIds(roleIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(roleIds)) - sql := "update sys_role set del_flag = '1' where role_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(roleIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// CheckUniqueRole 校验角色是否唯一 -func (r *RepoSysRole) CheckUniqueRole(sysRole model.SysRole) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysRole.RoleName != "" { - conditions = append(conditions, "r.role_name = ?") - params = append(params, sysRole.RoleName) - } - if sysRole.RoleKey != "" { - conditions = append(conditions, "r.role_key = ?") - params = append(params, sysRole.RoleKey) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select role_id as 'str' from sys_role r " + whereSql + " and r.del_flag = '0' limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} diff --git a/features/sys_role/service/service_sys_role.go b/features/sys_role/service/service_sys_role.go deleted file mode 100644 index 33d89be3..00000000 --- a/features/sys_role/service/service_sys_role.go +++ /dev/null @@ -1,165 +0,0 @@ -package service - -import ( - "errors" - "fmt" - - "be.ems/features/sys_role/model" - sysrolemenu "be.ems/features/sys_role_menu" - sysuserrole "be.ems/features/sys_user_role" -) - -// 实例化服务层 ServiceSysRole 结构体 -var NewServiceSysRole = &ServiceSysRole{ - sysRoleRepository: NewRepoSysRole, - sysUserRoleRepository: sysuserrole.NewRepoSysUserRole, - sysRoleMenuRepository: sysrolemenu.NewRepoSysRoleMenu, -} - -// ServiceSysRole 角色 服务层处理 -type ServiceSysRole struct { - // 角色服务 - sysRoleRepository *RepoSysRole - // 用户与角色关联服务 - sysUserRoleRepository *sysuserrole.RepoSysUserRole - // 角色与菜单关联服务 - sysRoleMenuRepository *sysrolemenu.RepoSysRoleMenu -} - -// SelectRolePage 根据条件分页查询角色数据 -func (r *ServiceSysRole) SelectRolePage(query map[string]any) map[string]any { - return r.sysRoleRepository.SelectRolePage(query) -} - -// SelectRoleList 根据条件查询角色数据 -func (r *ServiceSysRole) SelectRoleList(sysRole model.SysRole) []model.SysRole { - return r.sysRoleRepository.SelectRoleList(sysRole) -} - -// SelectRoleListByUserId 根据用户ID获取角色选择框列表 -func (r *ServiceSysRole) SelectRoleListByUserId(userId string) []model.SysRole { - return r.sysRoleRepository.SelectRoleListByUserId(userId) -} - -// SelectRoleById 通过角色ID查询角色 -func (r *ServiceSysRole) SelectRoleById(roleId string) model.SysRole { - if roleId == "" { - return model.SysRole{} - } - posts := r.sysRoleRepository.SelectRoleByIds([]string{roleId}) - if len(posts) > 0 { - return posts[0] - } - return model.SysRole{} -} - -// UpdateRole 修改角色信息 -func (r *ServiceSysRole) UpdateRole(sysRole model.SysRole) int64 { - rows := r.sysRoleRepository.UpdateRole(sysRole) - if rows > 0 { - // 删除角色与菜单关联 - r.sysRoleMenuRepository.DeleteRoleMenu([]string{sysRole.RoleID}) - if len(sysRole.MenuIds) > 0 { - r.insertRoleMenu(sysRole.RoleID, sysRole.MenuIds) - } - } - return rows -} - -// InsertRole 新增角色信息 -func (r *ServiceSysRole) InsertRole(sysRole model.SysRole) string { - insertId := r.sysRoleRepository.InsertRole(sysRole) - if insertId != "" && len(sysRole.MenuIds) > 0 { - r.insertRoleMenu(insertId, sysRole.MenuIds) - } - return insertId -} - -// insertRoleMenu 新增角色菜单信息 -func (r *ServiceSysRole) insertRoleMenu(roleId string, menuIds []string) int64 { - if roleId == "" || len(menuIds) <= 0 { - return 0 - } - - sysRoleMenus := []sysrolemenu.SysRoleMenu{} - for _, menuId := range menuIds { - if menuId == "" { - continue - } - sysRoleMenus = append(sysRoleMenus, sysrolemenu.NewSysRoleMenu(roleId, menuId)) - } - - return r.sysRoleMenuRepository.BatchRoleMenu(sysRoleMenus) -} - -// DeleteRoleByIds 批量删除角色信息 -func (r *ServiceSysRole) DeleteRoleByIds(roleIds []string) (int64, error) { - // 检查是否存在 - roles := r.sysRoleRepository.SelectRoleByIds(roleIds) - if len(roles) <= 0 { - return 0, errors.New("no permission to access role data") - } - for _, role := range roles { - // 检查是否为已删除 - if role.DelFlag == "1" { - return 0, errors.New(role.RoleID + " The character information has been deleted") - } - // 检查分配用户 - userCount := r.sysUserRoleRepository.CountUserRoleByRoleId(role.RoleID) - if userCount > 0 { - msg := fmt.Sprintf("[%s] has been assigned to a user and cannot be deleted", role.RoleName) - return 0, errors.New(msg) - } - } - if len(roles) == len(roleIds) { - // 删除角色与菜单关联 - r.sysRoleMenuRepository.DeleteRoleMenu(roleIds) - rows := r.sysRoleRepository.DeleteRoleByIds(roleIds) - return rows, nil - } - return 0, errors.New("failed to delete role information") -} - -// CheckUniqueRoleName 校验角色名称是否唯一 -func (r *ServiceSysRole) CheckUniqueRoleName(roleName, roleId string) bool { - uniqueId := r.sysRoleRepository.CheckUniqueRole(model.SysRole{ - RoleName: roleName, - }) - if uniqueId == roleId { - return true - } - return uniqueId == "" -} - -// CheckUniqueRoleKey 校验角色权限是否唯一 -func (r *ServiceSysRole) CheckUniqueRoleKey(roleKey, roleId string) bool { - uniqueId := r.sysRoleRepository.CheckUniqueRole(model.SysRole{ - RoleKey: roleKey, - }) - if uniqueId == roleId { - return true - } - return uniqueId == "" -} - -// DeleteAuthUsers 批量取消授权用户角色 -func (r *ServiceSysRole) DeleteAuthUsers(roleId string, userIds []string) int64 { - return r.sysUserRoleRepository.DeleteUserRoleByRoleId(roleId, userIds) -} - -// InsertAuthUsers 批量新增授权用户角色 -func (r *ServiceSysRole) InsertAuthUsers(roleId string, userIds []string) int64 { - if roleId == "" || len(userIds) <= 0 { - return 0 - } - - sysUserRoles := []sysuserrole.SysUserRole{} - for _, userId := range userIds { - if userId == "" { - continue - } - sysUserRoles = append(sysUserRoles, sysuserrole.NewSysUserRole(userId, roleId)) - } - - return r.sysUserRoleRepository.BatchUserRole(sysUserRoles) -} diff --git a/features/sys_role_menu/model_sys_role_menu.go b/features/sys_role_menu/model_sys_role_menu.go deleted file mode 100644 index 755e66db..00000000 --- a/features/sys_role_menu/model_sys_role_menu.go +++ /dev/null @@ -1,15 +0,0 @@ -package sysrolemenu - -// SysRoleMenu 角色和菜单关联对象 sys_role_menu -type SysRoleMenu struct { - RoleID string `json:"roleId"` // 角色ID - MenuID string `json:"menuId"` // 菜单ID -} - -// NewSysRoleMenu 创建角色和菜单关联对象的构造函数 -func NewSysRoleMenu(roleID string, menuID string) SysRoleMenu { - return SysRoleMenu{ - RoleID: roleID, - MenuID: menuID, - } -} diff --git a/features/sys_role_menu/repo_sys_role_menu.go b/features/sys_role_menu/repo_sys_role_menu.go deleted file mode 100644 index fb11cf56..00000000 --- a/features/sys_role_menu/repo_sys_role_menu.go +++ /dev/null @@ -1,86 +0,0 @@ -package sysrolemenu - -import ( - "fmt" - "strings" - - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysRoleMenu 结构体 -var NewRepoSysRoleMenu = &RepoSysRoleMenu{} - -// RepoSysRoleMenu 角色与菜单关联表 数据层处理 -type RepoSysRoleMenu struct{} - -// CheckMenuExistRole 查询菜单分配给角色使用数量 -func (r *RepoSysRoleMenu) CheckMenuExistRole(menuId string) int64 { - querySql := "select count(1) as 'total' from sys_role_menu where menu_id = ?" - results, err := datasource.RawDB("", querySql, []any{menuId}) - if err != nil { - log.Errorf("query err => %v", err) - return 0 - } - if len(results) > 0 { - return parse.Number(results[0]["total"]) - } - return 0 -} - -// DeleteRoleMenu 批量删除角色和菜单关联 -func (r *RepoSysRoleMenu) DeleteRoleMenu(roleIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(roleIds)) - sql := "delete from sys_role_menu where role_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(roleIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// DeleteMenuRole 批量删除菜单和角色关联 -func (r *RepoSysRoleMenu) DeleteMenuRole(menuIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(menuIds)) - sql := "delete from sys_role_menu where menu_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(menuIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// BatchRoleMenu 批量新增角色菜单信息 -func (r *RepoSysRoleMenu) BatchRoleMenu(sysRoleMenus []SysRoleMenu) int64 { - keyValues := make([]string, 0) - for _, item := range sysRoleMenus { - keyValues = append(keyValues, fmt.Sprintf("(%s,%s)", item.RoleID, item.MenuID)) - } - sql := "insert into sys_role_menu(role_id, menu_id) values " + strings.Join(keyValues, ",") - results, err := datasource.ExecDB("", sql, nil) - if err != nil { - log.Errorf("insert err => %v", err) - return 0 - } - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return 0 - } - return insertId -} diff --git a/features/sys_user/api_sys_user.go b/features/sys_user/api_sys_user.go deleted file mode 100644 index 69b748c0..00000000 --- a/features/sys_user/api_sys_user.go +++ /dev/null @@ -1,323 +0,0 @@ -package sysuser - -import ( - "fmt" - "net/http" - "strings" - - sysRoleModel "be.ems/features/sys_role/model" - sysRoleService "be.ems/features/sys_role/service" - sysUserModel "be.ems/features/sys_user/model" - "be.ems/features/sys_user/service" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/utils/parse" - "be.ems/lib/core/vo/result" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" - srcConfig "be.ems/src/framework/config" -) - -// 用户接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysUserApi 结构体 - var apis = &SysUserApi{ - sysUserService: service.NewServiceSysUser, - sysRoleService: sysRoleService.NewServiceSysRole, - } - - rs := [...]services.RouterItem{ - { - Method: "GET", - Pattern: "/users", - Handler: apis.List, - Middleware: midware.Authorize(nil), - }, - { - Method: "GET", - Pattern: "/user/{userId}", - Handler: apis.Info, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/user", - Handler: apis.Add, - Middleware: midware.Authorize(nil), - }, - { - Method: "PUT", - Pattern: "/user", - Handler: apis.Edit, - Middleware: midware.Authorize(nil), - }, - { - Method: "DELETE", - Pattern: "/user/{userIds}", - Handler: apis.Remove, - Middleware: midware.Authorize(nil), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/userManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// // 实例化控制层 SysUserApi 结构体 -// var NewSysUser = &SysUserApi{ -// sysUserService: service.NewSysUserImpl, -// sysRoleService: service.NewSysRoleImpl, -// sysPostService: service.NewSysPostImpl, -// sysDictDataService: service.NewSysDictDataImpl, -// } - -// 用户信息 -// -// PATH /system/user -type SysUserApi struct { - // 用户服务 - sysUserService *service.ServiceSysUser - // 角色服务 - sysRoleService *sysRoleService.ServiceSysRole -} - -// 用户信息列表 -// -// GET /list -func (s *SysUserApi) List(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - data := s.sysUserService.SelectUserPage(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// 用户信息详情 -// -// GET /:userId -func (s *SysUserApi) Info(w http.ResponseWriter, r *http.Request) { - userId := ctx.Param(r, "userId") - if userId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 查询系统角色列表 - roles := s.sysRoleService.SelectRoleList(sysRoleModel.SysRole{}) - - // 不是系统指定管理员需要排除其角色 - if !srcConfig.IsAdmin(userId) { - rolesFilter := make([]sysRoleModel.SysRole, 0) - for _, r := range roles { - if r.RoleID != "1" { - rolesFilter = append(rolesFilter, r) - } - } - roles = rolesFilter - } - - // 新增用户时,用户ID为0 - if userId == "0" { - ctx.JSON(w, 200, result.OkData(map[string]any{ - "user": map[string]any{}, - "roleIds": []string{}, - "roles": roles, - })) - return - } - - // 检查用户是否存在 - user := s.sysUserService.SelectUserById(userId) - if user.Id != userId { - ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!")) - return - } - - // 角色ID组 - roleIds := make([]string, 0) - for _, r := range user.Roles { - roleIds = append(roleIds, r.RoleID) - } - - ctx.JSON(w, 200, result.OkData(map[string]any{ - "user": user, - "roleIds": roleIds, - "roles": roles, - })) -} - -// 用户信息新增 -// -// POST / -func (s *SysUserApi) Add(w http.ResponseWriter, r *http.Request) { - var body sysUserModel.SysUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Id != "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查用户登录账号是否唯一 - uniqueUserName := s.sysUserService.CheckUniqueUserName(body.AccountId, "") - if !uniqueUserName { - msg := fmt.Sprintf("[%s] Login account already exists", body.AccountId) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - insertId := s.sysUserService.InsertUser(body) - if insertId != "" { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 用户信息修改 -// -// POST / -func (s *SysUserApi) Edit(w http.ResponseWriter, r *http.Request) { - var body sysUserModel.SysUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Id == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否管理员用户 - // if srcConfig.IsAdmin(body.Id) { - // ctx.JSON(w, 200, result.ErrMsg("不允许操作管理员用户")) - // return - // } - - user := s.sysUserService.SelectUserById(body.Id) - if user.Id != body.Id { - ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!")) - return - } - - // 检查用户登录账号是否唯一 - uniqueUserName := s.sysUserService.CheckUniqueUserName(body.AccountId, body.Id) - if !uniqueUserName { - msg := fmt.Sprintf("[%s] Login account already exists", body.AccountId) - ctx.JSON(w, 200, result.ErrMsg(msg)) - return - } - - body.AccountId = "" // 忽略修改登录用户名称 - // body.Password = "" // 忽略修改密码 - rows := s.sysUserService.UpdateUserAndRolePost(body) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 用户信息删除 -// -// DELETE /:userIds -func (s *SysUserApi) Remove(w http.ResponseWriter, r *http.Request) { - userIds := ctx.Param(r, "userIds") - if userIds == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(userIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - ctx.JSON(w, 200, result.Err(nil)) - return - } - rows, err := s.sysUserService.DeleteUserByIds(uniqueIDs) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - msg := fmt.Sprintf("Successfully deleted: %d", rows) - ctx.JSON(w, 200, result.OkMsg(msg)) -} - -// 用户重置密码 -// -// PUT /resetPwd -func (s *SysUserApi) ResetPwd(w http.ResponseWriter, r *http.Request) { - var body struct { - UserID string `json:"userId" binding:"required"` - Password string `json:"password" binding:"required"` - } - if err := ctx.ShouldBindJSON(r, &body); err != nil { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否管理员用户 - if srcConfig.IsAdmin(body.UserID) { - ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!")) - return - } - - user := s.sysUserService.SelectUserById(body.UserID) - if user.Id != body.UserID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!")) - return - } - - SysUserApi := sysUserModel.SysUser{ - Id: body.UserID, - Password: body.Password, - } - rows := s.sysUserService.UpdateUser(SysUserApi) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} - -// 用户状态修改 -// -// PUT /changeStatus -func (s *SysUserApi) Status(w http.ResponseWriter, r *http.Request) { - var body struct { - UserID string `json:"userId" binding:"required"` - Status string `json:"status" binding:"required"` - } - if err := ctx.ShouldBindJSON(r, &body); err != nil { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 检查是否存在 - user := s.sysUserService.SelectUserById(body.UserID) - if user.Id != body.UserID { - ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!")) - return - } - - // 与旧值相等不变更 - if user.Status == body.Status { - ctx.JSON(w, 200, result.ErrMsg("Change status equals old value!")) - return - } - - SysUserApi := sysUserModel.SysUser{ - Id: body.UserID, - Status: body.Status, - } - rows := s.sysUserService.UpdateUser(SysUserApi) - if rows > 0 { - ctx.JSON(w, 200, result.Ok(nil)) - return - } - ctx.JSON(w, 200, result.Err(nil)) -} diff --git a/features/sys_user/model/sys_user.go b/features/sys_user/model/sys_user.go deleted file mode 100644 index 1f5f1088..00000000 --- a/features/sys_user/model/sys_user.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import "be.ems/features/sys_role/model" - -type SysUser struct { - Id string `json:"id" xorm:"pk 'id' autoincr"` - AccountId string `json:"accountId" xorm:"account_id"` - Name string `json:"name" xorm:"name"` - Sn string `json:"sn"` - Gender string `json:"gender"` - Description string `json:"description"` - TelephoneNumber string `json:"telephoneNumber" xorm:"telephone_number"` - Mobile string `json:"mobile"` - Email string `json:"email" xorm:"email"` - StartTime string `json:"startTime" xorm:"start_time"` - EndTime string `json:"endTime" xorm:"end_time"` - IdCardNumber string `json:"idCardNumber"` - EmployeeNumber string `json:"employeeNumber"` - Organize string `json:"organize"` - EmployeeType string `json:"employeeType"` - SupporterCorpName string `json:"supporterCorpName"` - RealName string `json:"realName" xorm:"real_name"` - Password string `json:"password" xorm:"-"` - PasswordSha512 string `json:"-" xorm:"-"` - ChangePasswordFlag int `json:"changePasswordFlag"` - PasswordExpiration string `json:"passwordExpiration" xorm:"password_expiration"` - Status string `json:"status"` - UserExpiration string `json:"userExpiration" xorm:"user_expiration"` - GroupName string `json:"groupName" xorm:"group_name"` - Profile string `json:"-" xorm:"profile"` - Phone string `json:"phone" xorm:"phone"` - CreateTime string `json:"createTime" xorm:"create_time"` - UpdateTime string `json:"updateTime" xorm:"update_time"` - Unit string `json:"unit" xorm:"unit"` - - // 角色对象组 - Roles []model.SysRole `json:"roles"` - // 角色ID - 参数提交绑定 - RoleID string `json:"roleId,omitempty"` - // 角色组 - 参数提交绑定 - RoleIDs []string `json:"roleIds,omitempty"` -} diff --git a/features/sys_user/service/repo_sys_user.go b/features/sys_user/service/repo_sys_user.go deleted file mode 100644 index de559491..00000000 --- a/features/sys_user/service/repo_sys_user.go +++ /dev/null @@ -1,578 +0,0 @@ -package service - -import ( - "fmt" - "strings" - "time" - - sysRoleModel "be.ems/features/sys_role/model" - sysUserModel "be.ems/features/sys_user/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/date" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" - "be.ems/src/framework/utils/crypto" -) - -// 实例化数据层 RepoSysUser 结构体 -var NewRepoSysUser = &RepoSysUser{ - selectSql: `select u.id, - u.account_id, u.name, u.sn, u.gender, u.description, u.telephone_number, u.mobile, u.email, - u.start_time, u.end_time, u.id_card_number, u.employee_number, - u.organize, u.employee_type, u.supporter_corp_name, u.real_name, u.password, u.password_sha512, - u.change_password_flag,u.password_expiration, u.status, u.user_expiration, u.group_name, - u.profile, u.phone, u.create_time, u.update_time, u.unit, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status - from user u - left join sys_user_role ur on u.id = ur.user_id - left join sys_role r on r.role_id = ur.role_id`, - - sysUserMap: map[string]string{ - "id": "Id", - "account_id": "AccountId", - "name": "Name", - "sn": "Sn", - "gender": "Gender", - "description": "Description", - "telephone_number": "TelephoneNumber", - "mobile": "Mobile", - "email": "Email", - "start_time": "StartTime", - "end_time": "EndTime", - "id_card_number": "IdCardNumber", - "employee_number": "EmployeeNumber", - "organize": "Organize", - "employee_type": "EmployeeType", - "supporter_corp_name": "SupporterCorpName", - "real_name": "RealName", - "password": "Password", - "password_sha512": "PasswordSha512", - "change_password_flag": "ChangePasswordFlag", - "password_expiration": "PasswordExpiration", - "status": "Status", - "user_expiration": "UserExpiration", - "group_name": "GroupName", - "profile": "Profile", - "phone": "Phone", - "create_time": "CreateTime", - "update_time": "UpdateTime", - "unit": "Unit", - }, - - sysRoleMap: map[string]string{ - "role_id": "RoleID", - "role_name": "RoleName", - "role_key": "RoleKey", - "role_sort": "RoleSort", - "data_scope": "DataScope", - "role_status": "Status", - }, -} - -// RepoSysUser 用户表 数据层处理 -type RepoSysUser struct { - // 查询视图对象SQL - selectSql string - // 用户信息实体映射 - sysUserMap map[string]string - // 用户角色实体映射 一对多 - sysRoleMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoSysUser) convertResultRows(rows []map[string]any) []sysUserModel.SysUser { - arr := make([]sysUserModel.SysUser, 0) - - for _, row := range rows { - sysUser := sysUserModel.SysUser{} - sysRole := sysRoleModel.SysRole{} - sysUser.Roles = []sysRoleModel.SysRole{} - - for key, value := range row { - if keyMapper, ok := r.sysUserMap[key]; ok { - datasource.SetFieldValue(&sysUser, keyMapper, value) - } - if keyMapper, ok := r.sysRoleMap[key]; ok { - datasource.SetFieldValue(&sysRole, keyMapper, value) - } - } - - if sysRole.RoleKey != "" { - sysUser.Roles = append(sysUser.Roles, sysRole) - } - - one := true - for i, a := range arr { - if a.Id == sysUser.Id { - arrUser := &arr[i] - arrUser.Roles = append(arrUser.Roles, sysUser.Roles...) - one = false - break - } - } - if one { - arr = append(arr, sysUser) - } - } - - return arr -} - -// SelectUserPage 根据条件分页查询用户列表 -func (r *RepoSysUser) SelectUserPage(query map[string]any) map[string]any { - selectUserSql := `select u.id, - u.account_id, u.name, u.sn, u.gender, u.description, u.telephone_number, u.mobile, u.email, - u.start_time, u.end_time, u.id_card_number, u.employee_number, - u.organize, u.employee_type, u.supporter_corp_name, u.real_name, - u.change_password_flag,u.password_expiration, u.status, u.user_expiration, u.group_name, - u.profile, u.phone, u.create_time, u.update_time, u.unit - from user u` - selectUserTotalSql := `select count(distinct u.id) as 'total' from user u` - - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["accountId"]; ok && v != "" { - conditions = append(conditions, "u.account_id = ?") - params = append(params, v) - } - if v, ok := query["name"]; ok && v != "" { - conditions = append(conditions, "u.name concat('%', concat(?, '%'))") - params = append(params, v) - } - if v, ok := query["status"]; ok && v != "" { - conditions = append(conditions, "u.status = ?") - params = append(params, v) - } - if v, ok := query["phonenumber"]; ok && v != "" { - conditions = append(conditions, "u.phonenumber like concat('%', concat(?, '%'))") - params = append(params, v) - } - beginTime, ok := query["beginTime"] - if !ok { - beginTime, ok = query["params[beginTime]"] - } - if ok && beginTime != "" { - conditions = append(conditions, "u.login_date >= ?") - beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD) - params = append(params, beginDate.UnixMilli()) - } - endTime, ok := query["endTime"] - if !ok { - endTime, ok = query["params[endTime]"] - } - if ok && endTime != "" { - conditions = append(conditions, "u.login_date <= ?") - endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD) - params = append(params, endDate.UnixMilli()) - } - if v, ok := query["deptId"]; ok && v != "" { - conditions = append(conditions, "(u.dept_id = ? or u.dept_id in ( select t.dept_id from sys_dept t where find_in_set(?, ancestors) ))") - params = append(params, v) - params = append(params, v) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := selectUserTotalSql + whereSql - totalRows, err := datasource.RawDB("", totalSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []sysUserModel.SysUser{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := selectUserSql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectAllocatedPage 根据条件分页查询分配用户角色列表 -func (r *RepoSysUser) SelectAllocatedPage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["name"]; ok && v != "" { - conditions = append(conditions, "u.name like concat('%', concat(?, '%'))") - params = append(params, v) - } - if v, ok := query["phone"]; ok && v != "" { - conditions = append(conditions, "u.phone like concat('%', concat(?, '%'))") - params = append(params, v) - } - if v, ok := query["status"]; ok && v != "" { - conditions = append(conditions, "u.status = ?") - params = append(params, v) - } - // 分配角色用户 - if allocated, ok := query["allocated"]; ok && allocated != "" { - if roleId, ok := query["roleId"]; ok && roleId != "" { - if parse.Boolean(allocated) { - conditions = append(conditions, "r.role_id = ?") - params = append(params, roleId) - } else { - conditions = append(conditions, `(r.role_id != ? or r.role_id IS NULL) - and u.id not in ( - select u.id from user u - inner join sys_user_role ur on u.id = ur.user_id - and ur.role_id = ? - )`) - params = append(params, roleId) - params = append(params, roleId) - } - - } - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数量 长度为0直接返回 - totalSql := `select count(distinct u.id) as 'total' from user u - left join sys_user_role ur on u.id = ur.user_id - left join sys_role r on r.role_id = ur.role_id` - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return map[string]any{ - "total": total, - "rows": []sysUserModel.SysUser{}, - } - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 查询数据 - querySql := `select distinct - u.id, u.account_id, u.name, u.gender, u.email, - u.phone, u.status, u.create_time, u.real_name - from user u - left join sys_user_role ur on u.id = ur.user_id - left join sys_role r on r.role_id = ur.role_id` - querySql = querySql + whereSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - rows := r.convertResultRows(results) - return map[string]any{ - "total": total, - "rows": rows, - } -} - -// SelectUserList 根据条件查询用户列表 -func (r *RepoSysUser) SelectUserList(sysUser sysUserModel.SysUser, dataScopeSQL string) []sysUserModel.SysUser { - selectUserSql := `select - u.id, u.account_id, u.name, u.real_name, u.email, u.gender, u.phone, u.create_time, u.status, u.description - from user u` - - // 查询条件拼接 - var conditions []string - var params []any - if sysUser.AccountId != "" { - conditions = append(conditions, "u.account_id = ?") - params = append(params, sysUser.AccountId) - } - if sysUser.Name != "" { - conditions = append(conditions, "u.name like concat('%', concat(?, '%'))") - params = append(params, sysUser.Name) - } - if sysUser.Status != "" { - conditions = append(conditions, "u.status = ?") - params = append(params, sysUser.Status) - } - if sysUser.Phone != "" { - conditions = append(conditions, "u.phone like concat('%', concat(?, '%'))") - params = append(params, sysUser.Phone) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - querySql := selectUserSql + whereSql + dataScopeSQL - rows, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return []sysUserModel.SysUser{} - } - return r.convertResultRows(rows) -} - -// SelectUserByIds 通过用户ID查询用户 -func (r *RepoSysUser) SelectUserByIds(userIds []string) []sysUserModel.SysUser { - placeholder := datasource.KeyPlaceholderByQuery(len(userIds)) - querySql := r.selectSql + " where u.id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(userIds) - results, err := datasource.RawDB("", querySql, parameters) - if err != nil { - log.Errorf("query err => %v", err) - return []sysUserModel.SysUser{} - } - // 转换实体 - return r.convertResultRows(results) -} - -// SelectUserByUserName 通过用户登录账号查询用户 -func (r *RepoSysUser) SelectUserByUserName(userName string) sysUserModel.SysUser { - querySql := r.selectSql + " where u.name = ?" - results, err := datasource.RawDB("", querySql, []any{userName}) - if err != nil { - log.Errorf("query err => %v", err) - return sysUserModel.SysUser{} - } - // 转换实体 - rows := r.convertResultRows(results) - if len(rows) > 0 { - return rows[0] - } - return sysUserModel.SysUser{} -} - -// InsertUser 新增用户信息 -func (r *RepoSysUser) InsertUser(sysUser sysUserModel.SysUser) string { - // 参数拼接 - params := make(map[string]any) - if sysUser.AccountId != "" { - params["account_id"] = sysUser.AccountId - } - if sysUser.Name != "" { - params["name"] = sysUser.Name - } - if sysUser.Sn != "" { - params["sn"] = sysUser.Sn - } else { - params["sn"] = "" - } - if sysUser.RealName != "" { - params["real_name"] = sysUser.RealName - } else { - params["real_name"] = "" - } - if sysUser.Gender != "" { - params["gender"] = sysUser.Gender - } - if sysUser.Email != "" { - params["email"] = sysUser.Email - } else { - params["email"] = "" - } - if sysUser.Phone != "" { - params["phone"] = sysUser.Phone - } else { - params["phone"] = "" - } - if sysUser.Unit != "" { - params["unit"] = sysUser.Unit - } else { - params["unit"] = "" - } - - if sysUser.Organize != "" { - params["organize"] = sysUser.Organize - } - if sysUser.Password != "" { - password := crypto.BcryptHash(sysUser.Password) - params["password"] = password - } - if sysUser.Status != "" { - params["status"] = sysUser.Status - } - if sysUser.PasswordExpiration != "" { - params["password_expiration"] = sysUser.PasswordExpiration - } - if sysUser.UserExpiration != "" { - params["user_expiration"] = sysUser.UserExpiration - } - if sysUser.GroupName != "" { - params["group_name"] = sysUser.GroupName - } - params["create_time"] = time.Now() - - // 构建执行语句 - keys, placeholder, values := datasource.KeyPlaceholderValueByInsert(params) - sql := "insert into user (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" - - // 执行插入 - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - insertId, err := results.LastInsertId() - if err != nil { - log.Errorf("insert row : %v", err.Error()) - return "" - } - return fmt.Sprint(insertId) -} - -// UpdateUser 修改用户信息 -func (r *RepoSysUser) UpdateUser(sysUser sysUserModel.SysUser) int64 { - // 参数拼接 - params := make(map[string]any) - if sysUser.Name != "" { - params["name"] = sysUser.Name - } - if sysUser.Sn != "" { - params["sn"] = sysUser.Sn - } else { - params["sn"] = "" - } - if sysUser.RealName != "" { - params["real_name"] = sysUser.RealName - } else { - params["real_name"] = "" - } - if sysUser.Gender != "" { - params["gender"] = sysUser.Gender - } - if sysUser.Email != "" { - params["email"] = sysUser.Email - } else { - params["email"] = "" - } - if sysUser.Phone != "" { - params["phone"] = sysUser.Phone - } else { - params["phone"] = "" - } - if sysUser.Unit != "" { - params["unit"] = sysUser.Unit - } else { - params["unit"] = "" - } - - if sysUser.Organize != "" { - params["organize"] = sysUser.Organize - } - if sysUser.Password != "" { - password := crypto.BcryptHash(sysUser.Password) - params["password"] = password - } - if sysUser.Status != "" { - params["status"] = sysUser.Status - } - if sysUser.PasswordExpiration != "" { - params["password_expiration"] = sysUser.PasswordExpiration - } - if sysUser.UserExpiration != "" { - params["user_expiration"] = sysUser.UserExpiration - } - if sysUser.GroupName != "" { - params["group_name"] = sysUser.GroupName - } - params["update_time"] = time.Now() - - // 构建执行语句 - keys, values := datasource.KeyValueByUpdate(params) - sql := "update user set " + strings.Join(keys, ",") + " where id = ?" - - // 执行更新 - values = append(values, sysUser.Id) - results, err := datasource.ExecDB("", sql, values) - if err != nil { - log.Errorf("update row : %v", err.Error()) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("update err => %v", err) - return 0 - } - return affected -} - -// DeleteUserByIds 批量删除用户信息 -func (r *RepoSysUser) DeleteUserByIds(userIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(userIds)) - sql := "delete from user where id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(userIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// CheckUniqueUser 校验用户信息是否唯一 -func (r *RepoSysUser) CheckUniqueUser(sysUser sysUserModel.SysUser) string { - // 查询条件拼接 - var conditions []string - var params []any - if sysUser.Name != "" { - conditions = append(conditions, "name = ?") - params = append(params, sysUser.Name) - } - if sysUser.AccountId != "" { - conditions = append(conditions, "account_id = ?") - params = append(params, sysUser.AccountId) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select id as 'str' from user " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err %v", err) - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} diff --git a/features/sys_user/service/service_sys_user.go b/features/sys_user/service/service_sys_user.go deleted file mode 100644 index e5021fc7..00000000 --- a/features/sys_user/service/service_sys_user.go +++ /dev/null @@ -1,150 +0,0 @@ -package service - -import ( - "errors" - "fmt" - - sysUserModel "be.ems/features/sys_user/model" - sysuserrole "be.ems/features/sys_user_role" -) - -// 实例化服务层 ServiceSysUser 结构体 -var NewServiceSysUser = &ServiceSysUser{ - sysUserRepository: NewRepoSysUser, - sysUserRoleRepository: sysuserrole.NewRepoSysUserRole, -} - -// ServiceSysUser 用户 服务层处理 -type ServiceSysUser struct { - // 用户服务 - sysUserRepository *RepoSysUser - // 用户与角色服务 - sysUserRoleRepository *sysuserrole.RepoSysUserRole -} - -// SelectUserPage 根据条件分页查询用户列表 -func (r *ServiceSysUser) SelectUserPage(query map[string]any) map[string]any { - return r.sysUserRepository.SelectUserPage(query) -} - -// SelectUserList 根据条件查询用户列表 -func (r *ServiceSysUser) SelectUserList(sysUser sysUserModel.SysUser) []sysUserModel.SysUser { - return []sysUserModel.SysUser{} -} - -// SelectAllocatedPage 根据条件分页查询分配用户角色列表 -func (r *ServiceSysUser) SelectAllocatedPage(query map[string]any) map[string]any { - return r.sysUserRepository.SelectAllocatedPage(query) -} - -// SelectUserByUserName 通过用户名查询用户 -func (r *ServiceSysUser) SelectUserByUserName(userName string) sysUserModel.SysUser { - return r.sysUserRepository.SelectUserByUserName(userName) -} - -// SelectUserById 通过用户ID查询用户 -func (r *ServiceSysUser) SelectUserById(userId string) sysUserModel.SysUser { - if userId == "" { - return sysUserModel.SysUser{} - } - users := r.sysUserRepository.SelectUserByIds([]string{userId}) - if len(users) > 0 { - return users[0] - } - return sysUserModel.SysUser{} -} - -// InsertUser 新增用户信息 -func (r *ServiceSysUser) InsertUser(sysUser sysUserModel.SysUser) string { - // 新增用户信息 - insertId := r.sysUserRepository.InsertUser(sysUser) - if insertId != "" { - // 新增用户角色信息 - r.insertUserRole(insertId, sysUser.RoleIDs) - } - return insertId -} - -// insertUserRole 新增用户角色信息 -func (r *ServiceSysUser) insertUserRole(userId string, roleIds []string) int64 { - if userId == "" || len(roleIds) <= 0 { - return 0 - } - - sysUserRoles := []sysuserrole.SysUserRole{} - for _, roleId := range roleIds { - // 管理员角色禁止操作,只能通过配置指定用户ID分配 - if roleId == "" || roleId == "1" { - continue - } - sysUserRoles = append(sysUserRoles, sysuserrole.NewSysUserRole(userId, roleId)) - } - - return r.sysUserRoleRepository.BatchUserRole(sysUserRoles) -} - -// UpdateUser 修改用户信息 -func (r *ServiceSysUser) UpdateUser(sysUser sysUserModel.SysUser) int64 { - return r.sysUserRepository.UpdateUser(sysUser) -} - -// UpdateUserAndRolePost 修改用户信息同时更新角色和岗位 -func (r *ServiceSysUser) UpdateUserAndRolePost(sysUser sysUserModel.SysUser) int64 { - userId := fmt.Sprint(sysUser.Id) - // 删除用户与角色关联 - r.sysUserRoleRepository.DeleteUserRole([]string{userId}) - // 新增用户角色信息 - r.insertUserRole(userId, sysUser.RoleIDs) - return r.sysUserRepository.UpdateUser(sysUser) -} - -// DeleteUserByIds 批量删除用户信息 -func (r *ServiceSysUser) DeleteUserByIds(userIds []string) (int64, error) { - // 检查是否存在 - users := r.sysUserRepository.SelectUserByIds(userIds) - if len(users) <= 0 { - return 0, errors.New("no permission to access user data") - } - if len(users) == len(userIds) { - // 删除用户与角色关联 - r.sysUserRoleRepository.DeleteUserRole(userIds) - // ... 注意其他userId进行关联的表 - // 删除用户 - rows := r.sysUserRepository.DeleteUserByIds(userIds) - return rows, nil - } - return 0, errors.New("failed to delete user information") -} - -// CheckUniqueUserName 校验用户名称是否唯一 -func (r *ServiceSysUser) CheckUniqueUserName(accountId, userId string) bool { - uniqueId := r.sysUserRepository.CheckUniqueUser(sysUserModel.SysUser{ - AccountId: accountId, - }) - if uniqueId == userId { - return true - } - return uniqueId == "" -} - -// CheckUniquePhone 校验手机号码是否唯一 -func (r *ServiceSysUser) CheckUniquePhone(phonenumber, userId string) bool { - uniqueId := r.sysUserRepository.CheckUniqueUser(sysUserModel.SysUser{ - Phone: phonenumber, - }) - if uniqueId == userId { - return true - } - return uniqueId == "" -} - -// CheckUniqueEmail 校验email是否唯一 -func (r *ServiceSysUser) CheckUniqueEmail(email, userId string) bool { - uniqueId := r.sysUserRepository.CheckUniqueUser(sysUserModel.SysUser{ - Email: email, - }) - if uniqueId == userId { - return true - } - return uniqueId == "" -} diff --git a/features/sys_user_role/model_sys_user_role.go b/features/sys_user_role/model_sys_user_role.go deleted file mode 100644 index bc493eb0..00000000 --- a/features/sys_user_role/model_sys_user_role.go +++ /dev/null @@ -1,15 +0,0 @@ -package sysuserrole - -// SysUserRole 用户和角色关联对象 sys_user_role -type SysUserRole struct { - UserID string `json:"userId"` // 用户ID - RoleID string `json:"roleId"` // 角色ID -} - -// NewSysUserRole 创建用户和角色关联对象的构造函数 -func NewSysUserRole(userID string, roleID string) SysUserRole { - return SysUserRole{ - UserID: userID, - RoleID: roleID, - } -} diff --git a/features/sys_user_role/repo_sys_user_role.go b/features/sys_user_role/repo_sys_user_role.go deleted file mode 100644 index 66a6cec7..00000000 --- a/features/sys_user_role/repo_sys_user_role.go +++ /dev/null @@ -1,87 +0,0 @@ -package sysuserrole - -import ( - "fmt" - "strings" - - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoSysUserRole 结构体 -var NewRepoSysUserRole = &RepoSysUserRole{} - -// RepoSysUserRole 用户与角色关联表 数据层处理 -type RepoSysUserRole struct{} - -// CountUserRoleByRoleId 通过角色ID查询角色使用数量 -func (r *RepoSysUserRole) CountUserRoleByRoleId(roleId string) int64 { - querySql := "select count(1) as total from sys_user_role where role_id = ?" - results, err := datasource.RawDB("", querySql, []any{roleId}) - if err != nil { - log.Errorf("query err => %v", err) - return 0 - } - if len(results) > 0 { - return parse.Number(results[0]["total"]) - } - return 0 -} - -// BatchUserRole 批量新增用户角色信息 -func (r *RepoSysUserRole) BatchUserRole(sysUserRoles []SysUserRole) int64 { - keyValues := make([]string, 0) - for _, item := range sysUserRoles { - keyValues = append(keyValues, fmt.Sprintf("(%s,%s)", item.UserID, item.RoleID)) - } - sql := "insert into sys_user_role(user_id, role_id) values " + strings.Join(keyValues, ",") - results, err := datasource.ExecDB("", sql, nil) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// DeleteUserRole 批量删除用户和角色关联 -func (r *RepoSysUserRole) DeleteUserRole(userIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(userIds)) - sql := "delete from sys_user_role where user_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(userIds) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} - -// DeleteUserRoleByRoleId 批量取消授权用户角色 -func (r *RepoSysUserRole) DeleteUserRoleByRoleId(roleId string, userIds []string) int64 { - placeholder := datasource.KeyPlaceholderByQuery(len(userIds)) - sql := "delete from sys_user_role where role_id= ? and user_id in (" + placeholder + ")" - parameters := datasource.ConvertIdsSlice(userIds) - parameters = append([]any{roleId}, parameters...) - results, err := datasource.ExecDB("", sql, parameters) - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - affected, err := results.RowsAffected() - if err != nil { - log.Errorf("delete err => %v", err) - return 0 - } - return affected -} diff --git a/features/trace/tcpdump.go b/features/trace/tcpdump.go deleted file mode 100644 index e2f8765a..00000000 --- a/features/trace/tcpdump.go +++ /dev/null @@ -1,339 +0,0 @@ -package trace - -import ( - "fmt" - "net" - "net/http" - "strings" - "time" - - "be.ems/lib/core/conf" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/vo/result" - "be.ems/lib/dborm" - "be.ems/lib/log" - "be.ems/restagent/config" - "be.ems/src/framework/utils/cmd" - "be.ems/src/framework/utils/ssh" -) - -var ( - UriTcpdumpTask = config.DefaultUriPrefix + "/traceManagement/{apiVersion}/tcpdumpNeTask" - CustomUriTcpdumpTask = config.UriPrefix + "/traceManagement/{apiVersion}/tcpdumpNeTask" // decode message api - - UriTcpdumpPcapDownload = config.DefaultUriPrefix + "/traceManagement/{apiVersion}/tcpdumpPcapDownload" - CustomUriTcpdumpPcapDownload = config.UriPrefix + "/traceManagement/{apiVersion}/tcpdumpPcapDownload" // decode message api - - UriTcpdumpNeUPFTask = config.DefaultUriPrefix + "/traceManagement/{apiVersion}/tcpdumpNeUPFTask" - CustomUriTcpdumpNeUPFTask = config.UriPrefix + "/traceManagement/{apiVersion}/tcpdumpNeUPFTask" // decode message api -) - -// NeInfo 网元信息 -func NeInfo(neType, neId string) (*dborm.NeInfo, error) { - neInfo, err := dborm.XormGetNeInfo(neType, neId) - if err != nil { - log.Error("dborm.XormGetNeInfo is failed:", err) - return nil, err - } - if neInfo == nil || neInfo.Ip == "" { - return nil, fmt.Errorf("not ne_info or not IP") - } - return neInfo, nil -} - -// TcpdumpNeTask 网元发送执行 pcap -func TcpdumpNeTask(w http.ResponseWriter, r *http.Request) { - var body struct { - NeType string `json:"neType"` // 网元类型 - NeId string `json:"neId"` // 网元ID - Timeout int `json:"timeout"` // 超时时间 - Cmd string `json:"cmd"` // 命令 - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.NeType == "" || body.NeId == "" || body.Timeout < 5 || body.Cmd == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfo(body.NeType, body.NeId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - filePcapName := fmt.Sprintf("tmp_%s_%s_%d.pcap", body.NeType, body.NeId, time.Now().UnixMilli()) - fileLogName := fmt.Sprintf("tmp_%s_%s_%d.log", body.NeType, body.NeId, time.Now().UnixMilli()) - writeLog := fmt.Sprintf(" >> %s 2>&1 \ncat %s", fileLogName, fileLogName) // 执行信息写入日志文件,放置弹出code 127 - cmdStr := fmt.Sprintf("cd /tmp \nsudo timeout %d tcpdump -i any %s -s0 -w %s", body.Timeout, body.Cmd, filePcapName) - usernameNe := conf.Get("ne.user").(string) // 网元统一用户 - sshHost := fmt.Sprintf("%s@%s", usernameNe, neInfo.Ip) - msg, err := cmd.ExecWithCheck("ssh", sshHost, cmdStr+writeLog) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": cmdStr, - "msg": msg, - "fileName": filePcapName, - })) -} - -// TcpdumpPcapDownload 网元抓包pcap文件下载 -func TcpdumpPcapDownload(w http.ResponseWriter, r *http.Request) { - var body struct { - NeType string `json:"neType"` // 网元类型 - NeId string `json:"neId"` // 网元ID - FileName string `json:"fileName"` // 文件名 - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.NeType == "" || body.NeId == "" || body.FileName == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfo(body.NeType, body.NeId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - nePath := fmt.Sprintf("/tmp/%s", body.FileName) - localPath := fmt.Sprintf("%s/tcpdump/pcap/%s", conf.Get("ne.omcdir"), body.FileName) - err = ssh.FileSCPNeToLocal(neInfo.Ip, nePath, localPath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - ctx.FileAttachment(w, r, localPath, body.FileName) -} - -// TcpdumpNeUPFTask 网元UPF发送执行 pcap -func TcpdumpNeUPFTask(w http.ResponseWriter, r *http.Request) { - var body struct { - NeType string `json:"neType"` // 网元类型 - NeId string `json:"neId"` // 网元ID - Cmd string `json:"cmd"` // 命令 - RunType string `json:"runType"` // 执行开始start还是停止stop - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.NeType != "UPF" || body.NeId == "" || body.Cmd == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfo(body.NeType, body.NeId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 开始telnet - if body.RunType == "start_telnet" { - // 创建TCP连接 - conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", neInfo.Ip, 5002)) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - defer conn.Close() - - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - cmdStr := fmt.Sprintf("pcap dispatch trace on max 100000 file %s", filePcapName) - - fmt.Fprintln(conn, cmdStr) - - // 读取内容 - time.Sleep(time.Duration(200) * time.Millisecond) - buf := make([]byte, 1024*8) - n, err := conn.Read(buf) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - str := string(buf[0:n]) - s := strings.Index(str, "pcap dispatch trace:") - if s != -1 { - e := strings.Index(str, "\r\nupfd1#") - str = str[s:e] - } else { - str = fmt.Sprintf("Executed, please stop before proceeding %d", n) - } - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": cmdStr, - "msg": str, - "fileName": filePcapName, - })) - } - conn.Close() - return - } - // 停止telnet - if body.RunType == "stop_telnet" { - // 创建TCP连接 - conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", neInfo.Ip, 5002)) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - defer conn.Close() - - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - cmdStr := "pcap dispatch trace off" - - fmt.Fprintln(conn, cmdStr) - - // 读取内容 - time.Sleep(time.Duration(200) * time.Millisecond) - buf := make([]byte, 1024*8) - n, err := conn.Read(buf) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - str := string(buf[0:n]) - s := strings.Index(str, "pcap dispatch trace:") - if s == -1 { - s = strings.Index(str, "Write ") - } - if s != -1 { - e := strings.Index(str, "\r\nupfd1#") - str = str[s:e] - } else { - str = "No stoppable found" - } - - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": cmdStr, - "msg": str, - "fileName": filePcapName, - })) - } - conn.Close() - return - } - - // 开始 -脚本 - if body.RunType == "start2" { - fileLogName := fmt.Sprintf("tmp_%s_%s.log", body.NeType, body.NeId) - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - // 复制文件到网元上 - err := ssh.FileSCPLocalToNe(neInfo.Ip, "C:\\AMP\\Probject\\ems_backend\\restagent\\backup\\upf_pcap", "/tmp") - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - writeLog := fmt.Sprintf(" >> %s 2>&1 \ncat %s", fileLogName, fileLogName) // 执行信息写入日志文件,放置弹出code 127 - cmdStr := fmt.Sprintf("cd /tmp \nchmod +x upf_pcap\n./upf_pcap '192.168.4.139' 'root' 'Admin123@pl' 'pcap dispatch trace on max 100000 file %s' %s ", fileLogName, writeLog) - - usernameNe := conf.Get("ne.user").(string) // 网元统一用户 - sshHost := fmt.Sprintf("%s@%s", usernameNe, neInfo.Ip) - msg, err := cmd.ExecWithCheck("ssh", sshHost, cmdStr) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": cmdStr, - "msg": msg, - "fileName": filePcapName, - })) - } - return - } - // 停止 -脚本 - if body.RunType == "stop2" { - fileLogName := fmt.Sprintf("tmp_%s_%s.log", body.NeType, body.NeId) - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - // cmdStr := "cd /tmp \nexpect /tmp/cat.sh " - err := ssh.FileSCPLocalToNe(neInfo.Ip, "C:\\AMP\\Probject\\ems_backend\\restagent\\backup\\upf_pcap", "/tmp") - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - writeLog := fmt.Sprintf(" >> %s 2>&1 \ncat %s", fileLogName, fileLogName) // 执行信息写入日志文件,放置弹出code 127 - cmdStr := fmt.Sprintf("cd /tmp \nchmod +x upf_pcap\n./upf_pcap '192.168.4.139' 'root' 'Admin123@pl' 'pcap dispatch trace off' %s ", writeLog) - - usernameNe := conf.Get("ne.user").(string) // 网元统一用户 - sshHost := fmt.Sprintf("%s@%s", usernameNe, neInfo.Ip) - msg, err := cmd.ExecWithCheck("ssh", sshHost, cmdStr) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": cmdStr, - "msg": msg, - "fileName": filePcapName, - })) - } - return - } - - // 开始-脚本字符串 - if body.RunType == "start_str" { - fileLogName := fmt.Sprintf("tmp_%s_%s.log", body.NeType, body.NeId) - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - scriptStr := "set capcmd [lindex $argv 0]\nspawn telnet localhost 5002\nexpect \"upfd1# \"\nsend \"$capcmd\\n\"\nexpect \"upfd1# \"\nsend \"quit\\n\"\nexpect \"eof\"" - writeLog := fmt.Sprintf(" > %s 2>&1 \ncat %s", fileLogName, fileLogName) // 执行信息写入日志文件输出,避免弹出code 127 - - capCmdStr := fmt.Sprintf("%s file %s", body.Cmd, filePcapName) - - cmdStr := fmt.Sprintf("cd /tmp\n\necho '%s' > cap.sh\n\nchmod +x cap.sh\n\nexpect ./cap.sh '%s'%s", scriptStr, capCmdStr, writeLog) - usernameNe := conf.Get("ne.user").(string) // 网元统一用户 - sshHost := fmt.Sprintf("%s@%s", usernameNe, neInfo.Ip) - msg, err := cmd.ExecWithCheck("ssh", sshHost, cmdStr) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - s := strings.Index(msg, "pcap dispatch trace:") - if s != -1 { - e := strings.Index(msg, "\r\nupfd1#") - msg = msg[s:e] - } else { - msg = "Executed, please stop before proceeding" - } - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": capCmdStr, - "msg": msg, - "fileName": filePcapName, - })) - } - return - } - // 停止-脚本字符串 - if body.RunType == "stop_str" { - fileLogName := fmt.Sprintf("tmp_%s_%s.log", body.NeType, body.NeId) - filePcapName := fmt.Sprintf("tmp_%s_%s.pcap", body.NeType, body.NeId) - scriptStr := "set capcmd [lindex $argv 0]\nspawn telnet localhost 5002\nexpect \"upfd1# \"\nsend \"$capcmd\\n\"\nexpect \"upfd1# \"\nsend \"quit\\n\"\nexpect \"eof\"" - writeLog := fmt.Sprintf(" > %s 2>&1 \ncat %s", fileLogName, fileLogName) // 执行信息写入日志文件输出,避免弹出code 127 - - capCmdStr := body.Cmd - - cmdStr := fmt.Sprintf("cd /tmp\n\necho '%s' > cap.sh\n\nchmod +x cap.sh\n\nexpect ./cap.sh '%s'%s", scriptStr, capCmdStr, writeLog) - - usernameNe := conf.Get("ne.user").(string) // 网元统一用户 - sshHost := fmt.Sprintf("%s@%s", usernameNe, neInfo.Ip) - msg, err := cmd.ExecWithCheck("ssh", sshHost, cmdStr) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - } else { - s := strings.Index(msg, "pcap dispatch trace:") - if s == -1 { - s = strings.Index(msg, "Write ") - } - if s != -1 { - e := strings.Index(msg, "\r\nupfd1#") - msg = msg[s:e] - } else { - msg = "No stoppable found" - } - ctx.JSON(w, 200, result.OkData(map[string]any{ - "cmd": capCmdStr, - "msg": msg, - "fileName": filePcapName, - })) - } - return - } - - ctx.JSON(w, 200, result.ErrMsg("runType is start or stop")) -} diff --git a/features/udm_user/api_udm_user.go b/features/udm_user/api_udm_user.go deleted file mode 100644 index 40918e45..00000000 --- a/features/udm_user/api_udm_user.go +++ /dev/null @@ -1,1211 +0,0 @@ -package udmuser - -import ( - "fmt" - "net/http" - "strconv" - "strings" - "time" - - "be.ems/features/udm_user/model" - "be.ems/features/udm_user/service" - "be.ems/lib/core/conf" - mmlclient "be.ems/lib/core/mml_client" - "be.ems/lib/core/utils/ctx" - "be.ems/lib/core/vo/result" - "be.ems/lib/dborm" - "be.ems/lib/log" - "be.ems/lib/midware" - "be.ems/lib/services" - "be.ems/restagent/config" - "be.ems/src/framework/middleware/collectlogs" - "be.ems/src/framework/utils/file" - "be.ems/src/framework/utils/ssh" -) - -// UDM 用户信息接口添加到路由 -func Routers() []services.RouterItem { - // 实例化控制层 SysDictTypeApi 结构体 - var apis = &UdmUserApi{ - authUser: *service.NewServiceUdmAuthUser, - subUser: *service.NewServiceUdmSubUser, - } - - rs := [...]services.RouterItem{ - // UDM鉴权用户 - { - Method: "GET", - Pattern: "/auths", - Handler: apis.UdmAuthUserList, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/authSave/{neId}", - Handler: apis.UdmAuthUserSave, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "GET", - Pattern: "/auth/{neId}/{imsi}", - Handler: apis.UdmAuthUserInfo, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/auth/{neId}", - Handler: apis.UdmAuthUserAdd, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "POST", - Pattern: "/auth/{neId}/{num}", - Handler: apis.UdmAuthUserAdds, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "PUT", - Pattern: "/auth/{neId}", - Handler: apis.UdmAuthUserEdit, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_UPDATE)), - }, - { - Method: "DELETE", - Pattern: "/auth/{neId}/{imsi}", - Handler: apis.UdmAuthUserRemove, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_DELETE)), - }, - { - Method: "DELETE", - Pattern: "/auth/{neId}/{imsi}/{num}", - Handler: apis.UdmAuthUserRemoves, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_DELETE)), - }, - { - Method: "POST", - Pattern: "/authExport", - Handler: apis.UdmAuthUserExport, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_EXPORT)), - }, - { - Method: "POST", - Pattern: "/authImport/{neId}", - Handler: apis.UdmAuthUserImport, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Authentication User", collectlogs.BUSINESS_TYPE_IMPORT)), - }, - // UDM签约用户 - { - Method: "GET", - Pattern: "/subs", - Handler: apis.UdmSubUserList, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/subSave/{neId}", - Handler: apis.UdmSubUserSave, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "GET", - Pattern: "/subInfo/{neId}/{imsi}", - Handler: apis.UdmSubUserInfo, - Middleware: midware.Authorize(nil), - }, - { - Method: "POST", - Pattern: "/sub/{neId}", - Handler: apis.UdmSubUserAdd, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "POST", - Pattern: "/sub/{neId}/{num}", - Handler: apis.UdmSubUserAdds, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_INSERT)), - }, - { - Method: "PUT", - Pattern: "/sub/{neId}", - Handler: apis.UdmSubUserEdit, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_UPDATE)), - }, - { - Method: "PUT", - Pattern: "/sub4gIP/{neId}", - Handler: apis.UdmSubUser4GIP, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_UPDATE)), - }, - { - Method: "PUT", - Pattern: "/subSmData/{neId}", - Handler: apis.UdmSubUserSmData, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_UPDATE)), - }, - { - Method: "DELETE", - Pattern: "/sub/{neId}/{imsi}", - Handler: apis.UdmSubUserRemove, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_DELETE)), - }, - { - Method: "DELETE", - Pattern: "/sub/{neId}/{imsi}/{num}", - Handler: apis.UdmSubUserRemoves, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_DELETE)), - }, - { - Method: "POST", - Pattern: "/subExport", - Handler: apis.UdmSubUserExport, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_EXPORT)), - }, - { - Method: "POST", - Pattern: "/subImport/{neId}", - Handler: apis.UdmSubUserImport, - Middleware: midware.LogOperate(collectlogs.OptionNew("UDM Contracted User", collectlogs.BUSINESS_TYPE_IMPORT)), - }, - // 添加更多的 Router 对象... - } - - // 生成两组前缀路由 - rsPrefix := []services.RouterItem{} - for _, v := range rs { - path := "/udmUserManage/{apiVersion}" + v.Pattern - // 固定前缀 - v.Pattern = config.DefaultUriPrefix + path - rsPrefix = append(rsPrefix, v) - // 可配置 - v.Pattern = config.UriPrefix + path - rsPrefix = append(rsPrefix, v) - } - return rsPrefix -} - -// NeInfoByUDM 网元信息 -func NeInfoByUDM(neId string) (*dborm.NeInfo, error) { - neInfo, err := dborm.XormGetNeInfo("UDM", neId) - if err != nil { - log.Error("dborm.XormGetNeInfo is failed:", err) - return nil, err - } - if neInfo == nil || neInfo.Ip == "" { - return nil, fmt.Errorf("not ne_info or not IP") - } - return neInfo, nil -} - -// UDM 用户 -// -// PATH /udmUserManage -type UdmUserApi struct { - authUser service.ServiceUdmAuthUser - subUser service.ServiceUdmSubUser -} - -// UDM鉴权用户 -// -// GET /auths -func (s *UdmUserApi) UdmAuthUserList(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - querys["neId"] = "" - data := s.authUser.Page(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// UDM鉴权用户-获取全部保存数据库 -// -// POST /authSave/{neId} -func (s *UdmUserApi) UdmAuthUserSave(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neId = "" - data := s.authUser.Save(neId) - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-信息 -// -// GET /authInfo/{neId}/{imsi} -func (s *UdmUserApi) UdmAuthUserInfo(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - if neId == "" || imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("dsp authdat:imsi=%s", imsi) - - // 发送MML - data, err := mmlclient.MMLSendMsgToMap(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 查询数据库是否存在并存入 - neId = "" - var userInfo model.UdmAuthUser - list := s.authUser.List(model.UdmAuthUser{NeID: neId, Imsi: imsi}) - if len(list) > 0 { - userInfo = list[0] - // 返回查询的用户信息 - userInfo.Amf = data["amf"] - userInfo.AlgoIndex = data["algo"] - userInfo.Opc = data["opc"] - userInfo.Ki = data["ki"] - } else { - userInfo := model.UdmAuthUser{ - Imsi: imsi, - Amf: data["amf"], - AlgoIndex: data["algo"], - Opc: data["opc"], - Ki: data["ki"], - } - s.authUser.Insert(neId, userInfo) - } - ctx.JSON(w, 200, result.OkData(userInfo)) - -} - -// UDM鉴权用户-增加 -// -// POST /{neId} -func (s *UdmUserApi) UdmAuthUserAdd(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmAuthUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("add authdat:imsi=%s,ki=%s,amf=%s,algo=%s,opc=%s", body.Imsi, body.Ki, body.Amf, body.AlgoIndex, body.Opc) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.authUser.Insert(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-批量添加 -// -// POST /{neId}/{num} -func (s *UdmUserApi) UdmAuthUserAdds(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - num := ctx.Param(r, "num") - if neId == "" || num == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmAuthUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bad authdat:start_imsi=%s,sub_num=%s,ki=%s,amf=%s,algo=%s,opc=%s", body.Imsi, num, body.Ki, body.Amf, body.AlgoIndex, body.Opc) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.authUser.Inserts(neId, body, num) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-修改 -// -// PUT /{neId} -func (s *UdmUserApi) UdmAuthUserEdit(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmAuthUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("mod authdata:imsi=%s", body.Imsi) - // 修改的参数名称 - if body.Ki != "" { - msg += fmt.Sprintf(",ki=%s", body.Ki) - } - if body.Amf != "" { - msg += fmt.Sprintf(",amf=%s", body.Amf) - } - if body.AlgoIndex != "" { - msg += fmt.Sprintf(",algo=%s", body.AlgoIndex) - } - if body.Opc != "" { - msg += fmt.Sprintf(",opc=%s", body.Opc) - } - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.authUser.Update(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-删除 -// -// DELETE /{neId}/{imsi} -func (s *UdmUserApi) UdmAuthUserRemove(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - if neId == "" || imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("del authdat:imsi=%s", imsi) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.authUser.Delete(neId, imsi) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-批量删除 -// -// DELETE /{neId}/{imsi}/{num} -func (s *UdmUserApi) UdmAuthUserRemoves(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - num := ctx.Param(r, "num") - if neId == "" || imsi == "" || num == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bde authdat:start_imsi=%s,sub_num=%s", imsi, num) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.authUser.Deletes(neId, imsi, num) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM鉴权用户-导出 -// -// POST /authExport -func (s *UdmUserApi) UdmAuthUserExport(w http.ResponseWriter, r *http.Request) { - var body struct { - NeId string `json:"neId"` - Type string `json:"type"` - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.NeId == "" || body.Type == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - if !(body.Type == "csv" || body.Type == "txt") { - ctx.JSON(w, 200, result.ErrMsg("Export file types support CSV and txt")) - return - } - - neId := "" - list := s.authUser.List(model.UdmAuthUser{NeID: neId}) - // 文件名 - fileName := fmt.Sprintf("OMC_AUTH_USER_EXPORT_%s_%d.%s", neId, time.Now().UnixMilli(), body.Type) - filePath := fmt.Sprintf("%s/upload/mml/%s", conf.Get("ne.omcdir"), fileName) - - if body.Type == "csv" { - // 转换数据 - data := [][]string{} - data = append(data, []string{"imsi", "ki", "algo", "amf", "opc"}) - for _, v := range list { - data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc}) - } - // 输出到文件 - err := file.WriterFileCSV(data, filePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - } - - if body.Type == "txt" { - // 转换数据 - data := [][]string{} - for _, v := range list { - data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc}) - } - // 输出到文件 - err = file.WriterFileTXT(data, ",", filePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - } - - ctx.FileAttachment(w, r, filePath, fileName) -} - -// UDM鉴权用户-导入 -// -// POST /authImport/{neId} -func (s *UdmUserApi) UdmAuthUserImport(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 获取文件名 - _, fileHeader, err := r.FormFile("file") - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - if !(strings.HasSuffix(fileHeader.Filename, ".csv") || strings.HasSuffix(fileHeader.Filename, ".txt")) { - ctx.JSON(w, 200, result.ErrMsg("Please upload files in. csv and. txt formats with content fields: imsi,ki,algo,amf,opc")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 文件名 - fileName := fmt.Sprintf("OMC_AUTH_USER_IMPORT_%s_%d_%s", neId, time.Now().UnixMilli(), fileHeader.Filename) - localPath := fmt.Sprintf("%s/upload/mml/%s", conf.Get("ne.omcdir"), fileName) - nePath := conf.Get("mml.upload").(string) - // 输出保存文件 - err = ctx.SaveUploadedFile(r, localPath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 复制到远程 - err = ssh.FileSCPLocalToNe(neInfo.Ip, localPath, nePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("import authdat:path=%s", fmt.Sprintf("%s/%s", nePath, fileName)) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - if strings.HasSuffix(fileHeader.Filename, ".csv") { - data := file.ReadFileCSV(localPath) - neId = "" - go s.authUser.InsertCSV(neId, data) - } - if strings.HasSuffix(fileHeader.Filename, ".txt") { - data := file.ReadFileTXT(",", localPath) - neId = "" - go s.authUser.InsertTxt(neId, data) - } - } - ctx.JSON(w, 200, result.OkMsg(data)) -} - -// UDM签约用户 -// -// GET /subs -func (s *UdmUserApi) UdmSubUserList(w http.ResponseWriter, r *http.Request) { - querys := ctx.QueryMap(r) - querys["neId"] = "" - data := s.subUser.Page(querys) - ctx.JSON(w, 200, result.Ok(data)) -} - -// UDM签约用户-获取全部保存数据库 -// -// POST /subSave/{neId} -func (s *UdmUserApi) UdmSubUserSave(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neId = "" - data := s.subUser.Save(neId) - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-信息 -// -// GET /subInfo/{neId}/{imsi} -func (s *UdmUserApi) UdmSubUserInfo(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - if neId == "" || imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("dsp udmuser:imsi=%s", imsi) - - // 发送MML - data, err := mmlclient.MMLSendMsgToMap(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 解析返回的数据 - cnType, _ := strconv.ParseInt(data["CNType"][:4], 0, 64) - rat, _ := strconv.ParseInt(data["RAT"][:4], 0, 64) - msisdn := data["MSISDN"] - imsMsisdnLen := strings.Index(msisdn, ",") - if imsMsisdnLen != -1 { - msisdn = msisdn[:imsMsisdnLen] - } - userInfo := model.UdmSubUser{ - Imsi: imsi, - Msisdn: msisdn, - Ambr: data["AMBR"], - Arfb: data["AreaForbidden"], - Cn: fmt.Sprint(cnType), - SmData: data["SM-Data(snssai+dnn[1..n])"], - Sar: data["ServiceAreaRestriction"], - Nssai: data["NSSAI"], - SmfSel: data["Smf-Selection"], - Rat: fmt.Sprint(rat), - } - // 1,64,24,65,def_eps,1,2,010200000000,- - if v, ok := data["EPS-Data"]; ok { - userInfo.EpsDat = v - arr := strings.Split(v, ",") - userInfo.EpsFlag = arr[0] - userInfo.EpsOdb = arr[1] - userInfo.HplmnOdb = arr[2] - userInfo.Ard = arr[3] - userInfo.Epstpl = arr[4] - userInfo.ContextId = arr[5] - userInfo.ApnContext = arr[7] - userInfo.StaticIp = arr[8] - } - - // 查询数据库是否存在并存入更新 - neId = "" - list := s.subUser.List(model.UdmSubUser{NeID: neId, Imsi: imsi}) - if len(list) > 0 { - listItme := list[0] - userInfo.ID = listItme.ID - s.subUser.Update(neId, userInfo) - } else { - s.subUser.Insert(neId, userInfo) - } - ctx.JSON(w, 200, result.OkData(userInfo)) -} - -// UDM签约用户-增加 -// -// POST /{neId} -func (s *UdmUserApi) UdmSubUserAdd(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("add udmuser:imsi=%s,msisdn=%s,ambr=%s,nssai=%s,arfb=%s,sar=%s,rat=%s,cn=%s,smf_sel=%s,sm_data=%s,eps_flag=%s,eps_odb=%s,hplmn_odb=%s,ard=%s,epstpl=%s,context_id=%s,apn_context=%s", - body.Imsi, body.Msisdn, body.Ambr, body.Nssai, body.Arfb, body.Sar, body.Rat, body.Cn, body.SmfSel, body.SmData, body.EpsFlag, body.EpsOdb, body.HplmnOdb, body.Ard, body.Epstpl, body.ContextId, body.ApnContext) - // static_ip指给4G UE分配的静态IP,没有可不带此字段名,批量添加IP会自动递增 - if body.StaticIp != "" { - msg += fmt.Sprintf(",static_ip=%s", body.StaticIp) - } - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Insert(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-批量添加 -// -// POST /{neId}/{num} -func (s *UdmUserApi) UdmSubUserAdds(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - num := ctx.Param(r, "num") - if neId == "" || num == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bad udmuser:start_imsi=%s,start_msisdn=%s,sub_num=%s,ambr=%s,nssai=%s,arfb=%s,sar=%s,rat=%s,cn=%s,smf_sel=%s,sm_data=%s,eps_flag=%s,eps_odb=%s,hplmn_odb=%s,ard=%s,epstpl=%s,context_id=%s,apn_context=%s", - body.Imsi, body.Msisdn, num, body.Ambr, body.Nssai, body.Arfb, body.Sar, body.Rat, body.Cn, body.SmfSel, body.SmData, body.EpsFlag, body.EpsOdb, body.HplmnOdb, body.Ard, body.Epstpl, body.ContextId, body.ApnContext) - // static_ip指给4G UE分配的静态IP,没有可不带此字段名,批量添加IP会自动递增 - if body.StaticIp != "" { - msg += fmt.Sprintf(",static_ip=%s", body.StaticIp) - } - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Inserts(neId, body, num) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-批量添加4G用户 -// -// POST /sub4G/{neId} -func (s *UdmUserApi) UdmSubUserAdd4G(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" || body.SubNum == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bmd udmuser:start_imsi=%s,sub_num=%s,eps_flag=%s", body.Imsi, body.SubNum, body.EpsFlag) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Insert4G(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-修改 -// -// PUT /{neId} -func (s *UdmUserApi) UdmSubUserEdit(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("mod udmuser:imsi=%s", body.Imsi) - // 修改的参数名称 - if body.Msisdn != "" { - msg += fmt.Sprintf(",msisdn=%s", body.Msisdn) - } - if body.Ambr != "" { - msg += fmt.Sprintf(",ambr=%s", body.Ambr) - } - if body.Nssai != "" { - msg += fmt.Sprintf(",nssai=%s", body.Nssai) - } - if body.Arfb != "" { - msg += fmt.Sprintf(",arfb=%s", body.Arfb) - } - if body.Sar != "" { - msg += fmt.Sprintf(",sar=%s", body.Sar) - } - if body.Rat != "" { - msg += fmt.Sprintf(",rat=%s", body.Rat) - } - if body.Cn != "" { - msg += fmt.Sprintf(",cn=%s", body.Cn) - } - if body.SmfSel != "" { - msg += fmt.Sprintf(",smf_sel=%s", body.SmfSel) - } - if body.SmData != "" { - msg += fmt.Sprintf(",sm_data=%s", body.SmData) - } - if body.EpsDat != "" { - msg += fmt.Sprintf(",eps_dat=%s", body.EpsDat) - } - if body.EpsFlag != "" { - msg += fmt.Sprintf(",eps_flag=%s", body.EpsFlag) - } - if body.EpsOdb != "" { - msg += fmt.Sprintf(",eps_odb=%s", body.EpsOdb) - } - if body.HplmnOdb != "" { - msg += fmt.Sprintf(",hplmn_odb=%s", body.HplmnOdb) - } - if body.Epstpl != "" { - msg += fmt.Sprintf(",epstpl=%s", body.Epstpl) - } - if body.Ard != "" { - msg += fmt.Sprintf(",ard=%s", body.Ard) - } - if body.ContextId != "" { - msg += fmt.Sprintf(",context_id=%s", body.ContextId) - } - if body.ApnContext != "" { - msg += fmt.Sprintf(",apn_context=%s", body.ApnContext) - } - if body.StaticIp != "" { - msg += fmt.Sprintf(",static_ip=%s", body.StaticIp) - } - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Update(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-批量修改4G IP -// -// PUT /sub4gIP/{neId} -func (s *UdmUserApi) UdmSubUser4GIP(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" || body.SubNum == "" || body.StaticIp == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bmd udmuser:start_imsi=%s,sub_num=%s,static_ip=%s", body.Imsi, body.SubNum, body.StaticIp) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Update4GIP(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-批量修改sm-data -// -// PUT /subSmData/{neId} -func (s *UdmUserApi) UdmSubUserSmData(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - var body model.UdmSubUser - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.Imsi == "" || body.SubNum == "" || body.SmData == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 3-000003&internet-10.10.1.1&ims-10.11.1.1 - msg := fmt.Sprintf("bmd udmuser:start_imsi=%s,sub_num=%s,sm_data=%s", body.Imsi, body.SubNum, body.SmData) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.UpdateSmData(neId, body) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-删除 -// -// DELETE /{neId}/{imsi} -func (s *UdmUserApi) UdmSubUserRemove(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - if neId == "" || imsi == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("del udmuser:imsi=%s", imsi) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Delete(neId, imsi) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-批量删除 -// -// DELETE /{neId}/{imsi}/{num} -func (s *UdmUserApi) UdmSubUserRemoves(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - imsi := ctx.Param(r, "imsi") - num := ctx.Param(r, "num") - if neId == "" || imsi == "" || num == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("bde udmuser:start_imsi=%s,sub_num=%s", imsi, num) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 命令ok时 - if strings.Contains(data, "ok") { - neId = "" - s.subUser.Deletes(neId, imsi, num) - } - ctx.JSON(w, 200, result.OkData(data)) -} - -// UDM签约用户-导出 -// -// POST /subExport -func (s *UdmUserApi) UdmSubUserExport(w http.ResponseWriter, r *http.Request) { - var body struct { - NeId string `json:"neId"` - Type string `json:"type"` - } - err := ctx.ShouldBindJSON(r, &body) - if err != nil || body.NeId == "" || body.Type == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - if !(body.Type == "csv" || body.Type == "txt") { - ctx.JSON(w, 200, result.ErrMsg("Export file type support csv、txt")) - return - } - - neId := "" - list := s.subUser.List(model.UdmSubUser{NeID: neId}) - // 文件名 - fileName := fmt.Sprintf("OMC_AUTH_USER_EXPORT_%s_%d.%s", neId, time.Now().UnixMilli(), body.Type) - filePath := fmt.Sprintf("%s/upload/mml/%s", conf.Get("ne.omcdir"), fileName) - - if body.Type == "csv" { - // 转换数据 - data := [][]string{} - data = append(data, []string{"imsi", "msisdn", "ambr", "nssai", "arfb", "sar", "rat", "cn", "smf_sel", "sm_dat", "eps_dat"}) - for _, v := range list { - epsDat := fmt.Sprintf("%s,%s,%s,%s,%s,%s,%s,%s", v.EpsFlag, v.EpsOdb, v.HplmnOdb, v.Ard, v.Epstpl, v.ContextId, v.ApnContext, v.StaticIp) - data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat}) - } - // 输出到文件 - err = file.WriterFileCSV(data, filePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - } - - if body.Type == "txt" { - // 转换数据 - data := [][]string{} - for _, v := range list { - epsDat := fmt.Sprintf("%s,%s,%s,%s,%s,%s,%s,%s", v.EpsFlag, v.EpsOdb, v.HplmnOdb, v.Ard, v.Epstpl, v.ContextId, v.ApnContext, v.StaticIp) - data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat}) - } - // 输出到文件 - err = file.WriterFileTXT(data, ",", filePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - } - - ctx.FileAttachment(w, r, filePath, fileName) -} - -// UDM签约用户-导入 -// -// POST /subImport/{neId} -func (s *UdmUserApi) UdmSubUserImport(w http.ResponseWriter, r *http.Request) { - neId := ctx.Param(r, "neId") - if neId == "" { - ctx.JSON(w, 400, result.CodeMsg(400, "parameter error")) - return - } - - // 获取文件名 - _, fileHeader, err := r.FormFile("file") - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - if !(strings.HasSuffix(fileHeader.Filename, ".csv") || strings.HasSuffix(fileHeader.Filename, ".txt")) { - ctx.JSON(w, 200, result.ErrMsg("Please upload files in. csv and. txt formats with content fields: imsi,msisdn,ambr,nssai,arfb,sar,rat,cn,smf_sel,sm_dat,eps_dat")) - return - } - - neInfo, err := NeInfoByUDM(neId) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 文件名 - fileName := fmt.Sprintf("OMC_SUB_USER_IMPORT_%s_%d_%s", neId, time.Now().UnixMilli(), fileHeader.Filename) - localPath := fmt.Sprintf("%s/upload/mml/%s", conf.Get("ne.omcdir"), fileName) - nePath := conf.Get("mml.upload").(string) - // 输出保存文件 - err = ctx.SaveUploadedFile(r, localPath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - // 复制到远程 - err = ssh.FileSCPLocalToNe(neInfo.Ip, localPath, nePath) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - - msg := fmt.Sprintf("import udmuser:path=%s", fmt.Sprintf("%s/%s", nePath, fileName)) - - // 发送MML - data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg) - if err != nil { - ctx.JSON(w, 200, result.ErrMsg(err.Error())) - return - } - // 命令ok时 - if strings.Contains(data, "ok") { - if strings.HasSuffix(fileHeader.Filename, ".csv") { - data := file.ReadFileCSV(localPath) - neId = "" - go s.subUser.InsertCSV(neId, data) - } - if strings.HasSuffix(fileHeader.Filename, ".txt") { - data := file.ReadFileTXT(",", localPath) - neId = "" - go s.subUser.InsertTxt(neId, data) - } - } - ctx.JSON(w, 200, result.OkMsg(data)) -} diff --git a/features/udm_user/model/udm_auth_user.go b/features/udm_user/model/udm_auth_user.go deleted file mode 100644 index 520d3463..00000000 --- a/features/udm_user/model/udm_auth_user.go +++ /dev/null @@ -1,13 +0,0 @@ -package model - -// UdmAuthUser UDM鉴权用户 -type UdmAuthUser struct { - ID string `json:"id" xorm:"pk 'id' autoincr"` - Imsi string `json:"imsi" xorm:"imsi"` // SIM卡号 - Amf string `json:"amf" xorm:"amf"` // ANF - Status string `json:"status" xorm:"status"` // 状态 - Ki string `json:"ki" xorm:"ki"` // ki - AlgoIndex string `json:"algoIndex" xorm:"algo_index"` // - Opc string `json:"opc" xorm:"opc"` - NeID string `json:"neId" xorm:"ne_id"` // UDM网元标识-子系统 -} diff --git a/features/udm_user/model/udm_sub_user.go b/features/udm_user/model/udm_sub_user.go deleted file mode 100644 index 466fce1c..00000000 --- a/features/udm_user/model/udm_sub_user.go +++ /dev/null @@ -1,29 +0,0 @@ -package model - -// UdmSubUser UDM签约用户 -type UdmSubUser struct { - ID string `json:"id" xorm:"pk 'id' autoincr"` - Msisdn string `json:"msisdn" xorm:"msisdn"` // 相当手机号 - Imsi string `json:"imsi" xorm:"imsi"` // SIM卡号 - Ambr string `json:"ambr" xorm:"ambr"` - Nssai string `json:"nssai" xorm:"nssai"` - Rat string `json:"rat" xorm:"rat"` - Arfb string `json:"arfb" xorm:"arfb"` - Sar string `json:"sar" xorm:"sar"` - Cn string `json:"cn" xorm:"cn"` - SmData string `json:"smData" xorm:"sm_data"` - SmfSel string `json:"smfSel" xorm:"smf_sel"` - EpsDat string `json:"epsDat" xorm:"eps_dat"` - NeID string `json:"neId" xorm:"ne_id"` // UDM网元标识-子系统 - - EpsFlag string `json:"epsFlag" xorm:"eps_flag"` - EpsOdb string `json:"epsOdb" xorm:"eps_odb"` - HplmnOdb string `json:"hplmnOdb" xorm:"hplmn_odb"` - Ard string `json:"ard" xorm:"ard"` - Epstpl string `json:"epstpl" xorm:"epstpl"` - ContextId string `json:"contextId" xorm:"context_id"` - ApnContext string `json:"apnContext" xorm:"apn_context"` - StaticIp string `json:"staticIp" xorm:"static_ip"` - - SubNum string `json:"subNum,omitempty" xorm:"-"` // 批量数 -} diff --git a/features/udm_user/repo/repo_udm_auth_user.go b/features/udm_user/repo/repo_udm_auth_user.go deleted file mode 100644 index 9c388774..00000000 --- a/features/udm_user/repo/repo_udm_auth_user.go +++ /dev/null @@ -1,276 +0,0 @@ -package repo - -import ( - "strconv" - "strings" - - "be.ems/features/udm_user/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoUdmAuthUser 结构体 -var NewRepoUdmAuthUser = &RepoUdmAuthUser{ - selectSql: `select - id, imsi, amf, status, ki, algo_index, opc, ne_id - from u_auth_user`, - - resultMap: map[string]string{ - "id": "ID", - "imsi": "Imsi", - "amf": "Amf", - "status": "Status", - "ki": "Ki", - "algo_index": "AlgoIndex", - "opc": "Opc", - "ne_id": "NeID", - }, -} - -// RepoUdmAuthUser UDM鉴权用户 数据层处理 -type RepoUdmAuthUser struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoUdmAuthUser) convertResultRows(rows []map[string]any) []model.UdmAuthUser { - arr := make([]model.UdmAuthUser, 0) - for _, row := range rows { - UdmUser := model.UdmAuthUser{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&UdmUser, keyMapper, value) - } - } - arr = append(arr, UdmUser) - } - return arr -} - -// SelectPage 根据条件分页查询 -func (r *RepoUdmAuthUser) SelectPage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["imsi"]; ok && v != "" { - conditions = append(conditions, "imsi like concat(concat('%', ?), '%')") - params = append(params, v) - } - if v, ok := query["neId"]; ok && v != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, v) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - result := map[string]any{ - "total": 0, - "rows": []model.UdmAuthUser{}, - } - - // 查询数量 长度为0直接返回 - totalSql := "select count(1) as 'total' from u_auth_user" - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - return result - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return result - } else { - result["total"] = total - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 排序 - sortSql := "" - if v, ok := query["sortField"]; ok && v != "" { - if v == "imsi" { - sortSql += " order by imsi " - } - if o, ok := query["sortOrder"]; ok && o != nil && v != "" { - if o == "desc" { - sortSql += " desc " - } else { - sortSql += " asc " - } - } - } - - // 查询数据 - querySql := r.selectSql + whereSql + sortSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - result["rows"] = r.convertResultRows(results) - return result -} - -// SelectList 根据实体查询 -func (r *RepoUdmAuthUser) SelectList(auth model.UdmAuthUser) []model.UdmAuthUser { - // 查询条件拼接 - var conditions []string - var params []any - if auth.Imsi != "" { - conditions = append(conditions, "imsi = ?") - params = append(params, auth.Imsi) - } - if auth.NeID != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, auth.NeID) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - querySql := r.selectSql + whereSql + " order by imsi asc " - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - return r.convertResultRows(results) -} - -// ClearAndInsert 清空ne_id后新增实体 -func (r *RepoUdmAuthUser) ClearAndInsert(neID string, authArr []model.UdmAuthUser) int64 { - var num int64 = 0 - - // 清空指定ne_id - _, err := datasource.ExecDB("", "TRUNCATE TABLE u_auth_user", nil) - // _, err := datasource.ExecDB("", "DELETE FROM u_auth_user WHERE ne_id = ?", []any{neID}) - if err != nil { - log.Errorf("TRUNCATE err => %v", err) - } - - n := len(authArr) - batchSize := 2000 - for i := 0; i < n; i += batchSize { - end := i + batchSize - if end > n { - end = n - } - batch := authArr[i:end] - - // 调用 InsertMulti 函数将批量数据插入数据库 - results, err := datasource.DefaultDB().Table("u_auth_user").InsertMulti(batch) - if err != nil { - log.Errorf("InsertMulti err => %v", err) - continue - } - num += results - } - return num -} - -// Insert 新增实体 -func (r *RepoUdmAuthUser) Insert(authUser model.UdmAuthUser) int64 { - results, err := datasource.DefaultDB().Table("u_auth_user").Insert(authUser) - if err != nil { - log.Errorf("Insert err => %v", err) - return results - } - return results -} - -// Insert 批量添加 -func (r *RepoUdmAuthUser) Inserts(authUsers []model.UdmAuthUser) int64 { - var num int64 - n := len(authUsers) - batchSize := 2000 - for i := 0; i < n; i += batchSize { - end := i + batchSize - if end > n { - end = n - } - batch := authUsers[i:end] - - // 调用 InsertMulti 函数将批量数据插入数据库 - results, err := datasource.DefaultDB().Table("u_auth_user").InsertMulti(batch) - if err != nil { - log.Errorf("Insert err => %v", err) - continue - } - num += results - } - return num -} - -// Update 修改更新 -func (r *RepoUdmAuthUser) Update(neID string, authUser model.UdmAuthUser) int64 { - // 查询先 - var user model.UdmAuthUser - has, err := datasource.DefaultDB().Table("u_auth_user").Where("imsi = ? and ne_id = ?", authUser.Imsi, neID).Get(&user) - if !has || err != nil { - return 0 - } - - if authUser.Ki != "" && authUser.Ki != user.Ki { - user.Ki = authUser.Ki - } - if authUser.Amf != "" && authUser.Amf != user.Amf { - user.Amf = authUser.Amf - } - if authUser.AlgoIndex != "" && authUser.AlgoIndex != user.AlgoIndex { - user.AlgoIndex = authUser.AlgoIndex - } - if authUser.Opc != "" && authUser.Opc != user.Opc { - user.Opc = authUser.Opc - } - - results, err := datasource.DefaultDB().Table("u_auth_user").Where("imsi = ? and ne_id = ?", user.Imsi, user.NeID).Update(user) - if err != nil { - return 0 - } - return results -} - -// Delete 删除实体 -func (r *RepoUdmAuthUser) Delete(neID, imsi string) int64 { - results, err := datasource.DefaultDB().Table("u_auth_user").Where("imsi = ? and ne_id = ?", imsi, neID).Delete() - if err != nil { - return results - } - return results -} - -// Delete 删除范围实体 -func (r *RepoUdmAuthUser) Deletes(neID, imsi, num string) int64 { - imsiV, err := strconv.Atoi(imsi) - if err != nil { - return 0 - } - - numV, err := strconv.Atoi(num) - if err != nil { - return 0 - } - - results, err := datasource.DefaultDB().Table("u_auth_user").Where("imsi >= ? and imsi < ? and ne_id = ?", imsiV, imsiV+numV, neID).Delete() - if err != nil { - return results - } - return results -} diff --git a/features/udm_user/repo/repo_udm_sub_user.go b/features/udm_user/repo/repo_udm_sub_user.go deleted file mode 100644 index 03c90a5f..00000000 --- a/features/udm_user/repo/repo_udm_sub_user.go +++ /dev/null @@ -1,450 +0,0 @@ -package repo - -import ( - "fmt" - "strconv" - "strings" - - "be.ems/features/udm_user/model" - "be.ems/lib/core/datasource" - "be.ems/lib/core/utils/parse" - "be.ems/lib/log" -) - -// 实例化数据层 RepoUdmSubUser 结构体 -var NewRepoUdmSubUser = &RepoUdmSubUser{ - selectSql: `select - id, msisdn, imsi, ambr, nssai, rat, arfb, sar, cn, sm_data, smf_sel, eps_dat, ne_id, eps_flag, eps_odb, hplmn_odb, ard, epstpl, context_id, apn_context, static_ip - from u_sub_user`, - - resultMap: map[string]string{ - "id": "ID", - "msisdn": "Msisdn", - "imsi": "Imsi", - "ambr": "Ambr", - "nssai": "Nssai", - "rat": "Rat", - "arfb": "Arfb", - "sar": "Sar", - "cn": "Cn", - "sm_data": "SmData", - "smf_sel": "SmfSel", - "eps_dat": "EpsDat", - "ne_id": "NeID", - "eps_flag": "EpsFlag", - "eps_odb": "EpsOdb", - "hplmn_odb": "HplmnOdb", - "ard": "Ard", - "epstpl": "Epstpl", - "context_id": "ContextId", - "apn_context": "ApnContext", - "static_ip": "StaticIp", - }, -} - -// RepoUdmSubUser UDM签约用户 数据层处理 -type RepoUdmSubUser struct { - // 查询视图对象SQL - selectSql string - // 结果字段与实体映射 - resultMap map[string]string -} - -// convertResultRows 将结果记录转实体结果组 -func (r *RepoUdmSubUser) convertResultRows(rows []map[string]any) []model.UdmSubUser { - arr := make([]model.UdmSubUser, 0) - for _, row := range rows { - UdmUser := model.UdmSubUser{} - for key, value := range row { - if keyMapper, ok := r.resultMap[key]; ok { - datasource.SetFieldValue(&UdmUser, keyMapper, value) - } - } - arr = append(arr, UdmUser) - } - return arr -} - -// SelectPage 根据条件分页查询字典类型 -func (r *RepoUdmSubUser) SelectPage(query map[string]any) map[string]any { - // 查询条件拼接 - var conditions []string - var params []any - if v, ok := query["msisdn"]; ok && v != "" { - conditions = append(conditions, "msisdn like concat(concat('%', ?), '%')") - params = append(params, v) - } - if v, ok := query["imsi"]; ok && v != "" { - conditions = append(conditions, "imsi like concat(concat('%', ?), '%')") - params = append(params, v) - } - if v, ok := query["neId"]; ok && v != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, v) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - result := map[string]any{ - "total": 0, - "rows": []model.UdmAuthUser{}, - } - - // 查询数量 长度为0直接返回 - totalSql := "select count(1) as 'total' from u_sub_user" - totalRows, err := datasource.RawDB("", totalSql+whereSql, params) - if err != nil { - log.Errorf("total err => %v", err) - return result - } - total := parse.Number(totalRows[0]["total"]) - if total == 0 { - return result - } else { - result["total"] = total - } - - // 分页 - pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " - params = append(params, pageNum*pageSize) - params = append(params, pageSize) - - // 排序 - sortSql := "" - if v, ok := query["sortField"]; ok && v != "" { - if v == "imsi" { - sortSql += " order by imsi " - } - if v == "msisdn" { - sortSql += " order by msisdn " - } - if o, ok := query["sortOrder"]; ok && o != nil && v != "" { - if o == "desc" { - sortSql += " desc " - } else { - sortSql += " asc " - } - } - } - - // 查询数据 - querySql := r.selectSql + whereSql + sortSql + pageSql - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - return result - } - - // 转换实体 - result["rows"] = r.convertResultRows(results) - return result -} - -// SelectList 根据实体查询 -func (r *RepoUdmSubUser) SelectList(auth model.UdmSubUser) []model.UdmSubUser { - // 查询条件拼接 - var conditions []string - var params []any - if auth.Imsi != "" { - conditions = append(conditions, "imsi = ?") - params = append(params, auth.Imsi) - } - if auth.NeID != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, auth.NeID) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } - - // 查询数据 - querySql := r.selectSql + whereSql + " order by imsi asc " - results, err := datasource.RawDB("", querySql, params) - if err != nil { - log.Errorf("query err => %v", err) - } - - // 转换实体 - return r.convertResultRows(results) -} - -// ClearAndInsert 清空ne_id后新增实体 -func (r *RepoUdmSubUser) ClearAndInsert(neID string, subArr []model.UdmSubUser) int64 { - var num int64 = 0 - - // 清空指定ne_id - _, err := datasource.ExecDB("", "TRUNCATE TABLE u_sub_user", nil) - // _, err := datasource.ExecDB("", "DELETE FROM u_sub_user WHERE ne_id = ?", []any{neID}) - if err != nil { - log.Errorf("TRUNCATE err => %v", err) - } - - n := len(subArr) - batchSize := 2000 - for i := 0; i < n; i += batchSize { - end := i + batchSize - if end > n { - end = n - } - batch := subArr[i:end] - - // 调用 InsertMulti 函数将批量数据插入数据库 - results, err := datasource.DefaultDB().Table("u_sub_user").InsertMulti(batch) - if err != nil { - log.Errorf("InsertMulti err => %v", err) - continue - } - num += results - } - - // for _, u := range subArr { - // u.NeID = neID - // results, err := datasource.DefaultDB().Table("u_sub_user").Insert(u) - // if err != nil { - // return num - // } - // num += results - // } - return num -} - -// Insert 新增实体 -func (r *RepoUdmSubUser) Insert(subUser model.UdmSubUser) int64 { - results, err := datasource.DefaultDB().Table("u_sub_user").Insert(subUser) - if err != nil { - log.Errorf("Insert err => %v", err) - return results - } - return results -} - -// Insert 批量添加 -func (r *RepoUdmSubUser) Inserts(subUser []model.UdmSubUser) int64 { - var num int64 - n := len(subUser) - batchSize := 2000 - for i := 0; i < n; i += batchSize { - end := i + batchSize - if end > n { - end = n - } - batch := subUser[i:end] - - // 调用 InsertMulti 函数将批量数据插入数据库 - results, err := datasource.DefaultDB().Table("u_sub_user").InsertMulti(batch) - if err != nil { - log.Errorf("Insert err => %v", err) - continue - } - num += results - } - return num -} - -// Insert4G 批量添加4G用户 -func (r *RepoUdmSubUser) Insert4G(neID string, subUser model.UdmSubUser) int64 { - var insertNum int64 - - imsiV, err := strconv.Atoi(subUser.Imsi) - if err != nil { - return 0 - } - numV, err := strconv.Atoi(subUser.SubNum) - if err != nil { - return 0 - } - - subUser.NeID = neID - for i := 0; i < numV; i++ { - subUser.Imsi = fmt.Sprint(imsiV + i) - - results, err := datasource.DefaultDB().Table("u_sub_user").Insert(subUser) - if err == nil { - log.Errorf("Insert err => %v", err) - insertNum += results - } - } - - return insertNum -} - -// Update 修改更新 -func (r *RepoUdmSubUser) Update(neID string, authUser model.UdmSubUser) int64 { - // 查询先 - var user model.UdmSubUser - has, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", authUser.Imsi, neID).Get(&user) - if !has || err != nil { - return 0 - } - - if authUser.Msisdn != "" && authUser.Msisdn != user.Msisdn { - user.Msisdn = authUser.Msisdn - } - if authUser.Ambr != "" && authUser.Ambr != user.Ambr { - user.Ambr = authUser.Ambr - } - if authUser.Arfb != "" && authUser.Arfb != user.Arfb { - user.Arfb = authUser.Arfb - } - if authUser.Sar != "" && authUser.Sar != user.Sar { - user.Sar = authUser.Sar - } - if authUser.Rat != "" && authUser.Rat != user.Rat { - user.Rat = authUser.Rat - } - if authUser.Cn != "" && authUser.Cn != user.Cn { - user.Cn = authUser.Cn - } - if authUser.SmfSel != "" && authUser.SmfSel != user.SmfSel { - user.SmfSel = authUser.SmfSel - } - if authUser.SmData != "" && authUser.SmData != user.SmData { - user.SmData = authUser.SmData - } - if authUser.EpsDat != "" && authUser.EpsDat != user.EpsDat { - user.EpsDat = authUser.EpsDat - } - if authUser.EpsFlag != "" && authUser.EpsFlag != user.EpsFlag { - user.EpsFlag = authUser.EpsFlag - } - if authUser.EpsOdb != "" && authUser.EpsDat != user.EpsDat { - user.EpsOdb = authUser.EpsOdb - } - if authUser.HplmnOdb != "" && authUser.HplmnOdb != user.HplmnOdb { - user.HplmnOdb = authUser.HplmnOdb - } - if authUser.Epstpl != "" && authUser.Epstpl != user.Epstpl { - user.Epstpl = authUser.Epstpl - } - if authUser.Ard != "" && authUser.Ard != user.Ard { - user.Ard = authUser.Ard - } - if authUser.ContextId != "" && authUser.ContextId != user.ContextId { - user.ContextId = authUser.ContextId - } - if authUser.ApnContext != "" && authUser.ApnContext != user.ApnContext { - user.ApnContext = authUser.ApnContext - } - if authUser.StaticIp != "" && authUser.StaticIp != user.StaticIp { - user.StaticIp = authUser.StaticIp - } - - results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", user.Imsi, user.NeID).Update(user) - if err != nil { - log.Errorf("Update err => %v", err) - return 0 - } - return results -} - -// Update4GIP 批量修改4G IP -func (r *RepoUdmSubUser) Update4GIP(neID string, subUser model.UdmSubUser) int64 { - var insertNum int64 - - imsiV, err := strconv.Atoi(subUser.Imsi) - if err != nil || subUser.StaticIp == "" { - return insertNum - } - numV, err := strconv.Atoi(subUser.SubNum) - if err != nil { - return insertNum - } - - for i := 0; i < numV; i++ { - subUser.Imsi = fmt.Sprint(imsiV + i) - - // 查询先 - var user model.UdmSubUser - has, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", subUser.Imsi, neID).Get(&user) - if has && err == nil { - // IP会自动递增 - parts := strings.Split(subUser.StaticIp, ".") - lastPart := parts[3] - lastNum, _ := strconv.Atoi(lastPart) - lastNum += i - newLastPart := strconv.Itoa(lastNum) - parts[3] = newLastPart - newIP := strings.Join(parts, ".") - user.StaticIp = newIP - // 更新 - results, err := datasource.DefaultDB().Table("u_sub_user").Update(user) - if err == nil { - log.Errorf("Update err => %v", err) - insertNum += results - } - } - } - return insertNum -} - -// UpdateSmData 批量修改sm-data -func (r *RepoUdmSubUser) UpdateSmData(neID string, subUser model.UdmSubUser) int64 { - var insertNum int64 - - imsiV, err := strconv.Atoi(subUser.Imsi) - if err != nil || subUser.StaticIp == "" { - return insertNum - } - numV, err := strconv.Atoi(subUser.SubNum) - if err != nil { - return insertNum - } - - for i := 0; i < numV; i++ { - subUser.Imsi = fmt.Sprint(imsiV + i) - - // 查询先 - var user model.UdmSubUser - has, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", subUser.Imsi, neID).Get(&user) - if has && err == nil { - // IP会自动递增,需提前规划好DNN对应的IP;如dnn不需要绑定IP则不带此字段名 - // parts := strings.Split(subUser.SmData, "&") - user.SmData = subUser.SmData - // 更新 - results, err := datasource.DefaultDB().Table("u_sub_user").Update(user) - if err == nil { - log.Errorf("Update err => %v", err) - insertNum += results - } - } - } - return insertNum -} - -// Delete 删除实体 -func (r *RepoUdmSubUser) Delete(neID, imsi string) int64 { - results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", imsi, neID).Delete() - if err != nil { - log.Errorf("Delete err => %v", err) - return results - } - return results -} - -// Delete 删除范围实体 -func (r *RepoUdmSubUser) Deletes(neID, imsi, num string) int64 { - imsiV, err := strconv.Atoi(imsi) - if err != nil { - return 0 - } - - numV, err := strconv.Atoi(num) - if err != nil { - return 0 - } - - results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi >= ? and imsi < ? and ne_id = ?", imsiV, imsiV+numV, neID).Delete() - if err != nil { - log.Errorf("Delete err => %v", err) - return results - } - return results -} diff --git a/features/udm_user/service/service_redis_data.go b/features/udm_user/service/service_redis_data.go deleted file mode 100644 index 8687fbe6..00000000 --- a/features/udm_user/service/service_redis_data.go +++ /dev/null @@ -1,119 +0,0 @@ -package service - -import ( - "strings" - - "be.ems/features/udm_user/model" - "be.ems/src/framework/redis" -) - -// phoneImsiList 获取所有imsi -// func phoneImsiList() map[string]string { -// phoneAndImsiArr := make(map[string]string, 0) -// phoneKeys, err := redis.GetKeys("udmuser", "1*********") -// if err != nil { -// return phoneAndImsiArr -// } -// for _, phone := range phoneKeys { -// imsi, err := redis.Get("udmuser", phone) -// if err != nil { -// continue -// } -// phoneAndImsiArr[phone] = imsi -// } -// return phoneAndImsiArr -// } - -// redisUdmAuthUserList UDM鉴权用户 -func redisUdmAuthUserList() []model.UdmAuthUser { - user := []model.UdmAuthUser{} - ausfArr, err := redis.GetKeys("udmuser", "ausf:*") - if err != nil { - return user - } - for _, key := range ausfArr { - m, err := redis.GetHash("udmuser", key) - if err != nil { - continue - } - - // 跳过-号数据 - imsi := key[5:] - if strings.Contains(imsi, "-") { - continue - } - - status := "0" - if _, ok := m["auth_success"]; ok { - status = "1" - } - amf := "" - if v, ok := m["amf"]; ok { - amf = strings.Replace(v, "\r\n", "", 1) - } - a := model.UdmAuthUser{ - Imsi: imsi, - Amf: amf, - Status: status, - Ki: m["ki"], - AlgoIndex: m["algo"], - Opc: m["opc"], - } - user = append(user, a) - } - return user -} - -// redisUdmSubUserList UDM签约用户 -func redisUdmSubUserList() []model.UdmSubUser { - user := []model.UdmSubUser{} - udmsdArr, err := redis.GetKeys("udmuser", "udm-sd:*") - if err != nil { - return user - } - for _, key := range udmsdArr { - m, err := redis.GetHash("udmuser", key) - if err != nil { - continue - } - - a := model.UdmSubUser{ - Imsi: key[7:], - Msisdn: m["gpsi"], // 46003550072 strings.TrimPrefix(m["gpsi"], "86"), - SmfSel: m["smf-sel"], - SmData: m["sm-dat"], // 1-000001&cmnet&ims&3gnet - } - - // def_ambr,def_nssai,0,def_arfb,def_sar,3,1,12000,1,1000,0,1,- - if v, ok := m["am-dat"]; ok { - arr := strings.Split(v, ",") - a.Ambr = arr[0] - a.Nssai = arr[1] - a.Rat = arr[2] - a.Arfb = arr[3] - a.Sar = arr[4] - a.Cn = arr[5] - } - // 1,64,24,65,def_eps,1,2,010200000000,- - if v, ok := m["eps-dat"]; ok { - arr := strings.Split(v, ",") - // 跳过非常规数据 - if len(arr) > 9 { - continue - } - a.EpsDat = v - a.EpsFlag = arr[0] - a.EpsOdb = arr[1] - a.HplmnOdb = arr[2] - a.Ard = arr[3] - a.Epstpl = arr[4] - a.ContextId = arr[5] - a.ApnContext = arr[7] - // [6] 是不要的,导入和导出不用 - a.StaticIp = arr[8] - } - - user = append(user, a) - } - return user -} diff --git a/features/udm_user/service/service_udm_auth_user.go b/features/udm_user/service/service_udm_auth_user.go deleted file mode 100644 index 5023f4ce..00000000 --- a/features/udm_user/service/service_udm_auth_user.go +++ /dev/null @@ -1,151 +0,0 @@ -package service - -import ( - "fmt" - "strconv" - - "be.ems/features/udm_user/model" - "be.ems/features/udm_user/repo" -) - -// 实例化服务层 ServiceUdmAuthUser 结构体 -var NewServiceUdmAuthUser = &ServiceUdmAuthUser{ - repoAuthUser: *repo.NewRepoUdmAuthUser, -} - -// ServiceUdmAuthUser UDM鉴权用户 服务层处理 -type ServiceUdmAuthUser struct { - repoAuthUser repo.RepoUdmAuthUser -} - -// Save UDM鉴权用户-获取全部保存数据库 -func (r *ServiceUdmAuthUser) Save(neID string) int64 { - var num int64 = 0 - authArr := redisUdmAuthUserList() - // 有数据才清空 - if len(authArr) == 0 { - return num - } - go r.repoAuthUser.ClearAndInsert(neID, authArr) - return int64(len(authArr)) -} - -// Page UDM签约用户-分页查询数据库 -func (r *ServiceUdmAuthUser) Page(query map[string]any) map[string]any { - return r.repoAuthUser.SelectPage(query) -} - -// List UDM签约用户-查询数据库 -func (r *ServiceUdmAuthUser) List(authUser model.UdmAuthUser) []model.UdmAuthUser { - return r.repoAuthUser.SelectList(authUser) -} - -// Insert UDM鉴权用户-新增单个 -// imsi长度15,ki长度32,opc长度0或者32 -func (r *ServiceUdmAuthUser) Insert(neID string, authUser model.UdmAuthUser) int64 { - authUser.NeID = neID - authUser.Status = "0" - return r.repoAuthUser.Insert(authUser) -} - -// Insert UDM鉴权用户-批量添加 -func (r *ServiceUdmAuthUser) Inserts(neID string, authUser model.UdmAuthUser, num string) int64 { - var arr []model.UdmAuthUser - - imsiVlen := len(authUser.Imsi) - imsiV, err := strconv.Atoi(authUser.Imsi) - if err != nil { - return 0 - } - - numV, err := strconv.Atoi(num) - if err != nil { - return 0 - } - - authUser.NeID = neID - authUser.Status = "0" - for i := 0; i < numV; i++ { - imsi := fmt.Sprint(imsiV + i) - if len(imsi) < imsiVlen { - imsi = fmt.Sprintf("%0*s", imsiVlen, imsi) - } - authUser.Imsi = imsi - arr = append(arr, authUser) - } - - return r.repoAuthUser.Inserts(arr) -} - -// InsertCSV UDM鉴权用户-批量添加 -func (r *ServiceUdmAuthUser) InsertCSV(neID string, data []map[string]string) int64 { - var arr []model.UdmAuthUser - for _, v := range data { - var authUser model.UdmAuthUser - authUser.NeID = neID - authUser.Status = "0" - if s, ok := v["imsi"]; ok { - authUser.Imsi = s - } - if s, ok := v["ki"]; ok { - authUser.Ki = s - } - if s, ok := v["algo"]; ok { - authUser.AlgoIndex = s - } - if s, ok := v["amf"]; ok { - authUser.Amf = s - } - if s, ok := v["opc"]; ok { - authUser.Opc = s - } - - if authUser.Imsi == "" { - continue - } - arr = append(arr, authUser) - } - return r.repoAuthUser.Inserts(arr) -} - -// InsertTxt UDM鉴权用户-批量添加 -func (r *ServiceUdmAuthUser) InsertTxt(neID string, data [][]string) int64 { - var arr []model.UdmAuthUser - for _, v := range data { - if len(v) < 4 { - continue - } - var authUser model.UdmAuthUser - authUser.NeID = neID - authUser.Status = "0" - authUser.Imsi = v[0] - authUser.Ki = v[1] - authUser.AlgoIndex = v[2] - authUser.Amf = v[3] - if len(v) == 5 { - authUser.Opc = v[4] - } - - if authUser.Imsi == "" { - continue - } - arr = append(arr, authUser) - } - - return r.repoAuthUser.Inserts(arr) -} - -// Insert UDM鉴权用户-修改更新 -func (r *ServiceUdmAuthUser) Update(neID string, authUser model.UdmAuthUser) int64 { - return r.repoAuthUser.Update(neID, authUser) -} - -// Insert UDM鉴权用户-删除单个 -func (r *ServiceUdmAuthUser) Delete(neID, imsi string) int64 { - return r.repoAuthUser.Delete(neID, imsi) -} - -// Insert UDM鉴权用户-删除范围 -func (r *ServiceUdmAuthUser) Deletes(neID, imsi, num string) int64 { - return r.repoAuthUser.Deletes(neID, imsi, num) -} diff --git a/features/udm_user/service/service_udm_sub_user.go b/features/udm_user/service/service_udm_sub_user.go deleted file mode 100644 index 6a2d218c..00000000 --- a/features/udm_user/service/service_udm_sub_user.go +++ /dev/null @@ -1,231 +0,0 @@ -package service - -import ( - "fmt" - "strconv" - "strings" - - "be.ems/features/udm_user/model" - "be.ems/features/udm_user/repo" -) - -// 实例化服务层 ServiceUdmSubUser 结构体 -var NewServiceUdmSubUser = &ServiceUdmSubUser{ - repoSunUser: *repo.NewRepoUdmSubUser, -} - -// ServiceUdmSubUser UDM签约用户 服务层处理 -type ServiceUdmSubUser struct { - repoSunUser repo.RepoUdmSubUser -} - -// Save UDM签约用户-获取全部保存数据库 -func (r *ServiceUdmSubUser) Save(neID string) int64 { - var num int64 = 0 - subArr := redisUdmSubUserList() - // 有数据才清空 - if len(subArr) == 0 { - return num - } - go r.repoSunUser.ClearAndInsert(neID, subArr) - return int64(len(subArr)) -} - -// Page UDM签约用户-分页查询数据库 -func (r *ServiceUdmSubUser) Page(query map[string]any) map[string]any { - return r.repoSunUser.SelectPage(query) -} - -// List UDM签约用户-查询数据库 -func (r *ServiceUdmSubUser) List(subUser model.UdmSubUser) []model.UdmSubUser { - return r.repoSunUser.SelectList(subUser) -} - -// Insert UDM签约用户-新增单个 -// imsi长度15,ki长度32,opc长度0或者32 -func (r *ServiceUdmSubUser) Insert(neID string, subUser model.UdmSubUser) int64 { - subUser.NeID = neID - return r.repoSunUser.Insert(subUser) -} - -// Insert UDM签约用户-批量添加 -func (r *ServiceUdmSubUser) Inserts(neID string, subUser model.UdmSubUser, num string) int64 { - var arr []model.UdmSubUser - - imsiVlen := len(subUser.Imsi) - imsiV, err := strconv.Atoi(subUser.Imsi) - if err != nil { - return 0 - } - msisdnVlen := len(subUser.Msisdn) - msisdnV, err := strconv.Atoi(subUser.Msisdn) - if err != nil { - return 0 - } - - numV, err := strconv.Atoi(num) - if err != nil { - return 0 - } - - subUser.NeID = neID - for i := 0; i < numV; i++ { - msisdn := fmt.Sprint(msisdnV + i) - if len(msisdn) < msisdnVlen { - msisdn = fmt.Sprintf("%0*s", msisdnVlen, msisdn) - } - subUser.Msisdn = msisdn - - imsi := fmt.Sprint(imsiV + i) - if len(imsi) < imsiVlen { - imsi = fmt.Sprintf("%0*s", imsiVlen, imsi) - } - subUser.Imsi = imsi - - // IP会自动递增 - if len(subUser.StaticIp) > 5 { - parts := strings.Split(subUser.StaticIp, ".") - lastPart := parts[3] - lastNum, _ := strconv.Atoi(lastPart) - lastNum += i - newLastPart := strconv.Itoa(lastNum) - parts[3] = newLastPart - newIP := strings.Join(parts, ".") - subUser.StaticIp = newIP - } - - subUser.EpsDat = fmt.Sprintf("%s,%s,%s,%s,%s,%s,2,%s,%s", subUser.EpsFlag, subUser.EpsOdb, subUser.HplmnOdb, subUser.Ard, subUser.Epstpl, subUser.ContextId, subUser.ApnContext, subUser.StaticIp) - - arr = append(arr, subUser) - } - - return r.repoSunUser.Inserts(arr) -} - -// InsertCSV UDM签约用户-批量添加 -func (r *ServiceUdmSubUser) InsertCSV(neID string, data []map[string]string) int64 { - var arr []model.UdmSubUser - for _, v := range data { - var subUser model.UdmSubUser - subUser.NeID = neID - if s, ok := v["imsi"]; ok { - subUser.Imsi = s - } - if s, ok := v["msisdn"]; ok { - subUser.Msisdn = s - } - if s, ok := v["ambr"]; ok { - subUser.Ambr = s - } - if s, ok := v["nssai"]; ok { - subUser.Nssai = s - } - if s, ok := v["arfb"]; ok { - subUser.Arfb = s - } - if s, ok := v["sar"]; ok { - subUser.Sar = s - } - if s, ok := v["rat"]; ok { - subUser.Rat = s - } - if s, ok := v["cn"]; ok { - subUser.Cn = s - } - if s, ok := v["smf_sel"]; ok { - subUser.SmfSel = s - } - if s, ok := v["sm_dat"]; ok { - subUser.SmData = s - } - if s, ok := v["eps_dat"]; ok { - subUser.EpsDat = s - arr := strings.Split(s, ",") - if len(arr) == 8 { - subUser.EpsFlag = arr[0] - subUser.EpsOdb = arr[1] - subUser.HplmnOdb = arr[2] - subUser.Ard = arr[3] - subUser.Epstpl = arr[4] - subUser.ContextId = arr[5] - subUser.ApnContext = arr[6] - subUser.StaticIp = arr[7] - } - } - - if subUser.Imsi == "" { - continue - } - arr = append(arr, subUser) - } - return r.repoSunUser.Inserts(arr) -} - -// InsertTxt UDM签约用户-批量添加 -func (r *ServiceUdmSubUser) InsertTxt(neID string, data [][]string) int64 { - var arr []model.UdmSubUser - for _, v := range data { - if len(v) < 10 { - continue - } - var subUser model.UdmSubUser - subUser.NeID = neID - subUser.Imsi = v[0] - subUser.Msisdn = v[1] - subUser.Ambr = v[2] - subUser.Nssai = v[3] - subUser.Arfb = v[4] - subUser.Sar = v[5] - subUser.Rat = v[6] - subUser.Cn = v[7] - subUser.SmfSel = v[8] - subUser.SmData = v[9] - if len(v) > 17 { - subUser.EpsFlag = v[10] - subUser.EpsOdb = v[11] - subUser.HplmnOdb = v[12] - subUser.Ard = v[13] - subUser.Epstpl = v[14] - subUser.ContextId = v[15] - subUser.ApnContext = v[16] - subUser.StaticIp = v[17] - subUser.EpsDat = strings.Join(v[10:], ",") - } - - if subUser.Imsi == "" { - continue - } - arr = append(arr, subUser) - } - return r.repoSunUser.Inserts(arr) -} - -// Insert UDM签约用户-批量添加4G用户 -func (r *ServiceUdmSubUser) Insert4G(neID string, subUser model.UdmSubUser) int64 { - return r.repoSunUser.Insert4G(neID, subUser) -} - -// Insert UDM签约用户-修改更新 -func (r *ServiceUdmSubUser) Update(neID string, subUser model.UdmSubUser) int64 { - return r.repoSunUser.Update(neID, subUser) -} - -// Update4GIP UDM签约用户-批量修改4G IP -func (r *ServiceUdmSubUser) Update4GIP(neID string, subUser model.UdmSubUser) int64 { - return r.repoSunUser.Update4GIP(neID, subUser) -} - -// Update4GIP UDM签约用户-批量修改sm-data -func (r *ServiceUdmSubUser) UpdateSmData(neID string, subUser model.UdmSubUser) int64 { - return r.repoSunUser.UpdateSmData(neID, subUser) -} - -// Insert UDM签约用户-删除单个 -func (r *ServiceUdmSubUser) Delete(neID, imsi string) int64 { - return r.repoSunUser.Delete(neID, imsi) -} - -// Insert UDM签约用户-删除范围 -func (r *ServiceUdmSubUser) Deletes(neID, imsi, num string) int64 { - return r.repoSunUser.Deletes(neID, imsi, num) -} diff --git a/go.mod b/go.mod index cd0e1f25..797feebf 100644 --- a/go.mod +++ b/go.mod @@ -50,6 +50,7 @@ require ( github.com/creack/pty v1.1.9 // indirect github.com/go-admin-team/go-admin-core v1.3.12-0.20221121065133-27b7dbe27a8f // indirect github.com/go-gsm/charset v1.0.0 // indirect + github.com/kr/fs v0.1.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect @@ -117,6 +118,7 @@ require ( github.com/nyaruka/phonenumbers v1.0.55 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/sftp v1.13.6 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.1 github.com/reiver/go-oi v1.0.0 // indirect diff --git a/go.sum b/go.sum index 5ab8ad2b..b914a705 100644 --- a/go.sum +++ b/go.sum @@ -439,6 +439,7 @@ github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZX github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -588,6 +589,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -791,6 +794,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= @@ -879,6 +883,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= @@ -975,6 +980,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -985,6 +991,7 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= @@ -997,6 +1004,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= diff --git a/lib/core/account/account.go b/lib/core/account/account.go deleted file mode 100644 index 81d58533..00000000 --- a/lib/core/account/account.go +++ /dev/null @@ -1,54 +0,0 @@ -package account - -import ( - "fmt" - "strconv" - "time" - - sysMenuService "be.ems/features/sys_menu/service" - sysRoleService "be.ems/features/sys_role/service" - "be.ems/lib/core/cache" - "be.ems/lib/core/vo" - "be.ems/lib/dborm" - srcConfig "be.ems/src/framework/config" -) - -// 登录缓存用户信息 -func CacheLoginUser(user *dborm.User) { - // 过期时间 - expiresStr, err := dborm.XormGetConfigValue("Security", "sessionExpires") - if err != nil { - expiresStr = "18000" - } - expiresValue, _ := strconv.Atoi(expiresStr) - expireTime := time.Duration(expiresValue) * time.Second - - nowTime := time.Now().UnixMilli() - - // 登录用户 - loginUser := vo.LoginUser{ - UserID: fmt.Sprint(user.Id), - UserName: user.Name, - ExpireTime: nowTime + expireTime.Milliseconds(), - LoginTime: nowTime, - User: *user, - } - - // 是否管理员 - if srcConfig.IsAdmin(loginUser.UserID) { - loginUser.Permissions = []string{"*:*:*"} - } else { - // 获取权限标识 - loginUser.Permissions = sysMenuService.NewRepoSysMenu.SelectMenuPermsByUserId(loginUser.UserID) - // 获取角色信息 - loginUser.User.Roles = sysRoleService.NewRepoSysRole.SelectRoleListByUserId(loginUser.UserID) - } - - // 缓存时间 - cache.SetLocalTTL(user.AccountId, loginUser, time.Duration(expireTime)) -} - -// 清除缓存用户信息 -func ClearLoginUser(accountId string) { - cache.DeleteLocalTTL(accountId) -} diff --git a/lib/dborm/dborm.go b/lib/dborm/dborm.go index 36768b38..aa008291 100644 --- a/lib/dborm/dborm.go +++ b/lib/dborm/dborm.go @@ -10,9 +10,9 @@ import ( "strings" - "be.ems/features/sys_role/model" "be.ems/lib/log" "be.ems/lib/oauth" + "be.ems/src/modules/system/model" _ "github.com/go-sql-driver/mysql" "xorm.io/xorm" @@ -1402,11 +1402,11 @@ type MeasureThreshold struct { type NeSoftware struct { Id int `json:"id" xorm:"pk 'id' autoincr"` NeType string `json:"neType" xorm:"ne_type"` - FileName string `json:"neName" xorm:"file_name"` - Path string `json:"path"` - Version string `json:"version"` - Md5Sum string `json:"md5Sum" xorm:"md5_sum"` - Comment string `json:"comment"` + FileName string `json:"fileName" xorm:"name"` + Path string `json:"path" xorm:"path"` + Version string `json:"version" ` + Md5Sum string `json:"md5Sum" xorm:"-"` + Comment string `json:"comment" xorm:"description"` // Status string `json:"status"` UpdateTime string `json:"createTime" xorm:"-" ` } @@ -1415,18 +1415,18 @@ type NeVersion struct { Id int `json:"id" xorm:"pk 'id' autoincr"` NeType string `json:"neType" xorm:"ne_type"` NeId string `json:"neId" xorm:"ne_id"` - Version string `json:"version"` - FilePath string `json:"filePath" xorm:"file_path"` + Version string `json:"version" ` + FilePath string `json:"filePath" xorm:"path"` NewVersion string `json:"newVersion" xorm:"new_version"` - NewFile string `json:"newFile" xorm:"new_file"` + NewFile string `json:"newFile" xorm:"new_path"` PreVersion string `json:"preVersion" xorm:"pre_version"` - PreFile string `json:"preFile" xorm:"pre_file"` - Status string `json:"status"` + PreFile string `json:"preFile" xorm:"pre_path"` + Status string `json:"status" xorm:"status"` UpdateTime string `json:"createTime" xorm:"-" ` } func XormGetDataBySQL(sql string) (*[]map[string]string, error) { - //log.Debug("XormGetDataBySQL processing... ") + log.Debug("XormGetDataBySQL processing... ") rows := make([]map[string]string, 0) rows, err := DbClient.XEngine.QueryString(sql) @@ -1708,25 +1708,26 @@ func IsPermissionAllowed(token, method, module, dbname, tbname, pack string) (bo type NeLicense struct { NeType string `json:"neType" xorm:"ne_type"` NeID string `json:"neID" xorm:"ne_id"` - SerialNo string `json:"serialNo" xorm:"serial_no"` - Capcity int `json:"capcity" xorm:"capcity"` - Used int `json:"used" xorm:"used"` - FeatureEnabled string `json:"featureEnabled" xorm:"feature_enabled"` - ExpirationDate string `json:"expirationDate" xorm:"expiration_date"` + SerialNo string `json:"serialNo" xorm:"serial_num"` + Capcity int `json:"capcity" xorm:"-"` + Used int `json:"used" xorm:"-"` + FeatureEnabled string `json:"featureEnabled" xorm:"-"` + ExpirationDate string `json:"expirationDate" xorm:"expiry_date"` Status string `json:"status" xorm:"status"` - Path string `json:"path" xorm:"path"` - FileName string `json:"file_name" xorm:"file_name"` - Comment string `json:"comment" xorm:"comment"` + Path string `json:"path" xorm:"license_path"` + FileName string `json:"file_name" xorm:"-"` + Comment string `json:"comment" xorm:"remark"` CreatedAt string `json:"createdAt" xorm:"-"` UpdatedAt string `json:"updatedAt" xorm:"-"` DeletedAt string `json:"deletedAt" xorm:"-"` } func XormAdjustmentNeLicense(neType, neID string, value int) (int64, error) { + return 1, nil //neLicense := NeLicense{NeType: neType, NeID: neID, Capability: value} // session.LogoutTime.Valid = true // session.LogoutTime.Time = time.Now() - res, err := xEngine.Exec("update ne_license set capcity=capcity+? where IFNULL(ne_type, '')=? and IFNULL(ne_id, '')=?", value, neType, neID) + // res, err := xEngine.Exec("update ne_license set capcity=capcity+? where IFNULL(ne_type, '')=? and IFNULL(ne_id, '')=?", value, neType, neID) // defer xSession.Close() //affected, err := xSession.Table("ne_license").Where("ne_type=? and ne_id=?", neType, neID).Update(&neLicense) @@ -1734,25 +1735,26 @@ func XormAdjustmentNeLicense(neType, neID string, value int) (int64, error) { // //affected, err := xSession.Table("ne_license").SQL("ne_tye=? and ne_id=?", neType, neID).Update(session) // err := xSession.SQL("update ne_license set capability=capability+? where ne_type=? and ne_id=?", value, neType, neID) //xSession.Commit() - affected, err := res.RowsAffected() - return affected, err + // affected, err := res.RowsAffected() + // return affected, err } func XormUpdateNeLicense(neType, neID string, capcity int) (int64, error) { - var err error - var res sql.Result - if neType != "" && neID != "" { - res, err = xEngine.Exec("update ne_license set capcity=? where ne_type=? and ne_id=?", capcity, neType, neID) - } else if neType != "" && neID == "" { - res, err = xEngine.Exec("update ne_license set capcity=? where ne_type=?", capcity, neType) - } else if neType == "" && neID != "" { - res, err = xEngine.Exec("update ne_license set capcity=? where ne_id=?", capcity, neID) - } else { - res, err = xEngine.Exec("update ne_license set capcity=?", capcity) - } + return 1, nil + // var err error + // var res sql.Result + // if neType != "" && neID != "" { + // res, err = xEngine.Exec("update ne_license set capcity=? where ne_type=? and ne_id=?", capcity, neType, neID) + // } else if neType != "" && neID == "" { + // res, err = xEngine.Exec("update ne_license set capcity=? where ne_type=?", capcity, neType) + // } else if neType == "" && neID != "" { + // res, err = xEngine.Exec("update ne_license set capcity=? where ne_id=?", capcity, neID) + // } else { + // res, err = xEngine.Exec("update ne_license set capcity=?", capcity) + // } - affected, err := res.RowsAffected() - return affected, err + // affected, err := res.RowsAffected() + // return affected, err } type NorthboundCm struct { diff --git a/lib/midware/arrow_ip_addr.go b/lib/midware/arrow_ip_addr.go index 98c29462..c9c7a32c 100644 --- a/lib/midware/arrow_ip_addr.go +++ b/lib/midware/arrow_ip_addr.go @@ -10,6 +10,7 @@ import ( "be.ems/lib/services" ) +// 已禁用 // 登录策略限制登录时间和访问ip范围 func ArrowIPAddr(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/lib/midware/authorize.go b/lib/midware/authorize.go index 152709b2..b56e9c39 100644 --- a/lib/midware/authorize.go +++ b/lib/midware/authorize.go @@ -14,6 +14,7 @@ import ( tokenUtils "be.ems/src/framework/utils/token" ) +// 已禁用由Gin部分接管 // Authorize 用户身份授权认证校验 // // 只需含有其中角色 "hasRoles": {"xxx"}, diff --git a/lib/midware/cors.go b/lib/midware/cors.go index b0a73ad6..a9243694 100644 --- a/lib/midware/cors.go +++ b/lib/midware/cors.go @@ -5,6 +5,7 @@ import ( "strings" ) +// 已禁用由Gin部分接管 // Cors 跨域 func Cors(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/lib/midware/operate_log.go b/lib/midware/operate_log.go index 6b00eb07..d8bc3964 100644 --- a/lib/midware/operate_log.go +++ b/lib/midware/operate_log.go @@ -11,8 +11,8 @@ import ( "strings" "time" + "be.ems/lib/core/utils/ctx" "be.ems/lib/core/utils/parse" - "be.ems/lib/dborm" "be.ems/src/framework/constants/common" "be.ems/src/framework/middleware/collectlogs" "be.ems/src/framework/utils/ip2region" @@ -47,13 +47,7 @@ func LogOperate(options collectlogs.Options) func(http.Handler) http.Handler { funcName = funcName[lastDotIndex+1:] // 用户名 - username := "-" - accessToken := r.Header.Get("AccessToken") - if accessToken != "" { - // 验证令牌 == 这里直接查数据库session - se, _ := dborm.XormUpdateSessionShakeTime(accessToken) - username = se.AccountId - } + username := ctx.LoginUserToUserName(r) // 解析ip地址 ip := strings.Split(r.RemoteAddr, ":")[0] diff --git a/lib/routes/routes.go b/lib/routes/routes.go index b5f342ae..baddb754 100644 --- a/lib/routes/routes.go +++ b/lib/routes/routes.go @@ -13,21 +13,12 @@ import ( "be.ems/features/fm" "be.ems/features/lm" "be.ems/features/mml" - "be.ems/features/monitor/monitor" - "be.ems/features/monitor/psnet" "be.ems/features/nbi" "be.ems/features/pm" "be.ems/features/security" "be.ems/features/sm" "be.ems/features/state" - sysconfig "be.ems/features/sys_config" - sysdictdata "be.ems/features/sys_dict_data" - sysdicttype "be.ems/features/sys_dict_type" - sysmenu "be.ems/features/sys_menu" - sysrole "be.ems/features/sys_role" - sysuser "be.ems/features/sys_user" "be.ems/features/trace" - udmuser "be.ems/features/udm_user" "be.ems/features/ue" "be.ems/lib/midware" "be.ems/lib/services" @@ -233,16 +224,6 @@ func init() { Register("PUT", trace.CustomUriTraceTask, trace.PutTraceTaskToNF, nil) Register("DELETE", trace.CustomUriTraceTask, trace.DeleteTraceTaskToNF, nil) - // 网元发送执行 pcap抓包任务 - Register("POST", trace.UriTcpdumpTask, trace.TcpdumpNeTask, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_INSERT))) - Register("POST", trace.CustomUriTcpdumpTask, trace.TcpdumpNeTask, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_INSERT))) - // 网元发送执行 抓包下载pcap文件 - Register("POST", trace.UriTcpdumpPcapDownload, trace.TcpdumpPcapDownload, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_EXPORT))) - Register("POST", trace.CustomUriTcpdumpPcapDownload, trace.TcpdumpPcapDownload, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_EXPORT))) - // 网元发送执行UPF pcap抓包 - Register("POST", trace.UriTcpdumpNeUPFTask, trace.TcpdumpNeUPFTask, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_INSERT))) - Register("POST", trace.CustomUriTcpdumpNeUPFTask, trace.TcpdumpNeUPFTask, midware.LogOperate(collectlogs.OptionNew("Packet Capturing Task", collectlogs.BUSINESS_TYPE_INSERT))) - // file management Register("POST", file.UriFile, file.UploadFile, midware.LogOperate(collectlogs.OptionNew("File", collectlogs.BUSINESS_TYPE_INSERT))) Register("GET", file.UriFile, file.DownloadFile, midware.LogOperate(collectlogs.OptionNew("File", collectlogs.BUSINESS_TYPE_OTHER))) @@ -308,20 +289,9 @@ func init() { Register("POST", cdr.UriSMFCDREvent, cdr.PostCDREventFromSMF, nil) Register("POST", cdr.CustomUriSMFCDREvent, cdr.PostCDREventFromSMF, nil) - // UE event + // UE event AMF上报的UE事件, 无前缀给到Gin处理 //Register("POST", event.UriUEEvent, event.PostUEEventFromAMF, nil) - // 进程网络 - Register("GET", psnet.UriWs, psnet.ProcessWs, nil) - Register("POST", psnet.UriStop, psnet.StopProcess, nil) - Register("POST", psnet.UriPing, psnet.Ping, nil) - - // 主机CPU内存监控 - Register("POST", monitor.UriLoad, monitor.LoadMonitor, nil) - Register("GET", monitor.UriNetOpt, monitor.Netoptions, nil) - Register("GET", monitor.UriIPAddr, monitor.IPAddr, nil) - Register("GET", monitor.UriIoOpt, monitor.Iooptions, nil) - // 文件资源 Register("GET", file.UriDiskList, file.DiskList, nil) Register("POST", file.UriListFiles, file.ListFiles, nil) @@ -342,56 +312,6 @@ func init() { Register("POST", lm.ExtBackupDataUri, lm.ExtDatabaseBackupData, nil) Register("POST", lm.CustomExtBackupDataUri, lm.ExtDatabaseBackupData, nil) - // 系统登录 - Register("POST", security.UriLogin, security.LoginOMC, nil) - Register("POST", security.CustomUriLogin, security.LoginOMC, nil) - - // 获取验证码 - Register("GET", security.UriCaptchaImage, security.CaptchaImage, nil) - Register("GET", security.CustomUriCaptchaImage, security.CaptchaImage, nil) - - // 登录用户信息 - Register("GET", security.UriUserInfo, security.UserInfo, midware.Authorize(nil)) - Register("GET", security.CustomUriUserInfo, security.UserInfo, midware.Authorize(nil)) - - // 登录用户路由信息 - Register("GET", security.UriRouters, security.Routers, midware.Authorize(nil)) - Register("GET", security.CustomUriRouters, security.Routers, midware.Authorize(nil)) - - // 参数配置信息接口添加到路由 - for _, v := range sysconfig.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // 字典类型信息接口添加到路由 - for _, v := range sysdicttype.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // 字典类型对应的字典数据信息接口添加到路由 - for _, v := range sysdictdata.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // 菜单接口添加到路由 - for _, v := range sysmenu.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // 角色接口添加到路由 - for _, v := range sysrole.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // 用户接口添加到路由 - for _, v := range sysuser.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } - - // UDM 用户信息接口添加到路由 - for _, v := range udmuser.Routers() { - Register(v.Method, v.Pattern, v.Handler, v.Middleware) - } } // To resolv rest POST/PUT/DELETE/PATCH cross domain diff --git a/src/app.go b/src/app.go index ff2abb3f..75dd363f 100644 --- a/src/app.go +++ b/src/app.go @@ -8,6 +8,7 @@ import ( "be.ems/src/framework/errorcatch" "be.ems/src/framework/middleware" "be.ems/src/framework/middleware/security" + "be.ems/src/framework/utils/machine" "be.ems/src/modules/chart" "be.ems/src/modules/common" "be.ems/src/modules/crontask" @@ -46,6 +47,9 @@ func AppEngine() *gin.Engine { // 设置程序内全局资源访问 config.SetAssetsDirFS(assetsDir) + // 首次安装启动记录 + machine.Launch() + // 读取服务配置 app.ForwardedByClientIP = config.Get("server.proxy").(bool) return app @@ -117,7 +121,7 @@ func initDefeat(app *gin.Engine) { app.NoRoute(func(c *gin.Context) { c.JSON(404, gin.H{ "code": 404, - "msg": fmt.Sprintf("%s Not Found", c.Request.RequestURI), + "msg": fmt.Sprintf("Not Found %s", c.Request.RequestURI), }) }) } diff --git a/src/framework/config/config/config.default.yaml b/src/framework/config/config/config.default.yaml index 69943d5b..c5a30c6e 100644 --- a/src/framework/config/config/config.default.yaml +++ b/src/framework/config/config/config.default.yaml @@ -15,7 +15,7 @@ logger: fileDir: "/var/log" fileName: "omc.log" level: 2 # 日志记录的等级 0:silent<1:info<2:warn<3:error - maxDay: 180 # 日志会保留 180 天 + maxDay: 7 # 日志会保留 180 天 maxSize: 10 # 调整按 10MB 大小的切割 # 静态文件配置, 相对项目根路径或填绝对路径 diff --git a/src/framework/constants/common/common.go b/src/framework/constants/common/common.go index 37861049..08e0bcbc 100644 --- a/src/framework/constants/common/common.go +++ b/src/framework/constants/common/common.go @@ -19,3 +19,6 @@ const STATUS_NO = "0" // 上下文信息-登录用户 const CTX_LOGIN_USER = "loginuser" + +// 启动-引导系统初始 +const LAUNCH_BOOTLOADER = "bootloader" diff --git a/src/framework/logger/writer.go b/src/framework/logger/writer.go index 32096866..d535f643 100644 --- a/src/framework/logger/writer.go +++ b/src/framework/logger/writer.go @@ -34,7 +34,7 @@ const ( // NewLogger 实例日志器对象 func NewLogger(env, fileDir, fileName string, level, maxDay, maxSize int) (*Logger, error) { logFilePath := filepath.Join(fileDir, fileName) - if err := os.MkdirAll(filepath.Dir(logFilePath), 0750); err != nil { + if err := os.MkdirAll(filepath.Dir(logFilePath), 0775); err != nil { return nil, fmt.Errorf("failed to mkdir logger dir: %v", err) } fileHandle, err := os.OpenFile(logFilePath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) diff --git a/src/framework/utils/crypto/aes.go b/src/framework/utils/crypto/aes.go index 4db36acc..290eb718 100644 --- a/src/framework/utils/crypto/aes.go +++ b/src/framework/utils/crypto/aes.go @@ -10,21 +10,17 @@ import ( "io" ) -// aesKey 字符串AES加解密密钥 -const aesKey = "AGT66VfY4SMaiT97" - // StringEncryptByAES 字符串AES加密 func StringEncryptByAES(text string) (string, error) { if len(text) == 0 { return "", nil } - pass := []byte(text) - xpass, err := aesEncryptWithSalt([]byte(aesKey), pass) - if err == nil { - pass64 := base64.StdEncoding.EncodeToString(xpass) - return pass64, err + xpass, err := aesEncryptWithSalt([]byte(text)) + if err != nil { + return "", err } - return "", err + pass64 := base64.StdEncoding.EncodeToString(xpass) + return pass64, nil } // StringDecryptByAES 字符串AES解密 @@ -36,53 +32,70 @@ func StringDecryptByAES(text string) (string, error) { if err != nil { return "", err } - var tpass []byte - tpass, err = aesDecryptWithSalt([]byte(aesKey), bytesPass) - if err == nil { - result := string(tpass[:]) - return result, err + + tpass, err := aesDecryptWithSalt(bytesPass) + if err != nil { + return "", err } - return "", err + return string(tpass), nil } -// aesEncryptWithSalt AES加密 -func aesEncryptWithSalt(key, plaintext []byte) ([]byte, error) { - blockSize := aes.BlockSize - padding := blockSize - len(plaintext)%blockSize - padtext := bytes.Repeat([]byte{byte(padding)}, padding) - plaintext = append(plaintext, padtext...) +// aesKey 字符串AES加解密密钥 +const aesKey = "AGT66VfY4SMaiT97a7df0aef1704d5c5" - block, err := aes.NewCipher(key) +// const aesKey = "AGT66VfY4SMaiT97" +// aesEncryptWithSalt AES加密 +func aesEncryptWithSalt(plaintext []byte) ([]byte, error) { + block, err := aes.NewCipher([]byte(aesKey)) if err != nil { return nil, err } + blockSize := aes.BlockSize + + padding := blockSize - (len(plaintext) % blockSize) + padtext := bytes.Repeat([]byte{byte(padding)}, padding) + plaintext = append(plaintext, padtext...) + ciphertext := make([]byte, blockSize+len(plaintext)) - iv := ciphertext[0:blockSize] + iv := ciphertext[:blockSize] if _, err := io.ReadFull(rand.Reader, iv); err != nil { return nil, err } - cbc := cipher.NewCBCEncrypter(block, iv) - cbc.CryptBlocks(ciphertext[blockSize:], plaintext) + + mode := cipher.NewCBCEncrypter(block, iv) + mode.CryptBlocks(ciphertext[blockSize:], plaintext) + return ciphertext, nil } // aesDecryptWithSalt AES解密 -func aesDecryptWithSalt(key, ciphertext []byte) ([]byte, error) { +func aesDecryptWithSalt(ciphertext []byte) ([]byte, error) { blockSize := aes.BlockSize - var block cipher.Block - block, err := aes.NewCipher(key) + if len(ciphertext) < blockSize { + return nil, fmt.Errorf("ciphertext too short") + } + + iv := ciphertext[:blockSize] + ciphertext = ciphertext[blockSize:] + + block, err := aes.NewCipher([]byte(aesKey)) if err != nil { return nil, err } - if len(ciphertext) < blockSize { - return nil, fmt.Errorf("iciphertext too short") + + if len(ciphertext)%blockSize != 0 { + return nil, fmt.Errorf("ciphertext is not a multiple of the block size") } - iv := ciphertext[:blockSize] - ciphertext = ciphertext[blockSize:] - cbc := cipher.NewCBCDecrypter(block, iv) - cbc.CryptBlocks(ciphertext, ciphertext) - length := len(ciphertext) - unpadding := int(ciphertext[len(ciphertext)-1]) - ciphertext = ciphertext[:(length - unpadding)] + + mode := cipher.NewCBCDecrypter(block, iv) + mode.CryptBlocks(ciphertext, ciphertext) + + // 去除填充 + padding := int(ciphertext[len(ciphertext)-1]) + if padding > blockSize || padding == 0 { + return nil, fmt.Errorf("invalid padding") + } + ciphertext = ciphertext[:len(ciphertext)-padding] + return ciphertext, nil } diff --git a/src/framework/utils/file/csv.go b/src/framework/utils/file/csv.go index 6591ff86..401f2ec8 100644 --- a/src/framework/utils/file/csv.go +++ b/src/framework/utils/file/csv.go @@ -20,7 +20,7 @@ func WriterFileCSV(data [][]string, filePath string) error { dirPath := filepath.Dir(filePath) // 确保文件夹路径存在 - err := os.MkdirAll(dirPath, os.ModePerm) + err := os.MkdirAll(dirPath, 0775) if err != nil { logger.Errorf("MkdirAll dir %v", err) } diff --git a/src/framework/utils/file/excel.go b/src/framework/utils/file/excel.go index 74416800..69b7aa53 100644 --- a/src/framework/utils/file/excel.go +++ b/src/framework/utils/file/excel.go @@ -142,7 +142,7 @@ func WriteSheet(headerCells map[string]string, dataCells []map[string]any, fileN saveFilePath := filepath.Join(dir, filePath, fileName) // 创建文件目录 - if err := os.MkdirAll(filepath.Dir(saveFilePath), 0750); err != nil { + if err := os.MkdirAll(filepath.Dir(saveFilePath), 0775); err != nil { return "", fmt.Errorf("failed to create save file %v", err) } diff --git a/src/framework/utils/file/file.go b/src/framework/utils/file/file.go index d0a602ad..d1f90f01 100644 --- a/src/framework/utils/file/file.go +++ b/src/framework/utils/file/file.go @@ -177,13 +177,13 @@ func ReadUploadFileStream(filePath, headerRange string) (map[string]any, error) "range": "", "chunkSize": 0, "fileSize": 0, - "data": nil, + "data": []byte{}, } // 文件大小 fileSize := getFileSize(fileAsbPath) if fileSize <= 0 { - return result, nil + return result, fmt.Errorf("file does not exist") } result["fileSize"] = fileSize @@ -312,12 +312,12 @@ func CopyUploadFile(filePath, dst string) error { } defer src.Close() - if err := os.MkdirAll(filepath.Dir(dst), 0750); err != nil { + if err := os.MkdirAll(filepath.Dir(dst), 0775); err != nil { return err } // 如果目标文件已经存在,先将目标文件重命名 - if _, err := os.Stat(dst); err == nil { + if info, err := os.Stat(dst); err == nil && !info.IsDir() { ext := filepath.Ext(dst) name := dst[0 : len(dst)-len(ext)] newName := fmt.Sprintf("%s-%s%s", name, time.Now().Format("20060102_150405"), ext) diff --git a/src/framework/utils/file/json.go b/src/framework/utils/file/json.go index 88217c93..4421c2bf 100644 --- a/src/framework/utils/file/json.go +++ b/src/framework/utils/file/json.go @@ -16,7 +16,7 @@ func WriterFileJSON(data any, filePath string) error { dirPath := filepath.Dir(filePath) // 确保文件夹路径存在 - err := os.MkdirAll(dirPath, os.ModePerm) + err := os.MkdirAll(dirPath, 0775) if err != nil { logger.Errorf("CreateFile MkdirAll %v", err) } @@ -46,7 +46,7 @@ func WriterFileJSONLine(data []any, filePath string) error { dirPath := filepath.Dir(filePath) // 确保文件夹路径存在 - err := os.MkdirAll(dirPath, os.ModePerm) + err := os.MkdirAll(dirPath, 0775) if err != nil { logger.Errorf("CreateFile MkdirAll %v", err) } diff --git a/src/framework/utils/file/txt.go b/src/framework/utils/file/txt.go index d509fd82..e468a191 100644 --- a/src/framework/utils/file/txt.go +++ b/src/framework/utils/file/txt.go @@ -22,7 +22,7 @@ func WriterFileTXT(data [][]string, sep string, filePath string) error { dirPath := filepath.Dir(filePath) // 确保文件夹路径存在 - err := os.MkdirAll(dirPath, os.ModePerm) + err := os.MkdirAll(dirPath, 0775) if err != nil { logger.Errorf("CreateFile MkdirAll %v", err) } diff --git a/src/framework/utils/file/utils.go b/src/framework/utils/file/utils.go index fbb05fe8..eccf54c3 100644 --- a/src/framework/utils/file/utils.go +++ b/src/framework/utils/file/utils.go @@ -26,7 +26,7 @@ func transferToNewFile(file *multipart.FileHeader, dst string) error { } defer src.Close() - if err = os.MkdirAll(filepath.Dir(dst), 0750); err != nil { + if err = os.MkdirAll(filepath.Dir(dst), 0775); err != nil { return err } @@ -66,7 +66,7 @@ func mergeToNewFile(dirPath string, writePath string, fileName string) error { // 写入到新路径文件 newFilePath := filepath.Join(writePath, fileName) - if err = os.MkdirAll(filepath.Dir(newFilePath), 0750); err != nil { + if err = os.MkdirAll(filepath.Dir(newFilePath), 0775); err != nil { return err } diff --git a/src/framework/utils/machine/launch.go b/src/framework/utils/machine/launch.go new file mode 100644 index 00000000..ab680b41 --- /dev/null +++ b/src/framework/utils/machine/launch.go @@ -0,0 +1,178 @@ +package machine + +import ( + "encoding/json" + "fmt" + "hash/fnv" + "os" + "runtime" + "time" + + "be.ems/src/framework/constants/common" + "be.ems/src/framework/logger" + "be.ems/src/framework/utils/cmd" + "be.ems/src/framework/utils/crypto" + "be.ems/src/framework/utils/parse" +) + +// 机器的唯一标识符 +var Code string + +// 初始信息 +var LaunchInfo map[string]any + +// codeGenerate 生成机器的唯一标识符 +func codeGenerate() string { + var machineID string + + // 获取主机名 + hostname, err := os.Hostname() + if err != nil { + panic(err) + } + machineID += hostname + + // 获取 CPU 信息 + numCPU := runtime.NumCPU() + machineID += fmt.Sprintf("%d", numCPU) + + // 获取操作系统信息 + osInfo := runtime.GOOS + machineID += osInfo + + // 使用哈希函数生成机器码 + h := fnv.New32a() + h.Write([]byte(machineID)) + machineCode := h.Sum32() + + return fmt.Sprintf("%x", machineCode) +} + +// 网管本地路径 +func filePath() string { + filePath := "/usr/local/etc/omc/machine.ini" + if runtime.GOOS == "windows" { + filePath = fmt.Sprintf("C:%s", filePath) + } + return filePath +} + +// codeFileRead 读取机器保留的信息 +func codeFileRead() (map[string]any, error) { + var mapData map[string]any + // 读取文件内容 + bytes, err := os.ReadFile(filePath()) + if err != nil { + logger.Warnf("CodeFileRead ReadFile => %s", err.Error()) + return mapData, fmt.Errorf("not file") + } + content := string(bytes) + // 解密 + contentDe, err := crypto.StringDecryptByAES(content) + if err != nil { + logger.Errorf("CodeFileRead decrypt: %v", err.Error()) + return mapData, fmt.Errorf("decrypt fail") + } + // 序列化Map + mapData, err = parse.ConvertConfigToMap("json", string(contentDe)) + if err != nil { + logger.Warnf("NeConfPara5GRead ConvertConfigToMap => %s", err.Error()) + return mapData, fmt.Errorf("content error") + } + return mapData, nil +} + +// codeFileWrite 写入机器保留的信息 +func codeFileWrite(data map[string]any) error { + jsonByte, _ := json.Marshal(data) + // 加密 + contentEn, err := crypto.StringEncryptByAES(string(jsonByte)) + if err != nil { + logger.Errorf("insert encrypt: %v", err.Error()) + return fmt.Errorf("encrypt fail") + } + return parse.ConvertConfigToFile("txt", filePath(), contentEn) +} + +// Launch 记录首次安装启动初始信息 +func Launch() { + Code = codeGenerate() + // 检查文件是否存在 + if _, err := os.Stat(filePath()); err != nil { + LaunchInfo = map[string]any{ + "code": Code, // 机器码 + "useTime": time.Now().UnixMilli(), // 首次使用时间 + + common.LAUNCH_BOOTLOADER: true, // 启动引导 + common.LAUNCH_BOOTLOADER + "Time": 0, // 引导完成时间 + } + codeFileWrite(LaunchInfo) + } else { + // 读取记录文件 + data, err := codeFileRead() + if err != nil { + // 文件异常就重新生成 + os.Remove(filePath()) + Launch() + return + } + LaunchInfo = data + } +} + +// SetLaunchInfo 新增额外的初始信息 +func SetLaunchInfo(info map[string]any) error { + if info == nil { + return fmt.Errorf("not info") + } + + // 固定值禁止变更 + constKeys := []string{"code", "useTime"} + for k, v := range info { + constKey := false + for _, ck := range constKeys { + if ck == k { + constKey = true + break + } + } + if constKey { + continue + } else { + LaunchInfo[k] = v + } + } + return codeFileWrite(LaunchInfo) +} + +// Bootloader 启动引导标记 +func Bootloader(flag bool) error { + return SetLaunchInfo(map[string]any{ + common.LAUNCH_BOOTLOADER: flag, // 启动引导 true开 false关 + common.LAUNCH_BOOTLOADER + "Time": time.Now().UnixMilli(), // 引导完成时间 + }) +} + +// Reset 引导数据重置 +func Reset() error { + // 重置数据库 + if runtime.GOOS == "windows" { + // return fmt.Errorf("not support window") + } else { + // 重置数据库 + if _, err := cmd.Execf("sudo /usr/local/omc/bin/setomc.sh -m install"); err != nil { + return err + } + // 重启服务 + if _, err := cmd.Execf("nohup sh -c \"sleep 1s && %s\" > /dev/null 2>&1 &", "sudo systemctl restart restagent"); err != nil { + return err + } + } + + // 重置引导标记 + if err := Bootloader(true); err != nil { + return err + } + + return nil +} diff --git a/src/framework/utils/parse/parse.go b/src/framework/utils/parse/parse.go index ff8145c0..8eb27dcb 100644 --- a/src/framework/utils/parse/parse.go +++ b/src/framework/utils/parse/parse.go @@ -1,8 +1,11 @@ package parse import ( + "encoding/json" "fmt" "image/color" + "os" + "path/filepath" "reflect" "regexp" "strconv" @@ -10,6 +13,7 @@ import ( "time" "github.com/robfig/cron/v3" + "gopkg.in/yaml.v3" ) // Number 解析数值型 @@ -51,6 +55,8 @@ func Boolean(str any) bool { case float32, float64: num := reflect.ValueOf(str).Float() return num != 0 + case bool: + return str default: return false } @@ -165,3 +171,83 @@ func Color(colorStr string) *color.RGBA { A: 255, // 不透明 } } + +// ConvertIPMask 转换IP网络地址掩码 24 -> 255.255.255.0 +func ConvertIPMask(bits int64) string { + if bits < 0 || bits > 32 { + return "Invalid Mask Bits" + } + + // 构建一个32位的uint32类型掩码,指定前bits位为1,其余为0 + mask := uint32((1<>24), + fmt.Sprintf("%d", (mask>>16)&255), + fmt.Sprintf("%d", (mask>>8)&255), + fmt.Sprintf("%d", mask&255), + } + + // 将分组用点号连接起来形成掩码字符串 + return strings.Join(groups, ".") +} + +// ConvertConfigToMap 将配置内容转换为Map结构数据 +// +// configType 类型支持:txt json yaml yml +func ConvertConfigToMap(configType, content string) (map[string]any, error) { + // 类型支持:viper.SupportedExts + // config := viper.New() + // config.SetConfigType(configType) + // err := config.ReadConfig(bytes.NewBuffer([]byte(content))) + // return config.AllSettings(), err + + var configMap map[string]interface{} + var err error + if configType == "" || configType == "txt" { + configMap = map[string]interface{}{ + "txt": content, + } + } + if configType == "yaml" || configType == "yml" { + err = yaml.Unmarshal([]byte(content), &configMap) + } + if configType == "json" { + err = json.Unmarshal([]byte(content), &configMap) + } + return configMap, err +} + +// ConvertConfigToFile 将数据写入到指定文件内 +// +// configType 类型支持:txt json yaml yml +func ConvertConfigToFile(configType, filePath string, data any) error { + // viper.SupportedExts + // config := viper.New() + // config.SetConfigType(configType) + // for key, value := range mapData { + // config.Set(key, value) + // } + // return config.WriteConfigAs(filePath) + + var dataByte []byte + var err error + if configType == "" || configType == "txt" { + dataByte = []byte(data.(string)) + } + if configType == "yaml" || configType == "yml" { + dataByte, err = yaml.Marshal(data) + } + if configType == "json" { + dataByte, err = json.Marshal(data) + } + if err != nil { + return err + } + + if err := os.MkdirAll(filepath.Dir(filePath), 0775); err != nil { + return err + } + return os.WriteFile(filePath, dataByte, 0644) +} diff --git a/src/framework/utils/ssh/scp.go b/src/framework/utils/ssh/scp.go index 8151b3a4..33beb538 100644 --- a/src/framework/utils/ssh/scp.go +++ b/src/framework/utils/ssh/scp.go @@ -28,7 +28,7 @@ func FileSCPLocalToNe(neIp, localPath, nePath string) error { // 网元NE 远程文件复制到本地文件 func FileSCPNeToLocal(neIp, nePath, localPath string) error { // 确保文件夹路径存在 - if err := os.MkdirAll(filepath.Dir(localPath), 0750); err != nil { + if err := os.MkdirAll(filepath.Dir(localPath), 0775); err != nil { logger.Errorf("FileSCPNeToLocal MkdirAll err %v", err) return err } diff --git a/src/framework/utils/ssh/ssh.go b/src/framework/utils/ssh/ssh.go index 15423619..eaf5c3d9 100644 --- a/src/framework/utils/ssh/ssh.go +++ b/src/framework/utils/ssh/ssh.go @@ -6,12 +6,14 @@ import ( "io" "os" "os/user" + "path/filepath" "strings" "sync" "time" "be.ems/src/framework/logger" "be.ems/src/framework/utils/cmd" + gosftp "github.com/pkg/sftp" gossh "golang.org/x/crypto/ssh" ) @@ -133,8 +135,12 @@ func (c *ConnSSH) SendToAuthorizedKeys() error { return err } authorizedKeysEntry := fmt.Sprintln(strings.TrimSpace(publicKey)) - cmdStr := "echo '" + authorizedKeysEntry + "' >> ~/.ssh/authorized_keys" - _, err = c.RunCMD(cmdStr) + cmdStrArr := []string{ + fmt.Sprintf("sudo mkdir -p /home/%s/.ssh && sudo chown %s:%s /home/%s/.ssh && sudo chmod 700 /home/%s/.ssh", c.User, c.User, c.User, c.User, c.User), + fmt.Sprintf("sudo touch /home/%s/.ssh/authorized_keys && sudo chown %s:%s /home/%s/.ssh/authorized_keys && sudo chmod 600 /home/%s/.ssh/authorized_keys", c.User, c.User, c.User, c.User, c.User), + fmt.Sprintf("echo '%s' | sudo tee -a /home/%s/.ssh/authorized_keys", authorizedKeysEntry, c.User), + } + _, err = c.RunCMD(strings.Join(cmdStrArr, " && ")) if err != nil { logger.Errorf("SendAuthorizedKeys echo err %s", err.Error()) return err @@ -156,9 +162,8 @@ func (c *ConnSSH) CurrentUserRsaKey(publicKey bool) (string, error) { // 是否存在私钥并创建 keyPath := fmt.Sprintf("%s/.ssh/id_rsa", usr.HomeDir) if _, err := os.Stat(keyPath); err != nil { - _, err2 := cmd.ExecWithCheck("ssh-keygen", "-t", "rsa", "-P", "", "-f", keyPath) - if err2 != nil { - logger.Errorf("CurrentUserPrivateKey ssh-keygen [%s] rsa => %s", usr.Username, err2.Error()) + if _, err := cmd.ExecWithCheck("ssh-keygen", "-t", "rsa", "-P", "", "-f", keyPath); err != nil { + logger.Errorf("CurrentUserPrivateKey ssh-keygen [%s] rsa => %s", usr.Username, err.Error()) } } @@ -239,12 +244,11 @@ func (s *SSHClientSession) Write(cmd string) (int, error) { return s.Stdin.Write([]byte(cmd)) } -// Read 读取结果 等待一会才有结果 +// Read 读取结果 func (s *SSHClientSession) Read() []byte { if s.Stdout == nil { return []byte{} } - // time.Sleep(300 * time.Millisecond) bs := s.Stdout.Bytes() if len(bs) > 0 { s.Stdout.Reset() @@ -253,15 +257,6 @@ func (s *SSHClientSession) Read() []byte { return []byte{} } -// CombinedOutput 发送命令带结果返回 -func (s *SSHClientSession) CombinedOutput(cmd string) (string, error) { - n, err := s.Write(cmd) - if n == 0 || err != nil { - return "", err - } - return string(s.Read()), nil -} - // singleWriter SSH客户端会话消息 type singleWriter struct { b bytes.Buffer @@ -283,3 +278,208 @@ func (w *singleWriter) Reset() { defer w.mu.Unlock() w.b.Reset() } + +// NewClientSFTP 创建SSH客户端SFTP对象 +func (c *ConnSSH) NewClientSFTP() (*SSHClientSFTP, error) { + sftpClient, err := gosftp.NewClient(c.Client) + if err != nil { + logger.Errorf("NewClientSFTP failed to create sftp: => %s", err.Error()) + return nil, err + } + + return &SSHClientSFTP{ + Client: sftpClient, + }, nil +} + +// SSHClientSFTP SSH客户端SFTP对象 +type SSHClientSFTP struct { + Client *gosftp.Client +} + +// Close 关闭会话 +func (s *SSHClientSFTP) Close() { + if s.Client != nil { + s.Client.Close() + } +} + +// CopyDirRemoteToLocal 复制目录-远程到本地 +func (s *SSHClientSFTP) CopyDirRemoteToLocal(remoteDir, localDir string) error { + // 列出远程目录中的文件和子目录 + remoteFiles, err := s.Client.ReadDir(remoteDir) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to reading remote directory %s: => %s", remoteDir, err.Error()) + return err + } + + // 创建本地目录 + err = os.MkdirAll(localDir, 0775) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to creating local directory %s: => %s", localDir, err.Error()) + return err + } + + // 遍历远程文件和子目录并复制到本地 + for _, remoteFile := range remoteFiles { + remotePath := filepath.Join(remoteDir, remoteFile.Name()) + localPath := filepath.Join(localDir, remoteFile.Name()) + + if remoteFile.IsDir() { + // 如果是子目录,则递归复制子目录 + err = s.CopyDirRemoteToLocal(remotePath, localPath) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to copying remote directory %s: => %s", remotePath, err.Error()) + continue + } + } else { + // 如果是文件,则复制文件内容 + remoteFile, err := s.Client.Open(remotePath) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to opening remote file %s: => %s", remotePath, err.Error()) + continue + } + defer remoteFile.Close() + + localFile, err := os.Create(localPath) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to creating local file %s: => %s", localPath, err.Error()) + continue + } + defer localFile.Close() + + _, err = io.Copy(localFile, remoteFile) + if err != nil { + logger.Errorf("CopyDirRemoteToLocal failed to copying file contents from %s to %s: => %s", remotePath, localPath, err.Error()) + continue + } + } + } + return nil +} + +// CopyDirRemoteToLocal 复制目录-本地到远程 +func (s *SSHClientSFTP) CopyDirLocalToRemote(localDir, remoteDir string) error { + // 创建远程目录 + err := s.Client.MkdirAll(remoteDir) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to creating remote directory %s: => %s", remoteDir, err.Error()) + return err + } + + // 遍历本地目录中的文件和子目录并复制到远程 + err = filepath.Walk(localDir, func(localPath string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + // 生成远程路径 + remotePath := filepath.Join(remoteDir, localPath[len(localDir):]) + + if info.IsDir() { + // 如果是子目录,则创建远程目录 + err := s.Client.MkdirAll(remotePath) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to creating remote directory %s: => %s", remotePath, err.Error()) + return nil + } + } else { + // 如果是文件,则复制文件内容 + localFile, err := os.Open(localPath) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to opening local file %s: => %s", localPath, err.Error()) + return nil + } + defer localFile.Close() + + remoteFile, err := s.Client.Create(remotePath) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to creating remote file %s: => %s", remotePath, err.Error()) + return nil + } + defer remoteFile.Close() + + _, err = io.Copy(remoteFile, localFile) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to copying file contents from %s to %s: => %s", localPath, remotePath, err.Error()) + return nil + } + } + + return nil + }) + if err != nil { + logger.Errorf("CopyDirLocalToRemote failed to walking local directory: => %s", err.Error()) + return err + } + return nil +} + +// CopyDirRemoteToLocal 复制文件-远程到本地 +func (s *SSHClientSFTP) CopyFileRemoteToLocal(remotePath, localPath string) error { + // 打开远程文件 + remoteFile, err := s.Client.Open(remotePath) + if err != nil { + logger.Errorf("CopyFileRemoteToLocal failed to opening remote file: => %s", err.Error()) + return err + } + defer remoteFile.Close() + + if err := os.MkdirAll(filepath.Dir(localPath), 0775); err != nil { + return err + } + + // 如果目标文件已经存在,先将目标文件重命名 + // if info, err := os.Stat(localPath); err == nil && !info.IsDir() { + // ext := filepath.Ext(localPath) + // name := localPath[0 : len(localPath)-len(ext)] + // newName := fmt.Sprintf("%s-%s%s", name, time.Now().Format("20060102_150405"), ext) + // err := os.Rename(localPath, newName) + // if err != nil { + // return err + // } + // } + + // 创建本地文件 + localFile, err := os.Create(localPath) + if err != nil { + logger.Errorf("CopyFileRemoteToLocal failed to creating local file: => %s", err.Error()) + return err + } + defer localFile.Close() + + // 复制文件内容 + _, err = io.Copy(localFile, remoteFile) + if err != nil { + logger.Errorf("CopyFileRemoteToLocal failed to copying contents: => %s", err.Error()) + return err + } + return nil +} + +// CopyDirRemoteToLocal 复制文件-本地到远程 +func (s *SSHClientSFTP) CopyFileLocalToRemote(localPath, remotePath string) error { + // 打开本地文件 + localFile, err := os.Open(localPath) + if err != nil { + logger.Errorf("CopyFileLocalToRemote failed to opening local file: => %s", err.Error()) + return err + } + defer localFile.Close() + + // 创建远程文件 + remoteFile, err := s.Client.Create(remotePath) + if err != nil { + logger.Errorf("CopyFileLocalToRemote failed to creating remote file: => %s", err.Error()) + return err + } + defer remoteFile.Close() + + // 复制文件内容 + _, err = io.Copy(remoteFile, localFile) + if err != nil { + logger.Errorf("CopyFileLocalToRemote failed to copying contents: => %s", err.Error()) + return err + } + return nil +} diff --git a/src/framework/utils/telnet/telnet.go b/src/framework/utils/telnet/telnet.go index 651ede9d..078fd477 100644 --- a/src/framework/utils/telnet/telnet.go +++ b/src/framework/utils/telnet/telnet.go @@ -50,7 +50,13 @@ func (c *ConnTelnet) NewClient() (*ConnTelnet, error) { // fmt.Fprintln(client, c.User) // fmt.Fprintln(client, c.Password) + // 需要确保接收方理解并正确处理发送窗口大小设置命令 + client.Write([]byte{255, 251, 31}) // 发送窗口大小选项 + client.Write([]byte{255, 250, 31, 0, 128, 0, 120, 255, 240}) // 发送窗口行和列的大小 c.Client = &client + + // 排空连接登录的信息 + c.RunCMD("") return c, nil } @@ -70,32 +76,14 @@ func (c *ConnTelnet) RunCMD(cmd string) (string, error) { var buf bytes.Buffer tmp := make([]byte, 1024) - // 排空连接登录的信息 - for { - // 设置读取超时时间为100毫秒 - conn.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) - n, err := conn.Read(tmp) - if err != nil { - // 判断是否是超时错误 - if netErr, ok := err.(net.Error); ok && netErr.Timeout() { - break - } - break - } - if n == 0 { - break - } - buf.Write(tmp[:n]) - } - buf.Reset() - // 写入命令 - _, err := conn.Write([]byte(cmd)) - if err != nil { - return "", err + if cmd != "" { + if _, err := conn.Write([]byte(cmd)); err != nil { + return "", err + } } - // 读取本次响应命令消息 + // 读取命令消息 for { // 设置读取超时时间为1000毫秒 conn.SetReadDeadline(time.Now().Add(1000 * time.Millisecond)) @@ -119,35 +107,12 @@ func (c *ConnTelnet) RunCMD(cmd string) (string, error) { } // NewClient 创建Telnet客户端会话对象 -func (c *ConnTelnet) NewClientSession() (*TelnetClientSession, error) { +func (c *ConnTelnet) NewClientSession(cols, rows uint8) (*TelnetClientSession, error) { if c.Client == nil { return nil, fmt.Errorf("telnet client not connected") } - conn := *c.Client - - var buf bytes.Buffer - tmp := make([]byte, 1024) - // 排空连接登录的信息 - for { - // 设置读取超时时间为5毫秒 - conn.SetReadDeadline(time.Now().Add(5 * time.Millisecond)) - n, err := conn.Read(tmp) - if err != nil { - // 判断是否是超时错误 - if netErr, ok := err.(net.Error); ok && netErr.Timeout() { - break - } - break - } - if n == 0 { - break - } - buf.Write(tmp[:n]) - } - buf.Reset() - return &TelnetClientSession{ - Client: conn, + Client: *c.Client, }, nil } diff --git a/src/framework/utils/token/token.go b/src/framework/utils/token/token.go index 2a4fb060..b07879d6 100644 --- a/src/framework/utils/token/token.go +++ b/src/framework/utils/token/token.go @@ -11,6 +11,7 @@ import ( "be.ems/src/framework/logger" redisCahe "be.ems/src/framework/redis" "be.ems/src/framework/utils/generate" + "be.ems/src/framework/utils/machine" "be.ems/src/framework/vo" jwt "github.com/golang-jwt/jwt/v5" @@ -74,7 +75,7 @@ func Create(loginUser *vo.LoginUser, ilobArgs ...string) string { // 生成令牌设置密钥 secret := config.Get("jwt.secret").(string) - tokenStr, err := jwtToken.SignedString([]byte(secret)) + tokenStr, err := jwtToken.SignedString([]byte(machine.Code + "@" + secret)) if err != nil { logger.Infof("jwt sign err : %v", err) return "" @@ -118,7 +119,7 @@ func Verify(tokenString string) (jwt.MapClaims, error) { // 判断加密算法是预期的加密算法 if _, ok := token.Method.(*jwt.SigningMethodHMAC); ok { secret := config.Get("jwt.secret").(string) - return []byte(secret), nil + return []byte(machine.Code + "@" + secret), nil } return nil, jwt.ErrSignatureInvalid }) diff --git a/src/modules/common/common.go b/src/modules/common/common.go index b25d8e08..bb6c68b0 100644 --- a/src/modules/common/common.go +++ b/src/modules/common/common.go @@ -25,6 +25,14 @@ func Setup(router *gin.Engine) { // 系统可暴露的配置信息 indexGroup.GET("/sys-conf", controller.NewCommont.SysConfig) + // 系统引导初始化 + guideGroup := router.Group("/bootloader") + { + guideGroup.POST("", controller.NewBootloader.Start) + guideGroup.PUT("", middleware.PreAuthorize(nil), controller.NewBootloader.Done) + guideGroup.DELETE("", middleware.PreAuthorize(nil), controller.NewBootloader.Reset) + guideGroup.PUT("/account", middleware.PreAuthorize(nil), controller.NewBootloader.Account) + } // 验证码操作处理 indexGroup.GET("/captchaImage", diff --git a/src/modules/common/controller/bootloader.go b/src/modules/common/controller/bootloader.go new file mode 100644 index 00000000..daa12daa --- /dev/null +++ b/src/modules/common/controller/bootloader.go @@ -0,0 +1,181 @@ +package controller + +import ( + adminConstants "be.ems/src/framework/constants/admin" + "be.ems/src/framework/constants/common" + tokenConstants "be.ems/src/framework/constants/token" + "be.ems/src/framework/i18n" + "be.ems/src/framework/utils/ctx" + "be.ems/src/framework/utils/machine" + "be.ems/src/framework/utils/regular" + tokenUtils "be.ems/src/framework/utils/token" + "be.ems/src/framework/vo" + "be.ems/src/framework/vo/result" + commonService "be.ems/src/modules/common/service" + systemService "be.ems/src/modules/system/service" + "github.com/gin-gonic/gin" +) + +// 实例化控制层 BootloaderController 结构体 +var NewBootloader = &BootloaderController{ + accountService: commonService.NewAccountImpl, + sysUserService: systemService.NewSysUserImpl, +} + +// 系统引导初始化 +// +// PATH /bootloader +type BootloaderController struct { + // 账号身份操作服务 + accountService commonService.IAccount + // 用户信息服务 + sysUserService systemService.ISysUser +} + +// 首次引导开始 +// +// POST / +func (s *BootloaderController) Start(c *gin.Context) { + // 是否完成引导 + launchInfo := machine.LaunchInfo + if launchInfo == nil { + c.JSON(200, result.Err(nil)) + return + } + if v, ok := launchInfo[common.LAUNCH_BOOTLOADER]; ok && !v.(bool) { + c.JSON(200, result.ErrMsg("bootloader done")) + return + } + + // 查询用户登录账号 + sysUser := s.sysUserService.SelectUserById("1") + if sysUser.UserID != "1" { + c.JSON(200, result.ErrMsg("not found user data")) + return + } + + // 登录用户信息 + loginUser := vo.LoginUser{ + UserID: sysUser.UserID, + DeptID: sysUser.DeptID, + User: sysUser, + Permissions: []string{adminConstants.PERMISSION}, + } + + // 当前请求信息 + ipaddr, location := ctx.IPAddrLocation(c) + os, browser := ctx.UaOsBrowser(c) + + // 生成令牌,创建系统访问记录 + tokenStr := tokenUtils.Create(&loginUser, ipaddr, location, os, browser) + if tokenStr == "" { + c.JSON(200, result.Err(nil)) + return + } else { + s.accountService.UpdateLoginDateAndIP(&loginUser) + } + + c.JSON(200, result.OkData(map[string]any{ + tokenConstants.RESPONSE_FIELD: tokenStr, + })) +} + +// 首次引导完成 +// +// PUT / +func (s *BootloaderController) Done(c *gin.Context) { + // 是否完成引导 + launchInfo := machine.LaunchInfo + if launchInfo == nil { + c.JSON(200, result.Err(nil)) + return + } + if v, ok := launchInfo[common.LAUNCH_BOOTLOADER]; ok && !v.(bool) { + c.JSON(200, result.ErrMsg("bootloader done")) + return + } + + // 标记引导完成 + if err := machine.Bootloader(false); err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + + // 清除授权信息 + tokenUtils.Remove(ctx.Authorization(c)) + c.JSON(200, result.Ok(nil)) +} + +// 引导系统数据重置 +// +// DELETE / +func (s *BootloaderController) Reset(c *gin.Context) { + // 是否完成引导 + launchInfo := machine.LaunchInfo + if launchInfo == nil { + c.JSON(200, result.Err(nil)) + return + } + if v, ok := launchInfo[common.LAUNCH_BOOTLOADER]; ok && v.(bool) { + c.JSON(200, result.ErrMsg("bootloader not done")) + return + } + + if err := machine.Reset(); err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + + // 清除授权信息 + tokenUtils.Remove(ctx.Authorization(c)) + c.JSON(200, result.Ok(nil)) +} + +// 账号变更 +// +// PUT /account +func (s *BootloaderController) Account(c *gin.Context) { + language := ctx.AcceptLanguage(c) + var body struct { + UserName string `json:"username" binding:"required"` + Password string `json:"password" binding:"required"` + } + if err := c.ShouldBindJSON(&body); err != nil { + c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) + return + } + + if !regular.ValidPassword(body.Password) { + // 登录密码至少包含大小写字母、数字、特殊符号,且不少于6位 + c.JSON(200, result.ErrMsg(i18n.TKey(language, "user.errPasswd"))) + return + } + + // 是否完成引导 + launchInfo := machine.LaunchInfo + if launchInfo == nil { + c.JSON(200, result.Err(nil)) + return + } + if v, ok := launchInfo[common.LAUNCH_BOOTLOADER]; ok && !v.(bool) { + c.JSON(200, result.ErrMsg("bootloader done")) + return + } + + // 查询用户登录账号 + sysUser := s.sysUserService.SelectUserById("2") + if sysUser.UserID != "2" { + c.JSON(200, result.ErrMsg("not found user data")) + return + } + sysUser.UserName = body.UserName + sysUser.NickName = body.UserName + sysUser.Password = body.Password + sysUser.UpdateBy = ctx.LoginUserToUserName(c) + rows := s.sysUserService.UpdateUser(sysUser) + if rows > 0 { + c.JSON(200, result.Ok(nil)) + return + } + c.JSON(200, result.Err(nil)) +} diff --git a/src/modules/common/controller/file.go b/src/modules/common/controller/file.go index 35062434..6dc67b7d 100644 --- a/src/modules/common/controller/file.go +++ b/src/modules/common/controller/file.go @@ -43,13 +43,6 @@ func (s *FileController) Download(c *gin.Context) { return } routerPath := string(decodedBytes) - // 地址文件名截取 - fileName := routerPath[strings.LastIndex(routerPath, "/")+1:] - - // 响应头 - c.Writer.Header().Set("Content-Disposition", `attachment; filename="`+url.QueryEscape(fileName)+`"`) - c.Writer.Header().Set("Accept-Ranges", "bytes") - c.Writer.Header().Set("Content-Type", "application/octet-stream") // 断点续传 headerRange := c.GetHeader("Range") @@ -58,6 +51,12 @@ func (s *FileController) Download(c *gin.Context) { c.JSON(200, result.ErrMsg(err.Error())) return } + + // 响应头 + c.Writer.Header().Set("Content-Disposition", `attachment; filename="`+url.QueryEscape(filepath.Base(routerPath))+`"`) + c.Writer.Header().Set("Accept-Ranges", "bytes") + c.Writer.Header().Set("Content-Type", "application/octet-stream") + if headerRange != "" { c.Writer.Header().Set("Content-Range", fmt.Sprint(resultMap["range"])) c.Writer.Header().Set("Content-Length", fmt.Sprint(resultMap["chunkSize"])) @@ -65,7 +64,6 @@ func (s *FileController) Download(c *gin.Context) { } else { c.Writer.Header().Set("Content-Length", fmt.Sprint(resultMap["fileSize"])) c.Status(200) - } c.Writer.Write(resultMap["data"].([]byte)) } @@ -222,7 +220,7 @@ func (s *CommontController) TransferStaticFile(c *gin.Context) { delPrefix := strings.Replace(body.StaticPath, static["prefix"].(string), "", 1) staticPath := strings.Replace(delPrefix, "{language}", lang, 1) - newFile := fmt.Sprintf("%s%s", dir, staticPath) + newFile := filepath.ToSlash(fmt.Sprintf("%s%s", dir, staticPath)) err = file.CopyUploadFile(body.UploadPath, newFile) if err != nil { diff --git a/src/modules/common/service/commont.impl.go b/src/modules/common/service/commont.impl.go index 6273ab33..10ad3f8c 100644 --- a/src/modules/common/service/commont.impl.go +++ b/src/modules/common/service/commont.impl.go @@ -5,6 +5,8 @@ import ( "be.ems/lib/global" "be.ems/src/framework/config" + "be.ems/src/framework/constants/common" + "be.ems/src/framework/utils/machine" systemService "be.ems/src/modules/system/service" ) @@ -29,6 +31,17 @@ func (s *CommontImpl) SystemConfigInfo() map[string]string { infoMap["version"] = global.Version infoMap["buildTime"] = global.BuildTime infoMap["goVer"] = global.GoVer + // 系统首次使用标记 + launchInfo := machine.LaunchInfo + if launchInfo != nil { + if v, ok := launchInfo[common.LAUNCH_BOOTLOADER]; ok { + infoMap[common.LAUNCH_BOOTLOADER] = fmt.Sprint(v) + } else { + infoMap[common.LAUNCH_BOOTLOADER] = "true" + } + } else { + infoMap[common.LAUNCH_BOOTLOADER] = "true" + } // 序列号 infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn")) // 获取LOGO类型 diff --git a/src/modules/network_element/controller/ne_action.go b/src/modules/network_element/controller/ne_action.go index 783e3c07..f38e68ab 100644 --- a/src/modules/network_element/controller/ne_action.go +++ b/src/modules/network_element/controller/ne_action.go @@ -155,3 +155,52 @@ func (s *NeActionController) Files(c *gin.Context) { "rows": splitRows, })) } + +// 网元服务操作 +// +// PUT /service +func (s *NeActionController) Service(c *gin.Context) { + language := ctx.AcceptLanguage(c) + var body struct { + NeType string `json:"neType" binding:"required"` + NeID string `json:"neId" binding:"required"` + Action string `json:"action" binding:"required,oneof=start restart stop reboot poweroff"` // 操作行为 + } + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { + c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) + return + } + + // 查询网元获取IP + neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(body.NeType, body.NeID) + if neInfo.NeId != body.NeID || neInfo.IP == "" { + c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) + return + } + + neTypeLower := strings.ToLower(neInfo.NeType) + cmdStr := fmt.Sprintf("sudo service %s %s", neTypeLower, body.Action) + if neTypeLower == "omc" { + cmdStr = fmt.Sprintf("nohup sh -c \"sudo systemctl stop restagent && sleep 5s && sudo systemctl %s restagent\" > /dev/null 2>&1 &", body.Action) + } else if neTypeLower == "ims" { + if body.Action == "restart" { + cmdStr = "sudo ims-stop || true && sudo ims-start" + } else { + cmdStr = fmt.Sprintf("sudo ims-%s", body.Action) + } + } + + if body.Action == "reboot" { + cmdStr = "sudo shutdown -r now" + } + if body.Action == "poweroff" { + cmdStr = "sudo shutdown -h now" + } + + _, err := s.neInfoService.NeRunCMD(body.NeType, body.NeID, cmdStr) + if err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + c.JSON(200, result.Ok(nil)) +} diff --git a/src/modules/network_element/controller/ne_host.go b/src/modules/network_element/controller/ne_host.go index 7baca4bd..9336733a 100644 --- a/src/modules/network_element/controller/ne_host.go +++ b/src/modules/network_element/controller/ne_host.go @@ -167,8 +167,7 @@ func (s *NeHostController) Remove(c *gin.Context) { func (s *NeHostController) Test(c *gin.Context) { language := ctx.AcceptLanguage(c) var body model.NeHost - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil { + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } @@ -176,8 +175,13 @@ func (s *NeHostController) Test(c *gin.Context) { if body.HostType == "ssh" { var connSSH ssh.ConnSSH body.CopyTo(&connSSH) - - client, err := connSSH.NewClient() + var client *ssh.ConnSSH + var err error + if body.AuthMode == "2" { + client, err = connSSH.NewClientByLocalPrivate() + } else { + client, err = connSSH.NewClient() + } if err != nil { // 连接主机失败,请检查连接参数后重试 c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo"))) @@ -199,7 +203,12 @@ func (s *NeHostController) Test(c *gin.Context) { return } defer client.Close() - c.JSON(200, result.Ok(nil)) + if strings.HasSuffix(client.LastResult, ">") || strings.HasSuffix(client.LastResult, "> ") || strings.HasSuffix(client.LastResult, "# ") { + c.JSON(200, result.Ok(nil)) + } else { + // 连接主机失败,请检查连接参数后重试 + c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo"))) + } return } } @@ -213,8 +222,7 @@ func (s *NeHostController) Cmd(c *gin.Context) { HostID string `json:"hostId" binding:"required"` // 主机ID Cmd string `json:"cmd" binding:"required"` // 执行命令 } - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil { + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } @@ -230,8 +238,13 @@ func (s *NeHostController) Cmd(c *gin.Context) { if neHost.HostType == "ssh" { var connSSH ssh.ConnSSH neHost.CopyTo(&connSSH) - - client, err := connSSH.NewClient() + var client *ssh.ConnSSH + var err error + if neHost.AuthMode == "2" { + client, err = connSSH.NewClientByLocalPrivate() + } else { + client, err = connSSH.NewClient() + } if err != nil { // 连接主机失败,请检查连接参数后重试 c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo"))) @@ -278,17 +291,21 @@ func (s *NeHostController) Cmd(c *gin.Context) { func (s *NeHostController) CheckBySSH(c *gin.Context) { language := ctx.AcceptLanguage(c) var body model.NeHost - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil { + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } var connSSH ssh.ConnSSH body.CopyTo(&connSSH) - // 创建链接SSH客户端 - client, err := connSSH.NewClient() + var client *ssh.ConnSSH + var err error + if body.AuthMode == "2" { + client, err = connSSH.NewClientByLocalPrivate() + } else { + client, err = connSSH.NewClient() + } if err != nil { // 连接主机失败,请检查连接参数后重试 c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo"))) @@ -339,18 +356,22 @@ func (s *NeHostController) CheckBySSH(c *gin.Context) { } // 本地免密创建链接直连 - lcoalConnSSH := ssh.ConnSSH{ - User: body.User, - Addr: body.Addr, - Port: body.Port, - } - lcoalClient, err := lcoalConnSSH.NewClientByLocalPrivate() - if err == nil { + if body.AuthMode == "2" { data["sshLink"] = true } else { - data["sshLink"] = false + lcoalConnSSH := ssh.ConnSSH{ + User: body.User, + Addr: body.Addr, + Port: body.Port, + } + lcoalClient, err := lcoalConnSSH.NewClientByLocalPrivate() + if err == nil { + data["sshLink"] = true + defer lcoalClient.Close() + } else { + data["sshLink"] = false + } } - defer lcoalClient.Close() c.JSON(200, result.OkData(data)) } @@ -361,8 +382,7 @@ func (s *NeHostController) CheckBySSH(c *gin.Context) { func (s *NeHostController) AuthorizedBySSH(c *gin.Context) { language := ctx.AcceptLanguage(c) var body model.NeHost - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil { + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil || body.AuthMode == "2" { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } @@ -377,8 +397,8 @@ func (s *NeHostController) AuthorizedBySSH(c *gin.Context) { lcoalClient, err := lcoalConnSSH.NewClientByLocalPrivate() if err == nil { sshLink = true + defer lcoalClient.Close() } - defer lcoalClient.Close() if sshLink { // 连接主机成功,无需重复免密授权认证 c.JSON(200, result.OkMsg(i18n.TKey(language, "neHost.okBySSHLink"))) diff --git a/src/modules/network_element/controller/ne_info.go b/src/modules/network_element/controller/ne_info.go index 55c10c3f..177a19b2 100644 --- a/src/modules/network_element/controller/ne_info.go +++ b/src/modules/network_element/controller/ne_info.go @@ -17,15 +17,21 @@ import ( // 实例化控制层 NeInfoController 结构体 var NewNeInfo = &NeInfoController{ - neInfoService: neService.NewNeInfoImpl, + neInfoService: neService.NewNeInfoImpl, + neLicenseService: neService.NewNeLicenseImpl, + neVersionService: neService.NewNeVersionImpl, } // 网元信息请求 // -// PATH / +// PATH /info type NeInfoController struct { // 网元信息服务 neInfoService neService.INeInfo + // 网元授权激活信息服务 + neLicenseService neService.INeLicense + // 网元版本信息服务 + neVersionService neService.INeVersion } // neStateCacheMap 网元状态缓存最后一次成功的信息 @@ -114,7 +120,8 @@ func (s *NeInfoController) ListAll(c *gin.Context) { var querys struct { NeType string `form:"neType"` NeId string `form:"neId"` - BandStatus string `form:"bandStatus"` + BandStatus bool `form:"bandStatus"` + BandHost bool `form:"bandHost"` } if err := c.ShouldBindQuery(&querys); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) @@ -129,8 +136,7 @@ func (s *NeInfoController) ListAll(c *gin.Context) { if querys.NeId != "" { ne.NeId = querys.NeId } - bandStatus := parse.Boolean(querys.BandStatus) - neList := s.neInfoService.SelectList(ne, bandStatus) + neList := s.neInfoService.SelectList(ne, querys.BandStatus, querys.BandHost) if len(neList) == 0 { c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) return @@ -138,53 +144,74 @@ func (s *NeInfoController) ListAll(c *gin.Context) { c.JSON(200, result.OkData(neList)) } -// 网元端配置文件读取 +// 网元端Para5G配置文件读取 // -// GET /configFile -func (s *NeInfoController) ConfigFileRead(c *gin.Context) { +// GET /para5GFile +func (s *NeInfoController) Para5GFileRead(c *gin.Context) { + data, err := s.neInfoService.NeConfPara5GRead() + if err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + c.JSON(200, result.OkData(data)) +} + +// 网元端Para5G配置文件写入 +// +// PUT /para5GFile +func (s *NeInfoController) Para5GFileWrite(c *gin.Context) { + language := ctx.AcceptLanguage(c) + var body struct { + Content map[string]any `json:"content" binding:"required"` // 内容 + SyncNE []string `json:"syncNe"` // 同步到网元 + } + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { + c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) + return + } + + err := s.neInfoService.NeConfPara5GWirte(body.Content, body.SyncNE) + if err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + c.JSON(200, result.Ok(nil)) +} + +// 网元端OAM配置文件读取 +// +// GET /oamFile +func (s *NeInfoController) OAMFileRead(c *gin.Context) { language := ctx.AcceptLanguage(c) var querys struct { - NeType string `form:"neType" binding:"required"` - NeID string `form:"neId" binding:"required"` - FilePath string `form:"filePath"` // 不带文件路径时进行复制覆盖本地网元配置目录 + NeType string `form:"neType" binding:"required"` + NeID string `form:"neId" binding:"required"` } if err := c.ShouldBindQuery(&querys); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } - // 查询网元获取IP - neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(querys.NeType, querys.NeID) - if neInfo.NeId != querys.NeID || neInfo.IP == "" { - c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) + data, err := s.neInfoService.NeConfOAMRead(querys.NeType, querys.NeID) + if err != nil { + c.JSON(200, result.ErrMsg(err.Error())) return } - - data := s.neInfoService.NeConfigFileRead(neInfo, querys.FilePath) - if querys.FilePath == "" { - c.JSON(200, result.OkData(data)) - return - } - if len(data) > 0 { - c.JSON(200, result.OkData(data[0])) - return - } - c.JSON(200, result.ErrMsg("no data")) + c.JSON(200, result.OkData(data)) } -// 网元端配置文件写入 +// 网元端OAM配置文件写入 // -// PUT /configFile -func (s *NeInfoController) ConfigFileWrite(c *gin.Context) { +// PUT /oamFile +func (s *NeInfoController) OAMFileWrite(c *gin.Context) { language := ctx.AcceptLanguage(c) var body struct { - NeType string `json:"neType" binding:"required"` - NeID string `json:"neId" binding:"required"` - FilePath string `json:"filePath" binding:"required"` - Content string `json:"content" binding:"required"` - Sync bool `json:"sync"` + NeType string `json:"neType" binding:"required"` + NeID string `json:"neId" binding:"required"` + Content map[string]any `json:"content" binding:"required"` // 内容 + Sync bool `json:"sync"` // 同步到网元 } - if err := c.ShouldBindJSON(&body); err != nil { + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } @@ -196,7 +223,7 @@ func (s *NeInfoController) ConfigFileWrite(c *gin.Context) { return } - err := s.neInfoService.NeConfigFileWirte(neInfo, body.FilePath, body.Content, body.Sync) + err := s.neInfoService.NeConfOAMSync(neInfo, body.Content, body.Sync) if err != nil { c.JSON(200, result.ErrMsg(err.Error())) return @@ -260,22 +287,53 @@ func (s *NeInfoController) Add(c *gin.Context) { } // 获取网元状态是否正常 - _, err = neService.NeState(body) + body.ServerState, err = neService.NeState(body) if err != nil { - body.Status = "1" + body.Status = "0" } else { // 下发网管配置信息给网元 _, err = neService.NeConfigOMC(body) if err == nil { - body.Status = "0" + body.Status = "1" } else { - body.Status = "3" + body.Status = "2" } } + loginUserName := ctx.LoginUserToUserName(c) + // 新增Version信息 + neVersion := model.NeVersion{ + NeType: body.NeType, + NeId: body.NeId, + CreateBy: loginUserName, + } + // 新增License信息 + neLicense := model.NeLicense{ + NeType: body.NeType, + NeId: body.NeId, + CreateBy: loginUserName, + } + + // 已有网元可获取的信息 + if body.ServerState != nil { + if v, ok := body.ServerState["version"]; ok && v != nil { + neVersion.Version = v.(string) + } + if v, ok := body.ServerState["sn"]; ok && v != nil { + neLicense.SerialNum = v.(string) + } + if v, ok := body.ServerState["expire"]; ok && v != nil { + neLicense.ExpiryDate = v.(string) + neLicense.Status = "1" + } + } + + s.neVersionService.Insert(neVersion) + s.neLicenseService.Insert(neLicense) + body.CreateBy = loginUserName insertId := s.neInfoService.Insert(body) if insertId != "" { - c.JSON(200, result.Ok(nil)) + c.JSON(200, result.OkData(insertId)) return } c.JSON(200, result.Err(nil)) @@ -294,8 +352,8 @@ func (s *NeInfoController) Edit(c *gin.Context) { } // 检查属性值唯一 - uniqueHostCmd := s.neInfoService.CheckUniqueNeTypeAndNeId(body.NeType, body.NeId, body.ID) - if !uniqueHostCmd { + uniqueInfo := s.neInfoService.CheckUniqueNeTypeAndNeId(body.NeType, body.NeId, body.ID) + if !uniqueInfo { // 网元信息操作【%s】失败,同类型下标识已存在 msg := i18n.TTemplate(language, "neInfo.errKeyExists", map[string]any{"key": body.NeId}) c.JSON(200, result.ErrMsg(msg)) @@ -309,21 +367,64 @@ func (s *NeInfoController) Edit(c *gin.Context) { c.JSON(200, result.ErrMsg(i18n.TKey(language, "neInfo.noData"))) return } + // 赋予主机ID + if neInfo.HostIDs != "" && len(body.Hosts) > 0 { + hostIDs := strings.Split(neInfo.HostIDs, ",") + for index, id := range hostIDs { + body.Hosts[index].HostID = id + } + } // 获取网元状态是否正常 - _, err = neService.NeState(body) + body.ServerState, err = neService.NeState(body) if err != nil { - body.Status = "1" + body.Status = "0" } else { // 下发网管配置信息给网元 _, err = neService.NeConfigOMC(body) if err == nil { - body.Status = "0" + body.Status = "1" } else { - body.Status = "3" + body.Status = "2" } } + loginUserName := ctx.LoginUserToUserName(c) + neLicense := s.neLicenseService.SelectByNeTypeAndNeID(neInfo.NeType, neInfo.NeId) + neVersion := s.neVersionService.SelectByNeTypeAndNeID(neInfo.NeType, neInfo.NeId) + + // 已有网元可获取的信息 + if body.ServerState != nil { + if v, ok := body.ServerState["version"]; ok && v != nil { + neVersion.Version = v.(string) + neVersion.UpdateBy = loginUserName + } + if v, ok := body.ServerState["sn"]; ok && v != nil { + neLicense.SerialNum = v.(string) + } + if v, ok := body.ServerState["expire"]; ok && v != nil { + neLicense.ExpiryDate = v.(string) + neLicense.Status = "1" + neLicense.UpdateBy = loginUserName + } + } + + if neVersion.ID != "" { + if neVersion.NeType != body.NeType || neVersion.NeId != body.NeId { + neVersion.NeType = body.NeType + neVersion.NeId = body.NeId + } + s.neVersionService.Update(neVersion) + } + if neLicense.ID != "" { + if neLicense.NeType != body.NeType || neLicense.NeId != body.NeId { + neLicense.NeType = body.NeType + neLicense.NeId = body.NeId + } + s.neLicenseService.Update(neLicense) + } + + body.UpdateBy = loginUserName rows := s.neInfoService.Update(body) if rows > 0 { c.JSON(200, result.Ok(nil)) diff --git a/src/modules/network_element/controller/ne_license.go b/src/modules/network_element/controller/ne_license.go index 7022df85..d503b8db 100644 --- a/src/modules/network_element/controller/ne_license.go +++ b/src/modules/network_element/controller/ne_license.go @@ -2,11 +2,9 @@ package controller import ( "fmt" - "strings" "be.ems/src/framework/i18n" "be.ems/src/framework/utils/ctx" - "be.ems/src/framework/utils/parse" "be.ems/src/framework/vo/result" "be.ems/src/modules/network_element/model" neService "be.ems/src/modules/network_element/service" @@ -37,6 +35,14 @@ func (s *NeLicenseController) List(c *gin.Context) { querys := ctx.QueryMap(c) data := s.neLicenseService.SelectPage(querys) + // 过滤屏蔽授权文件 + rows := data["rows"].([]model.NeLicense) + arr := &rows + for i := range *arr { + (*arr)[i].ActivationRequestCode = "-" + (*arr)[i].LicensePath = "-" + } + c.JSON(200, result.Ok(data)) } @@ -61,109 +67,28 @@ func (s *NeLicenseController) Info(c *gin.Context) { c.JSON(200, result.OkData(neLicense)) } -// 网元授权激活信息新增 +// 网元neType和neID查询 // -// POST / -func (s *NeLicenseController) Add(c *gin.Context) { +// GET /byTypeAndID +func (s *NeLicenseController) NeTypeAndID(c *gin.Context) { language := ctx.AcceptLanguage(c) - var body model.NeLicense - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.ID != "" { + var querys struct { + NeType string `form:"neType" binding:"required"` + NeId string `form:"neId" binding:"required"` + } + if err := c.ShouldBindQuery(&querys); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } - // 查询网元获取IP - neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(body.NeType, body.NeId) - if neInfo.NeId != body.NeId || neInfo.IP == "" { - c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) - return - } - - // 检查属性值唯一 - uniqueInfo := s.neLicenseService.CheckUniqueTypeAndID(neInfo.NeType, neInfo.NeId, "") - if !uniqueInfo { - // 网元授权激活操作【%s】失败,网元类型信息已存在 - msg := i18n.TTemplate(language, "neLicense.errKeyExists", map[string]any{"name": neInfo.NeType}) - c.JSON(200, result.ErrMsg(msg)) - return - } - - // 读取授权码 - code, _ := s.neLicenseService.ReadLicenseInfo(neInfo) - body.ActivationRequestCode = code - - body.CreateBy = ctx.LoginUserToUserName(c) - insertId := s.neLicenseService.Insert(body) - if insertId != "" { - c.JSON(200, result.Ok(nil)) - return - } - c.JSON(200, result.Err(nil)) -} - -// 网元授权激活信息修改 -// -// PUT / -func (s *NeLicenseController) Edit(c *gin.Context) { - language := ctx.AcceptLanguage(c) - var body model.NeLicense - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.ID == "" { - c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) - return - } - - // 检查属性值唯一 - uniqueInfo := s.neLicenseService.CheckUniqueTypeAndID(body.NeType, body.NeId, body.ID) - if !uniqueInfo { - // 网元授权激活操作【%s】失败,网元类型信息已存在 - msg := i18n.TTemplate(language, "neLicense.errKeyExists", map[string]any{"name": body.NeType}) - c.JSON(200, result.ErrMsg(msg)) - return - } - - // 检查是否存在 - neLicense := s.neLicenseService.SelectById(body.ID) - if neLicense.ID != body.ID { + neLicense := s.neLicenseService.SelectByNeTypeAndNeID(querys.NeType, querys.NeId) + if neLicense.NeId != querys.NeId { // 没有可访问网元授权激活数据! c.JSON(200, result.ErrMsg(i18n.TKey(language, "neLicense.noData"))) return } - body.UpdateBy = ctx.LoginUserToUserName(c) - rows := s.neLicenseService.Update(body) - if rows > 0 { - c.JSON(200, result.Ok(nil)) - return - } - c.JSON(200, result.Err(nil)) -} - -// 网元授权激活信息删除 -// -// DELETE /:licenseIds -func (s *NeLicenseController) Remove(c *gin.Context) { - language := ctx.AcceptLanguage(c) - licenseIds := c.Param("licenseIds") - if licenseIds == "" { - c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(licenseIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - c.JSON(200, result.Err(nil)) - return - } - rows, err := s.neLicenseService.DeleteByIds(uniqueIDs) - if err != nil { - c.JSON(200, result.ErrMsg(i18n.TKey(language, err.Error()))) - return - } - msg := i18n.TTemplate(language, "app.common.deleteSuccess", map[string]any{"num": rows}) - c.JSON(200, result.OkMsg(msg)) + c.JSON(200, result.OkData(neLicense)) } // 网元授权激活授权申请码 @@ -180,15 +105,8 @@ func (s *NeLicenseController) Code(c *gin.Context) { return } - // 查询网元获取IP - neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(querys.NeType, querys.NeId) - if neInfo.NeId != querys.NeId || neInfo.IP == "" { - c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) - return - } - // 检查是否存在授权记录 - neLicense := s.neLicenseService.SelectByNeTypeAndNeID(neInfo.NeType, neInfo.NeId) + neLicense := s.neLicenseService.SelectByNeTypeAndNeID(querys.NeType, querys.NeId) if neLicense.NeId != querys.NeId { // 没有可访问网元授权激活数据! c.JSON(200, result.ErrMsg(i18n.TKey(language, "neLicense.noData"))) @@ -196,7 +114,7 @@ func (s *NeLicenseController) Code(c *gin.Context) { } // 更新授权码 - code, licensePath := s.neLicenseService.ReadLicenseInfo(neInfo) + code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense) neLicense.ActivationRequestCode = code if licensePath != "" { neLicense.LicensePath = licensePath @@ -218,7 +136,7 @@ func (s *NeLicenseController) Change(c *gin.Context) { language := ctx.AcceptLanguage(c) var body model.NeLicense err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.HostId == "" { + if err != nil || body.LicensePath == "" { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } @@ -226,23 +144,30 @@ func (s *NeLicenseController) Change(c *gin.Context) { // 检查是否存在授权记录 neLicense := s.neLicenseService.SelectByNeTypeAndNeID(body.NeType, body.NeId) if neLicense.NeId != body.NeId { - body.Status = "0" - body.CreateBy = ctx.LoginUserToUserName(c) - body.ID = s.neLicenseService.Insert(body) - } else { - neLicense.LicensePath = body.LicensePath - neLicense.Status = "0" - neLicense.UpdateBy = ctx.LoginUserToUserName(c) - s.neLicenseService.Update(neLicense) - } - - // 进行上传替换 - err = s.neLicenseService.UploadToNeHost(body) - if err != nil { - c.JSON(200, result.ErrMsg(err.Error())) + // 没有可访问网元授权激活数据! + c.JSON(200, result.ErrMsg(i18n.TKey(language, "neLicense.noData"))) return } - c.JSON(200, result.Ok(nil)) + + // 更新授权记录 + if body.Remark != "" { + neLicense.Remark = body.Remark + } + neLicense.LicensePath = body.LicensePath + neLicense.Status = "0" + neLicense.UpdateBy = ctx.LoginUserToUserName(c) + upRows := s.neLicenseService.Update(neLicense) + if upRows > 0 { + // 进行上传替换 + err = s.neLicenseService.UploadLicense(body) + if err != nil { + c.JSON(200, result.ErrMsg(err.Error())) + return + } + c.JSON(200, result.Ok(nil)) + return + } + c.JSON(200, result.Err(nil)) } // 网元授权激活状态 @@ -259,43 +184,41 @@ func (s *NeLicenseController) State(c *gin.Context) { return } - // 查询网元获取IP - neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(querys.NeType, querys.NeId) - if neInfo.NeId != querys.NeId || neInfo.IP == "" { - c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) - return - } - // 检查是否存在授权记录 - neLicense := s.neLicenseService.SelectByNeTypeAndNeID(neInfo.NeType, neInfo.NeId) + neLicense := s.neLicenseService.SelectByNeTypeAndNeID(querys.NeType, querys.NeId) if neLicense.NeId != querys.NeId { // 没有可访问网元授权激活数据! c.JSON(200, result.ErrMsg(i18n.TKey(language, "neLicense.noData"))) return } - // 查询网元状态 - neState, err := neService.NeState(neInfo) - if err != nil { - c.JSON(200, result.ErrMsg("network element service anomaly")) + // 查询网元获取IP获取网元状态 + neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID(neLicense.NeType, neLicense.NeId) + if neInfo.NeId != neLicense.NeId || neInfo.IP == "" { + c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo"))) return } + if neState, err := neService.NeState(neInfo); err == nil { + neLicense.Status = "1" + neLicense.SerialNum = fmt.Sprint(neState["sn"]) + neLicense.ExpiryDate = fmt.Sprint(neState["expire"]) + code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense) + neLicense.ActivationRequestCode = code + neLicense.LicensePath = licensePath + } else { + neLicense.Status = "0" + } // 更新授权信息 - neLicense.SerialNum = fmt.Sprint(neState["sn"]) - neLicense.ExpiryDate = fmt.Sprint(neState["expire"]) - code, licensePath := s.neLicenseService.ReadLicenseInfo(neInfo) - neLicense.ActivationRequestCode = code - neLicense.LicensePath = licensePath - neLicense.Status = "1" neLicense.UpdateBy = ctx.LoginUserToUserName(c) - rows := s.neLicenseService.Update(neLicense) - if rows > 0 { + s.neLicenseService.Update(neLicense) + + if neLicense.Status == "1" { c.JSON(200, result.OkData(map[string]string{ "sn": neLicense.SerialNum, "expire": neLicense.ExpiryDate, })) return } - c.JSON(200, result.Err(nil)) + c.JSON(200, result.ErrMsg(fmt.Sprintf("%s service status exception", neLicense.NeType))) } diff --git a/src/modules/network_element/controller/ne_software.go b/src/modules/network_element/controller/ne_software.go index 03d1614c..d5658d7c 100644 --- a/src/modules/network_element/controller/ne_software.go +++ b/src/modules/network_element/controller/ne_software.go @@ -69,15 +69,26 @@ func (s *NeSoftwareController) Add(c *gin.Context) { return } - // 检查属性值唯一 - uniqueSoftware := s.neSoftwareService.CheckUniqueTypeAndNameAndVersion(body.NeType, body.Name, body.Version, "") - if !uniqueSoftware { - // 网元软件包操作【%s】失败,网元类型与文件名版本已存在 - msg := i18n.TTemplate(language, "neSoftware.errKeyExists", map[string]any{"name": body.Name}) - c.JSON(200, result.ErrMsg(msg)) - return + // 找到已存在的删除后重新添加 + neSoftwares := s.neSoftwareService.SelectList(model.NeSoftware{ + NeType: body.NeType, + Name: body.Name, + Version: body.Version, + }) + if len(neSoftwares) > 0 { + neSoftware := neSoftwares[0] + s.neSoftwareService.DeleteByIds([]string{neSoftware.ID}) } + // 检查属性值唯一 + // uniqueSoftware := s.neSoftwareService.CheckUniqueTypeAndNameAndVersion(body.NeType, body.Name, body.Version, "") + // if !uniqueSoftware { + // // 网元软件包操作【%s】失败,网元类型与文件名版本已存在 + // msg := i18n.TTemplate(language, "neSoftware.errKeyExists", map[string]any{"name": body.Name}) + // c.JSON(200, result.ErrMsg(msg)) + // return + // } + body.CreateBy = ctx.LoginUserToUserName(c) insertId := s.neSoftwareService.Insert(body) if insertId != "" { @@ -151,40 +162,32 @@ func (s *NeSoftwareController) Remove(c *gin.Context) { c.JSON(200, result.OkMsg(msg)) } -// 网元软件包安装检查 +// 网元软件包设为网元新版本 // -// POST /checkInstall -func (s *NeSoftwareController) CheckInstall(c *gin.Context) { +// POST /newNeVersion +func (s *NeSoftwareController) NewNeVersion(c *gin.Context) { language := ctx.AcceptLanguage(c) var body model.NeSoftware err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.HostId == "" { + if err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } - // 检查是否存在软件包记录 + // 找到已存在的软件包信息 neSoftwares := s.neSoftwareService.SelectList(model.NeSoftware{ NeType: body.NeType, Name: body.Name, Version: body.Version, }) - if len(neSoftwares) <= 0 { - body.CreateBy = ctx.LoginUserToUserName(c) - body.ID = s.neSoftwareService.Insert(body) - } else { + if len(neSoftwares) > 0 { neSoftware := neSoftwares[0] - neSoftware.Path = body.Path - neSoftware.Description = body.Description - neSoftware.UpdateBy = ctx.LoginUserToUserName(c) - s.neSoftwareService.Update(neSoftware) - } - - // 进行安装检查 - cmdStrArr, err := s.neSoftwareService.UploadToNeHost(body) - if err != nil { - c.JSON(200, result.ErrMsg(err.Error())) + s.neSoftwareService.UpdateVersions(neSoftware, model.NeVersion{ + NeType: neSoftware.NeType, + UpdateBy: ctx.LoginUserToUserName(c), + }) + c.JSON(200, result.Ok(nil)) return } - c.JSON(200, result.OkData(cmdStrArr)) + c.JSON(200, result.Err(nil)) } diff --git a/src/modules/network_element/controller/ne_version.go b/src/modules/network_element/controller/ne_version.go index 5fab991e..94bc2d80 100644 --- a/src/modules/network_element/controller/ne_version.go +++ b/src/modules/network_element/controller/ne_version.go @@ -1,13 +1,9 @@ package controller import ( - "strings" - "be.ems/src/framework/i18n" "be.ems/src/framework/utils/ctx" - "be.ems/src/framework/utils/parse" "be.ems/src/framework/vo/result" - "be.ems/src/modules/network_element/model" neService "be.ems/src/modules/network_element/service" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" @@ -57,96 +53,34 @@ func (s *NeVersionController) Info(c *gin.Context) { c.JSON(200, result.OkData(neVersion)) } -// 网元版本信息新增 +// 网元版本操作 // -// POST / -func (s *NeVersionController) Add(c *gin.Context) { +// POST /operate +func (s *NeVersionController) Operate(c *gin.Context) { language := ctx.AcceptLanguage(c) - var body model.NeVersion - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.ID != "" { + var body struct { + Action string `json:"action" binding:"required,oneof=install upgrade rollback"` // 操作行为 + NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型 + NeId string `json:"neId" gorm:"ne_id" binding:"required"` // 网元ID + Preinput map[string]string `json:"preinput" ` // 预先输入参数 + } + if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil { c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) return } - // 检查属性值唯一 - uniqueInfo := s.neVersionService.CheckUniqueTypeAndID(body.NeType, body.NeId, "") - if !uniqueInfo { - // 网元版本操作【%s】失败,网元类型信息已存在 - msg := i18n.TTemplate(language, "neVersion.errKeyExists", map[string]any{"name": body.NeType}) - c.JSON(200, result.ErrMsg(msg)) - return - } - - body.CreateBy = ctx.LoginUserToUserName(c) - insertId := s.neVersionService.Insert(body) - if insertId != "" { - c.JSON(200, result.Ok(nil)) - return - } - c.JSON(200, result.Err(nil)) -} - -// 网元版本信息修改 -// -// PUT / -func (s *NeVersionController) Edit(c *gin.Context) { - language := ctx.AcceptLanguage(c) - var body model.NeVersion - err := c.ShouldBindBodyWith(&body, binding.JSON) - if err != nil || body.ID == "" { - c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) - return - } - - // 检查属性值唯一 - uniqueInfo := s.neVersionService.CheckUniqueTypeAndID(body.NeType, body.NeId, body.ID) - if !uniqueInfo { - // 网元版本操作【%s】失败,网元类型信息已存在 - msg := i18n.TTemplate(language, "neVersion.errKeyExists", map[string]any{"name": body.NeType}) - c.JSON(200, result.ErrMsg(msg)) - return - } - - // 检查是否存在 - neVersion := s.neVersionService.SelectById(body.ID) - if neVersion.ID != body.ID { + neVersion := s.neVersionService.SelectByNeTypeAndNeID(body.NeType, body.NeId) + if neVersion.NeId != body.NeId { // 没有可访问网元版本数据! c.JSON(200, result.ErrMsg(i18n.TKey(language, "neVersion.noData"))) return } - body.UpdateBy = ctx.LoginUserToUserName(c) - rows := s.neVersionService.Update(body) - if rows > 0 { - c.JSON(200, result.Ok(nil)) - return - } - c.JSON(200, result.Err(nil)) -} - -// 网元版本信息删除 -// -// DELETE /:versionIds -func (s *NeVersionController) Remove(c *gin.Context) { - language := ctx.AcceptLanguage(c) - versionIds := c.Param("versionIds") - if versionIds == "" { - c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400"))) - return - } - // 处理字符转id数组后去重 - ids := strings.Split(versionIds, ",") - uniqueIDs := parse.RemoveDuplicates(ids) - if len(uniqueIDs) <= 0 { - c.JSON(200, result.Err(nil)) - return - } - rows, err := s.neVersionService.DeleteByIds(uniqueIDs) + // 进行相关命令操作 + output, err := s.neVersionService.Operate(body.Action, neVersion, body.Preinput) if err != nil { c.JSON(200, result.ErrMsg(i18n.TKey(language, err.Error()))) return } - msg := i18n.TTemplate(language, "app.common.deleteSuccess", map[string]any{"num": rows}) - c.JSON(200, result.OkMsg(msg)) + c.JSON(200, result.OkData(output)) } diff --git a/src/modules/network_element/model/ne_host.go b/src/modules/network_element/model/ne_host.go index a479635b..ba7362b2 100644 --- a/src/modules/network_element/model/ne_host.go +++ b/src/modules/network_element/model/ne_host.go @@ -11,7 +11,7 @@ type NeHost struct { Addr string `json:"addr" gorm:"column:addr" binding:"required"` // 主机地址 Port int64 `json:"port" gorm:"column:port" binding:"required,number,max=65535,min=1"` // SSH端口 User string `json:"user" gorm:"column:user" binding:"required"` // 主机用户名 - AuthMode string `json:"authMode" gorm:"column:auth_mode" binding:"oneof=0 1"` // 认证模式(0密码 1主机私钥) + AuthMode string `json:"authMode" gorm:"column:auth_mode" binding:"oneof=0 1 2"` // 认证模式(0密码 1主机私钥 2已免密) Password string `json:"password" gorm:"column:password"` // 认证密码 PrivateKey string `json:"privateKey" gorm:"column:private_key"` // 认证私钥 PassPhrase string `json:"passPhrase" gorm:"column:pass_phrase"` // 认证私钥密码 diff --git a/src/modules/network_element/model/ne_info.go b/src/modules/network_element/model/ne_info.go index c08e71a0..373df591 100644 --- a/src/modules/network_element/model/ne_info.go +++ b/src/modules/network_element/model/ne_info.go @@ -2,21 +2,25 @@ package model // NeInfo 网元信息对象 ne_info type NeInfo struct { - ID string `json:"id"` - NeType string `json:"neType" binding:"required"` - NeId string `json:"neId" binding:"required"` - RmUID string `json:"rmUid"` - NeName string `json:"neName"` - IP string `json:"ip" binding:"required"` - Port int64 `json:"port" binding:"required,number,max=65535,min=1"` - PvFlag string `json:"pvFlag" binding:"oneof=PNF VNF"` // enum('PNF','VNF') - Province string `json:"province"` - VendorName string `json:"vendorName"` - Dn string `json:"dn"` - NeAddress string `json:"neAddress"` - Status string `json:"status"` // 0: 在线 1: 下线 2: 备用 3: 待下发配置 - UpdateTime string `json:"updateTime"` - HostIDs string `json:"hostIds"` // 网元主机ID组 数据格式(ssh,telnet,telnet) + ID string `json:"id" gorm:"id"` + NeType string `json:"neType" gorm:"ne_type" binding:"required"` + NeId string `json:"neId" gorm:"ne_id" binding:"required"` + RmUID string `json:"rmUid" gorm:"rm_uid"` + NeName string `json:"neName" gorm:"ne_name"` + IP string `json:"ip" gorm:"ip" binding:"required"` + Port int64 `json:"port" gorm:"port" binding:"required,number,max=65535,min=1"` + PvFlag string `json:"pvFlag" gorm:"pv_flag" binding:"oneof=PNF VNF"` // ''PNF'',''VNF'' + Province string `json:"province" gorm:"province"` // 省份地域 + VendorName string `json:"vendorName" gorm:"vendor_name"` + Dn string `json:"dn" gorm:"dn"` + NeAddress string `json:"neAddress" gorm:"ne_address"` // MAC地址 + HostIDs string `json:"hostIds" gorm:"host_ids"` // 网元主机ID组 数据格式(ssh,telnet,telnet) + Status string `json:"status" gorm:"status"` // 0离线 1在线 2配置待下发 + Remark string `json:"remark" gorm:"remark"` // 备注 + CreateBy string `json:"createBy" gorm:"create_by"` // 创建者 + CreateTime int64 `json:"createTime" gorm:"create_time"` // 创建时间 + UpdateBy string `json:"updateBy" gorm:"update_by"` // 更新者 + UpdateTime int64 `json:"updateTime" gorm:"update_time"` // 更新时间 // ====== 非数据库字段属性 ====== diff --git a/src/modules/network_element/model/ne_license.go b/src/modules/network_element/model/ne_license.go index 2f202bc6..0a08802c 100644 --- a/src/modules/network_element/model/ne_license.go +++ b/src/modules/network_element/model/ne_license.go @@ -9,7 +9,7 @@ type NeLicense struct { LicensePath string `json:"licensePath" gorm:"license_path"` // 激活授权文件 SerialNum string `json:"serialNum" gorm:"serial_num"` // 序列号 ExpiryDate string `json:"expiryDate" gorm:"expiry_date"` // 许可证到期日期 - Status string `json:"status" gorm:"status"` // 状态 ''ACTIVE'',''INACTIVE'',''PENDING'' + Status string `json:"status" gorm:"status"` // 状态 0无效 1有效 Remark string `json:"remark" gorm:"remark"` // 备注 CreateBy string `json:"createBy" gorm:"create_by"` // 创建者 CreateTime int64 `json:"createTime" gorm:"create_time"` // 创建时间 @@ -18,8 +18,7 @@ type NeLicense struct { // ====== 非数据库字段属性 ====== - Reload bool `json:"reload,omitempty" gorm:"-"` // 刷新重启网元 - HostId string `json:"hostId,omitempty" gorm:"-"` // 已记录的主机ID + Reload bool `json:"reload,omitempty" gorm:"-"` // 刷新重启网元 } // TableName 表名称 diff --git a/src/modules/network_element/model/ne_software.go b/src/modules/network_element/model/ne_software.go index d0166163..3eaf9569 100644 --- a/src/modules/network_element/model/ne_software.go +++ b/src/modules/network_element/model/ne_software.go @@ -15,7 +15,7 @@ type NeSoftware struct { // ====== 非数据库字段属性 ====== - HostId string `json:"hostId,omitempty" gorm:"-"` // 已记录的主机ID + NeId string `json:"neId,omitempty" gorm:"-"` // 网元ID } // TableName 表名称 diff --git a/src/modules/network_element/model/ne_version.go b/src/modules/network_element/model/ne_version.go index 50f21cc2..ddde0af0 100644 --- a/src/modules/network_element/model/ne_version.go +++ b/src/modules/network_element/model/ne_version.go @@ -5,13 +5,16 @@ type NeVersion struct { ID string `json:"id" gorm:"id"` NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型 NeId string `json:"neId" gorm:"ne_id" binding:"required"` // 网元ID + Name string `json:"name" gorm:"name"` // 当前包名 Version string `json:"version" gorm:"version" binding:"required"` // 当前版本 Path string `json:"path" gorm:"path" binding:"required"` // 当前软件包 + PreName string `json:"preName" gorm:"pre_name"` // 上一版本包名 PreVersion string `json:"preVersion" gorm:"pre_version"` // 上一版本 PrePath string `json:"prePath" gorm:"pre_path"` // 上一版本软件包 - NewVersion string `json:"newVersion" gorm:"new_version"` // 下一版本 - NewPath string `json:"newPath" gorm:"new_path"` // 下一版本软件包 - Status string `json:"status" gorm:"status"` // 当前状态 (Uploaded下一版本上传 Inactive下一版本待激活 Active当前已激活) + NewName string `json:"newName" gorm:"new_name"` // 新版本包名 + NewVersion string `json:"newVersion" gorm:"new_version"` // 新版本 + NewPath string `json:"newPath" gorm:"new_path"` // 新版本软件包 + Status string `json:"status" gorm:"status"` // 当前状态 1当前版本 2上一版本 3有新版本 CreateBy string `json:"createBy" gorm:"column:create_by"` // 创建者 CreateTime int64 `json:"createTime" gorm:"column:create_time"` // 创建时间 UpdateBy string `json:"updateBy" gorm:"column:update_by"` // 更新者 diff --git a/src/modules/network_element/network_element.go b/src/modules/network_element/network_element.go index e8776157..e44c612a 100644 --- a/src/modules/network_element/network_element.go +++ b/src/modules/network_element/network_element.go @@ -36,6 +36,11 @@ func Setup(router *gin.Engine) { collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neAction", collectlogs.BUSINESS_TYPE_IMPORT)), controller.NewNeAction.PushFile, ) + neActionGroup.PUT("/service", + middleware.PreAuthorize(nil), + collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neAction", collectlogs.BUSINESS_TYPE_OTHER)), + controller.NewNeAction.Service, + ) } // 网元信息 @@ -53,13 +58,23 @@ func Setup(router *gin.Engine) { middleware.PreAuthorize(nil), controller.NewNeInfo.ListAll, ) - neInfoGroup.GET("/configFile", + neInfoGroup.GET("/para5GFile", middleware.PreAuthorize(nil), - controller.NewNeInfo.ConfigFileRead, + controller.NewNeInfo.Para5GFileRead, ) - neInfoGroup.PUT("/configFile", + neInfoGroup.PUT("/para5GFile", middleware.PreAuthorize(nil), - controller.NewNeInfo.ConfigFileWrite, + collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neInfo", collectlogs.BUSINESS_TYPE_OTHER)), + controller.NewNeInfo.Para5GFileWrite, + ) + neInfoGroup.GET("/oamFile", + middleware.PreAuthorize(nil), + controller.NewNeInfo.OAMFileRead, + ) + neInfoGroup.PUT("/oamFile", + middleware.PreAuthorize(nil), + collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neInfo", collectlogs.BUSINESS_TYPE_OTHER)), + controller.NewNeInfo.OAMFileWrite, ) neInfoGroup.GET("/list", middleware.PreAuthorize(nil), @@ -173,20 +188,10 @@ func Setup(router *gin.Engine) { middleware.PreAuthorize(nil), controller.NewNeVersion.Info, ) - neVersionGroup.POST("", + neVersionGroup.POST("/operate", middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neVersion", collectlogs.BUSINESS_TYPE_INSERT)), - controller.NewNeVersion.Add, - ) - neVersionGroup.PUT("", - middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neVersion", collectlogs.BUSINESS_TYPE_UPDATE)), - controller.NewNeVersion.Edit, - ) - neVersionGroup.DELETE("/:versionIds", - middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neVersion", collectlogs.BUSINESS_TYPE_DELETE)), - controller.NewNeVersion.Remove, + collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neVersion", collectlogs.BUSINESS_TYPE_OTHER)), + controller.NewNeVersion.Operate, ) } @@ -216,10 +221,10 @@ func Setup(router *gin.Engine) { collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neSoftware", collectlogs.BUSINESS_TYPE_DELETE)), controller.NewNeSoftware.Remove, ) - neSoftwareGroup.POST("/checkInstall", + neSoftwareGroup.POST("/newNeVersion", middleware.PreAuthorize(nil), collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neSoftware", collectlogs.BUSINESS_TYPE_OTHER)), - controller.NewNeSoftware.CheckInstall, + controller.NewNeSoftware.NewNeVersion, ) } @@ -234,20 +239,9 @@ func Setup(router *gin.Engine) { middleware.PreAuthorize(nil), controller.NewNeLicense.Info, ) - neLicenseGroup.POST("", + neLicenseGroup.GET("/byTypeAndID", middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neLicense", collectlogs.BUSINESS_TYPE_INSERT)), - controller.NewNeLicense.Add, - ) - neLicenseGroup.PUT("", - middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neLicense", collectlogs.BUSINESS_TYPE_UPDATE)), - controller.NewNeLicense.Edit, - ) - neLicenseGroup.DELETE("/:licenseIds", - middleware.PreAuthorize(nil), - collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neLicense", collectlogs.BUSINESS_TYPE_DELETE)), - controller.NewNeLicense.Remove, + controller.NewNeLicense.NeTypeAndID, ) neLicenseGroup.GET("/code", middleware.PreAuthorize(nil), @@ -378,4 +372,8 @@ func InitLoad() { // 启动时,清除缓存-网元类型 service.NewNeInfoImpl.ClearNeCacheByNeType("*") service.NewNeInfoImpl.SelectNeInfoByRmuid("") + // 启动时,网元公共参数数据记录到全局变量 + if para5GMap, err := service.NewNeInfoImpl.NeConfPara5GRead(); para5GMap != nil && err == nil { + service.NewNeInfoImpl.NeConfPara5GWirte(para5GMap, nil) + } } diff --git a/src/modules/network_element/repository/ne_host.impl.go b/src/modules/network_element/repository/ne_host.impl.go index 156b5709..fdc9f030 100644 --- a/src/modules/network_element/repository/ne_host.impl.go +++ b/src/modules/network_element/repository/ne_host.impl.go @@ -175,21 +175,21 @@ func (r *NeHostImpl) SelectByIds(hostIds []string) []model.NeHost { for i := range *arr { passwordDe, err := crypto.StringDecryptByAES((*arr)[i].Password) if err != nil { - logger.Errorf("selectById %s StringDecryptByAES : %v", (*arr)[i].HostID, err.Error()) + logger.Errorf("selectById %s decrypt: %v", (*arr)[i].HostID, err.Error()) (*arr)[i].Password = "" } else { (*arr)[i].Password = passwordDe } privateKeyDe, err := crypto.StringDecryptByAES((*arr)[i].PrivateKey) if err != nil { - logger.Errorf("selectById %s StringDecryptByAES : %v", (*arr)[i].HostID, err.Error()) + logger.Errorf("selectById %s decrypt: %v", (*arr)[i].HostID, err.Error()) (*arr)[i].PrivateKey = "" } else { (*arr)[i].PrivateKey = privateKeyDe } passPhraseDe, err := crypto.StringDecryptByAES((*arr)[i].PassPhrase) if err != nil { - logger.Errorf("selectById %s StringDecryptByAES : %v", (*arr)[i].HostID, err.Error()) + logger.Errorf("selectById %s decrypt: %v", (*arr)[i].HostID, err.Error()) (*arr)[i].PassPhrase = "" } else { (*arr)[i].PassPhrase = passPhraseDe @@ -265,7 +265,7 @@ func (r *NeHostImpl) Insert(neHost model.NeHost) string { if neHost.Password != "" { passwordEn, err := crypto.StringEncryptByAES(neHost.Password) if err != nil { - logger.Errorf("insert StringEncryptByAES : %v", err.Error()) + logger.Errorf("insert encrypt: %v", err.Error()) return "" } params["password"] = passwordEn @@ -273,7 +273,7 @@ func (r *NeHostImpl) Insert(neHost model.NeHost) string { if neHost.PrivateKey != "" { privateKeyEn, err := crypto.StringEncryptByAES(neHost.PrivateKey) if err != nil { - logger.Errorf("insert StringEncryptByAES : %v", err.Error()) + logger.Errorf("insert encrypt: %v", err.Error()) return "" } params["private_key"] = privateKeyEn @@ -281,7 +281,7 @@ func (r *NeHostImpl) Insert(neHost model.NeHost) string { if neHost.PassPhrase != "" { passPhraseEn, err := crypto.StringEncryptByAES(neHost.PassPhrase) if err != nil { - logger.Errorf("insert StringEncryptByAES : %v", err.Error()) + logger.Errorf("insert encrypt: %v", err.Error()) return "" } params["pass_phrase"] = passPhraseEn @@ -294,6 +294,20 @@ func (r *NeHostImpl) Insert(neHost model.NeHost) string { params["create_time"] = time.Now().UnixMilli() } + // 根据认证模式清除不必要的信息 + if neHost.AuthMode == "0" { + params["private_key"] = "" + params["pass_phrase"] = "" + } + if neHost.AuthMode == "1" { + params["password"] = "" + } + if neHost.AuthMode == "2" { + params["password"] = "" + params["private_key"] = "" + params["pass_phrase"] = "" + } + // 构建执行语句 keys, placeholder, values := repo.KeyPlaceholderValueByInsert(params) sql := "insert into ne_host (" + strings.Join(keys, ",") + ")values(" + placeholder + ")" @@ -349,7 +363,7 @@ func (r *NeHostImpl) Update(neHost model.NeHost) int64 { if neHost.Password != "" { passwordEn, err := crypto.StringEncryptByAES(neHost.Password) if err != nil { - logger.Errorf("update StringEncryptByAES : %v", err.Error()) + logger.Errorf("update encrypt: %v", err.Error()) return 0 } params["password"] = passwordEn @@ -357,7 +371,7 @@ func (r *NeHostImpl) Update(neHost model.NeHost) int64 { if neHost.PrivateKey != "" { privateKeyEn, err := crypto.StringEncryptByAES(neHost.PrivateKey) if err != nil { - logger.Errorf("update StringEncryptByAES : %v", err.Error()) + logger.Errorf("update encrypt: %v", err.Error()) return 0 } params["private_key"] = privateKeyEn @@ -365,7 +379,7 @@ func (r *NeHostImpl) Update(neHost model.NeHost) int64 { if neHost.PassPhrase != "" { passPhraseEn, err := crypto.StringEncryptByAES(neHost.PassPhrase) if err != nil { - logger.Errorf("update StringEncryptByAES : %v", err.Error()) + logger.Errorf("update encrypt: %v", err.Error()) return 0 } params["pass_phrase"] = passPhraseEn @@ -376,6 +390,20 @@ func (r *NeHostImpl) Update(neHost model.NeHost) int64 { params["update_time"] = time.Now().UnixMilli() } + // 根据认证模式清除不必要的信息 + if neHost.AuthMode == "0" { + params["private_key"] = "" + params["pass_phrase"] = "" + } + if neHost.AuthMode == "1" { + params["password"] = "" + } + if neHost.AuthMode == "2" { + params["password"] = "" + params["private_key"] = "" + params["pass_phrase"] = "" + } + // 构建执行语句 keys, values := repo.KeyValueByUpdate(params) sql := "update ne_host set " + strings.Join(keys, ",") + " where host_id = ?" diff --git a/src/modules/network_element/repository/ne_info.impl.go b/src/modules/network_element/repository/ne_info.impl.go index 85fdea50..631a7e6a 100644 --- a/src/modules/network_element/repository/ne_info.impl.go +++ b/src/modules/network_element/repository/ne_info.impl.go @@ -16,25 +16,26 @@ import ( // neListSort 网元列表预设排序 var neListSort = []string{ "OMC", - "MME", + "IMS", "AMF", "AUSF", "UDM", "SMF", "PCF", - "UPF", - "NRF", "NSSF", - "IMS", - "N3IWF", - "NEF", + "NRF", + "UPF", "LMF", + "NEF", + "MME", + "N3IWF", "MOCNGW", + "SMSC", } // 实例化数据层 NeInfoImpl 结构体 var NewNeInfoImpl = &NeInfoImpl{ - selectSql: `select id, ne_type, ne_id, rm_uid, ne_name, ip, port, pv_flag, province, vendor_name, dn, ne_address, status, update_time, host_ids from ne_info`, + selectSql: `select id, ne_type, ne_id, rm_uid, ne_name, ip, port, pv_flag, province, vendor_name, dn, ne_address, host_ids, status, remark, create_by, create_time, update_by, update_time from ne_info`, resultMap: map[string]string{ "id": "ID", @@ -49,9 +50,13 @@ var NewNeInfoImpl = &NeInfoImpl{ "vendor_name": "VendorName", "dn": "Dn", "ne_address": "NeAddress", - "status": "Status", - "update_time": "UpdateTime", "host_ids": "HostIDs", + "status": "Status", + "remark": "Remark", + "create_by": "CreateBy", + "create_time": "CreateTime", + "update_by": "UpdateBy", + "update_time": "UpdateTime", }, } @@ -298,11 +303,19 @@ func (r *NeInfoImpl) Insert(neInfo model.NeInfo) string { if neInfo.NeAddress != "" { params["ne_address"] = neInfo.NeAddress } - params["status"] = neInfo.Status - params["update_time"] = time.Now() if neInfo.HostIDs != "" { params["host_ids"] = neInfo.HostIDs } + if neInfo.Status != "" { + params["status"] = neInfo.Status + } + if neInfo.Remark != "" { + params["remark"] = neInfo.Remark + } + if neInfo.CreateBy != "" { + params["create_by"] = neInfo.CreateBy + params["create_time"] = time.Now().UnixMilli() + } // 构建执行语句 keys, placeholder, values := repo.KeyPlaceholderValueByInsert(params) @@ -360,11 +373,17 @@ func (r *NeInfoImpl) Update(neInfo model.NeInfo) int64 { params["vendor_name"] = neInfo.VendorName params["dn"] = neInfo.Dn params["ne_address"] = neInfo.NeAddress - params["status"] = neInfo.Status - params["update_time"] = time.Now() if neInfo.HostIDs != "" { params["host_ids"] = neInfo.HostIDs } + params["remark"] = neInfo.Remark + if neInfo.Status != "" { + params["status"] = neInfo.Status + } + if neInfo.UpdateBy != "" { + params["update_by"] = neInfo.UpdateBy + params["update_time"] = time.Now().UnixMilli() + } // 构建执行语句 keys, values := repo.KeyValueByUpdate(params) diff --git a/src/modules/network_element/repository/ne_license.go b/src/modules/network_element/repository/ne_license.go index c185d67e..83cc42ac 100644 --- a/src/modules/network_element/repository/ne_license.go +++ b/src/modules/network_element/repository/ne_license.go @@ -21,7 +21,4 @@ type INeLicense interface { // DeleteByIds 批量删除信息 DeleteByIds(ids []string) int64 - - // CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 - CheckUniqueTypeAndID(neLicense model.NeLicense) string } diff --git a/src/modules/network_element/repository/ne_license.impl.go b/src/modules/network_element/repository/ne_license.impl.go index fcbb1f0d..0daee946 100644 --- a/src/modules/network_element/repository/ne_license.impl.go +++ b/src/modules/network_element/repository/ne_license.impl.go @@ -1,7 +1,6 @@ package repository import ( - "fmt" "strings" "time" @@ -177,41 +176,6 @@ func (r *NeLicenseImpl) SelectByIds(cmdIds []string) []model.NeLicense { return r.convertResultRows(results) } -// CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 -func (r *NeLicenseImpl) CheckUniqueTypeAndID(neLicense model.NeLicense) string { - // 查询条件拼接 - var conditions []string - var params []any - if neLicense.NeType != "" { - conditions = append(conditions, "ne_type = ?") - params = append(params, neLicense.NeType) - } - if neLicense.NeId != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, neLicense.NeId) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select id as 'str' from ne_license " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - logger.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - // Insert 新增信息 func (r *NeLicenseImpl) Insert(neLicense model.NeLicense) string { // 参数拼接 diff --git a/src/modules/network_element/repository/ne_software.impl.go b/src/modules/network_element/repository/ne_software.impl.go index 133dd420..5aa8cda6 100644 --- a/src/modules/network_element/repository/ne_software.impl.go +++ b/src/modules/network_element/repository/ne_software.impl.go @@ -61,8 +61,17 @@ func (r *NeSoftwareImpl) SelectPage(query map[string]any) map[string]any { var conditions []string var params []any if v, ok := query["neType"]; ok && v != "" { - conditions = append(conditions, "ne_type = ?") - params = append(params, strings.Trim(v.(string), " ")) + softwareType := v.(string) + if strings.Contains(softwareType, ",") { + softwareTypeArr := strings.Split(softwareType, ",") + placeholder := repo.KeyPlaceholderByQuery(len(softwareTypeArr)) + conditions = append(conditions, "ne_type in ("+placeholder+")") + parameters := repo.ConvertIdsSlice(softwareTypeArr) + params = append(params, parameters...) + } else { + conditions = append(conditions, "ne_type = ?") + params = append(params, strings.Trim(softwareType, " ")) + } } if v, ok := query["name"]; ok && v != "" { conditions = append(conditions, "name like concat(?, '%')") diff --git a/src/modules/network_element/repository/ne_version.go b/src/modules/network_element/repository/ne_version.go index c6805531..6da08cc8 100644 --- a/src/modules/network_element/repository/ne_version.go +++ b/src/modules/network_element/repository/ne_version.go @@ -21,7 +21,4 @@ type INeVersion interface { // DeleteByIds 批量删除信息 DeleteByIds(ids []string) int64 - - // CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 - CheckUniqueTypeAndID(neVersion model.NeVersion) string } diff --git a/src/modules/network_element/repository/ne_version.impl.go b/src/modules/network_element/repository/ne_version.impl.go index 7eebfec7..ad2c1440 100644 --- a/src/modules/network_element/repository/ne_version.impl.go +++ b/src/modules/network_element/repository/ne_version.impl.go @@ -1,7 +1,6 @@ package repository import ( - "fmt" "strings" "time" @@ -15,17 +14,20 @@ import ( // 实例化数据层 NewNeVersion 结构体 var NewNeVersionImpl = &NeVersionImpl{ selectSql: `select - id, ne_type, ne_id, version, path, pre_version, pre_path, new_version, new_path, status, create_by, create_time, update_by, update_time + id, ne_type, ne_id, name, version, path, pre_name, pre_version, pre_path, new_name, new_version, new_path, status, create_by, create_time, update_by, update_time from ne_version`, resultMap: map[string]string{ "id": "ID", "ne_type": "NeType", "ne_id": "NeId", + "name": "name", "version": "Version", "path": "Path", + "pre_name": "preName", "pre_version": "PreVersion", "pre_path": "PrePath", + "new_name": "NewName", "new_version": "NewVersion", "new_path": "NewPath", "status": "Status", @@ -76,8 +78,8 @@ func (r *NeVersionImpl) SelectPage(query map[string]any) map[string]any { conditions = append(conditions, "version like concat(?, '%')") params = append(params, strings.Trim(v.(string), " ")) } - if v, ok := query["filePath"]; ok && v != "" { - conditions = append(conditions, "file_path like concat(?, '%')") + if v, ok := query["path"]; ok && v != "" { + conditions = append(conditions, "path like concat(?, '%')") params = append(params, strings.Trim(v.(string), " ")) } @@ -108,7 +110,7 @@ func (r *NeVersionImpl) SelectPage(query map[string]any) map[string]any { // 分页 pageNum, pageSize := repo.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " + pageSql := " order by update_time desc limit ?,? " params = append(params, pageNum*pageSize) params = append(params, pageSize) @@ -146,6 +148,10 @@ func (r *NeVersionImpl) SelectList(neVersion model.NeVersion) []model.NeVersion conditions = append(conditions, "path like concat(?, '%')") params = append(params, neVersion.Path) } + if neVersion.Status != "" { + conditions = append(conditions, "status = ?") + params = append(params, neVersion.Status) + } // 构建查询条件语句 whereSql := "" @@ -178,41 +184,6 @@ func (r *NeVersionImpl) SelectByIds(cmdIds []string) []model.NeVersion { return r.convertResultRows(results) } -// CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 -func (r *NeVersionImpl) CheckUniqueTypeAndID(neVersion model.NeVersion) string { - // 查询条件拼接 - var conditions []string - var params []any - if neVersion.NeType != "" { - conditions = append(conditions, "ne_type = ?") - params = append(params, neVersion.NeType) - } - if neVersion.NeId != "" { - conditions = append(conditions, "ne_id = ?") - params = append(params, neVersion.NeId) - } - - // 构建查询条件语句 - whereSql := "" - if len(conditions) > 0 { - whereSql += " where " + strings.Join(conditions, " and ") - } else { - return "" - } - - // 查询数据 - querySql := "select id as 'str' from ne_version " + whereSql + " limit 1" - results, err := datasource.RawDB("", querySql, params) - if err != nil { - logger.Errorf("query err %v", err) - return "" - } - if len(results) > 0 { - return fmt.Sprint(results[0]["str"]) - } - return "" -} - // Insert 新增信息 func (r *NeVersionImpl) Insert(neVersion model.NeVersion) string { // 参数拼接 @@ -223,18 +194,27 @@ func (r *NeVersionImpl) Insert(neVersion model.NeVersion) string { if neVersion.NeId != "" { params["ne_id"] = neVersion.NeId } + if neVersion.Name != "" { + params["name"] = neVersion.Name + } if neVersion.Version != "" { params["version"] = neVersion.Version } if neVersion.Path != "" { params["path"] = neVersion.Path } + if neVersion.PreName != "" { + params["pre_name"] = neVersion.PreName + } if neVersion.PreVersion != "" { params["pre_version"] = neVersion.PreVersion } if neVersion.PrePath != "" { params["pre_path"] = neVersion.PrePath } + if neVersion.NewName != "" { + params["new_name"] = neVersion.NewName + } if neVersion.NewVersion != "" { params["new_version"] = neVersion.NewVersion } @@ -286,18 +266,27 @@ func (r *NeVersionImpl) Update(neVersion model.NeVersion) int64 { if neVersion.NeId != "" { params["ne_id"] = neVersion.NeId } + if neVersion.Name != "" { + params["name"] = neVersion.Name + } if neVersion.Version != "" { params["version"] = neVersion.Version } if neVersion.Path != "" { params["path"] = neVersion.Path } + if neVersion.PreName != "" { + params["pre_name"] = neVersion.PreName + } if neVersion.PreVersion != "" { params["pre_version"] = neVersion.PreVersion } if neVersion.PrePath != "" { params["pre_path"] = neVersion.PrePath } + if neVersion.NewName != "" { + params["new_name"] = neVersion.NewName + } if neVersion.NewVersion != "" { params["new_version"] = neVersion.NewVersion } diff --git a/src/modules/network_element/service/ne_direct_link.go b/src/modules/network_element/service/ne_direct_link.go index 7a4fa123..7d5afaf0 100644 --- a/src/modules/network_element/service/ne_direct_link.go +++ b/src/modules/network_element/service/ne_direct_link.go @@ -15,7 +15,7 @@ import ( func NeState(neInfo model.NeInfo) (map[string]any, error) { // 网元状态 neUrl := fmt.Sprintf("http://%s:%d/api/rest/systemManagement/v1/elementType/%s/objectType/systemState", neInfo.IP, neInfo.Port, strings.ToLower(neInfo.NeType)) - resBytes, err := fetch.Get(neUrl, nil, 250) + resBytes, err := fetch.Get(neUrl, nil, 1000) if err != nil { logger.Warnf("NeState %s", err.Error()) return nil, err @@ -62,8 +62,8 @@ func NeConfigOMC(neInfo model.NeInfo) (map[string]any, error) { var resData map[string]any if err != nil { status := err.Error() - logger.Warnf("NeConfigOMC %s", status) - if strings.HasPrefix(status, "204") { + logger.Warnf("NeConfigOMC %s Put \"%s\"", status, neUrl) + if strings.HasPrefix(status, "201") || strings.HasPrefix(status, "204") { return resData, nil } return nil, err diff --git a/src/modules/network_element/service/ne_info.go b/src/modules/network_element/service/ne_info.go index a667c017..5945fb3e 100644 --- a/src/modules/network_element/service/ne_info.go +++ b/src/modules/network_element/service/ne_info.go @@ -1,6 +1,9 @@ package service -import "be.ems/src/modules/network_element/model" +import ( + "be.ems/src/framework/utils/ssh" + "be.ems/src/modules/network_element/model" +) // 网元信息 服务层接口 type INeInfo interface { @@ -24,7 +27,8 @@ type INeInfo interface { // SelectList 查询列表 // // bandStatus 带状态信息 - SelectList(ne model.NeInfo, bandStatus bool) []model.NeInfo + // bandHost 带主机信息 + SelectList(ne model.NeInfo, bandStatus bool, bandHost bool) []model.NeInfo // SelectByIds 通过ID查询 // @@ -41,14 +45,23 @@ type INeInfo interface { DeleteByIds(infoIds []string) (int64, error) // CheckUniqueNeTypeAndNeId 校验同类型下标识是否唯一 - CheckUniqueNeTypeAndNeId(neType, neId, infoId string) bool + CheckUniqueNeTypeAndNeId(neType, neId, id string) bool + + // NeRunSSHclient 网元主机的SSH客户端-为创建相关连接 + NeRunSSHclient(neType, neId string) (*ssh.ConnSSH, error) // NeRunCMD 向网元发送cmd命令 NeRunCMD(neType, neId, cmd string) (string, error) - // NeConfigFileRead 网元配置文件读取 网元配置yaml文件复制到本地后通过filePath读取 - NeConfigFileRead(neInfo model.NeInfo, filePath string) []string + // neConfOAMRead 网元OAM配置文件读取 + NeConfOAMRead(neType, neId string) (map[string]any, error) - // NeConfigFileWirte 网元配置文件写入 content内容 sync同步到网元端 - NeConfigFileWirte(neInfo model.NeInfo, filePath, content string, sync bool) error + // NeConfOAMSync 网元OAM配置文件生成并同步 + NeConfOAMSync(neInfo model.NeInfo, content map[string]any, sync bool) error + + // NeConfPara5GRead 网元公共配置文件读取 + NeConfPara5GRead() (map[string]any, error) + + // NeConfPara5GWirte 网元公共配置文件写入 content内容 syncNE同步到网元端NeType@NeId + NeConfPara5GWirte(content map[string]any, syncNE []string) error } diff --git a/src/modules/network_element/service/ne_info.impl.go b/src/modules/network_element/service/ne_info.impl.go index 666617e0..de5b6a8d 100644 --- a/src/modules/network_element/service/ne_info.impl.go +++ b/src/modules/network_element/service/ne_info.impl.go @@ -4,12 +4,14 @@ import ( "encoding/json" "fmt" "os" + "path/filepath" "runtime" "strings" "be.ems/src/framework/constants/cachekey" "be.ems/src/framework/logger" "be.ems/src/framework/redis" + "be.ems/src/framework/utils/parse" "be.ems/src/framework/utils/ssh" "be.ems/src/modules/network_element/model" "be.ems/src/modules/network_element/repository" @@ -18,15 +20,14 @@ import ( // 实例化服务层 NeInfoImpl 结构体 var NewNeInfoImpl = &NeInfoImpl{ neInfoRepository: repository.NewNeInfoImpl, - neHostRepository: repository.NewNeHostImpl, + Para5GData: map[string]string{}, } // 网元信息 服务层处理 type NeInfoImpl struct { // 网元信息数据信息 neInfoRepository repository.INeInfo - // 网元主机连接表 - neHostRepository repository.INeHost + Para5GData map[string]string } // SelectNeInfoByNeTypeAndNeID 通过ne_type和ne_id查询网元信息 @@ -94,7 +95,7 @@ func (r *NeInfoImpl) SelectNeInfoByRmuid(rmUid string) model.NeInfo { } } } else { - neInfos := r.SelectList(neInfo, false) + neInfos := r.SelectList(neInfo, false, false) for _, v := range neInfos { key := fmt.Sprintf("%s%s:%s", cachekey.NE_KEY, strings.ToUpper(v.NeType), v.NeId) redis.Del("", key) @@ -117,37 +118,7 @@ func (r *NeInfoImpl) SelectPage(query map[string]any, bandStatus bool) map[strin // 网元直连读取网元服务状态 if bandStatus { rows := data["rows"].([]model.NeInfo) - arr := &rows - for i := range *arr { - v := (*arr)[i] - result, err := NeState(v) - if err != nil { - (*arr)[i].ServerState = map[string]any{ - "online": false, - } - // 网元状态设置为离线 - if v.Status != "1" { - v.Status = "1" - (*arr)[i].Status = v.Status - r.neInfoRepository.Update(v) - } - continue - } - result["online"] = true - (*arr)[i].ServerState = result - // 网元状态设置为在线 - if v.Status != "0" { - // 下发网管配置信息给网元 - _, err = NeConfigOMC(v) - if err != nil { - v.Status = "3" - } else { - v.Status = "0" - } - (*arr)[i].Status = v.Status - r.neInfoRepository.Update(v) - } - } + r.bandNeStatus(&rows) } return data @@ -156,50 +127,70 @@ func (r *NeInfoImpl) SelectPage(query map[string]any, bandStatus bool) map[strin // SelectList 查询列表 // // bandStatus 带状态信息 -func (r *NeInfoImpl) SelectList(ne model.NeInfo, bandStatus bool) []model.NeInfo { +// bandHost 带主机信息 +func (r *NeInfoImpl) SelectList(ne model.NeInfo, bandStatus bool, bandHost bool) []model.NeInfo { list := r.neInfoRepository.SelectList(ne) // 网元直连读取网元服务状态 if bandStatus { - neList := &list - for i := range *neList { - v := (*neList)[i] - result, err := NeState(v) - if err != nil { - (*neList)[i].ServerState = map[string]any{ - "online": false, - } - // 网元状态设置为离线 - if v.Status != "1" { - v.Status = "1" - (*neList)[i].Status = v.Status - r.neInfoRepository.Update(v) - } - continue - } - result["online"] = true - (*neList)[i].ServerState = result - // 网元状态设置为在线 - if v.Status != "0" { - // 下发网管配置信息给网元 - _, err = NeConfigOMC(v) - if err != nil { - v.Status = "3" - } else { - v.Status = "0" - } - (*neList)[i].Status = v.Status - r.neInfoRepository.Update(v) - } - } + r.bandNeStatus(&list) + } + + // 网元主机信息 + if bandHost { + r.bandNeHosts(&list) } return list } +// bandNeStatus 网元列表项数据带网元服务状态 +func (r *NeInfoImpl) bandNeStatus(arr *[]model.NeInfo) { + for i := range *arr { + v := (*arr)[i] + result, err := NeState(v) + if err != nil { + (*arr)[i].ServerState = map[string]any{ + "online": false, + } + // 网元状态设置为离线 + if v.Status != "0" { + v.Status = "0" + (*arr)[i].Status = v.Status + r.neInfoRepository.Update(v) + } + continue + } + result["online"] = true + (*arr)[i].ServerState = result + // 网元状态设置为在线 + if v.Status != "1" { + // 下发网管配置信息给网元 + _, err = NeConfigOMC(v) + if err == nil { + v.Status = "1" + } else { + v.Status = "2" + } + (*arr)[i].Status = v.Status + r.neInfoRepository.Update(v) + } + } +} + +// bandNeHosts 网元列表项数据带网元主机信息 +func (r *NeInfoImpl) bandNeHosts(arr *[]model.NeInfo) { + for i := range *arr { + v := (*arr)[i] + if v.HostIDs != "" { + (*arr)[i].Hosts = NewNeHostImpl.neHostRepository.SelectByIds(strings.Split(v.HostIDs, ",")) + } + } +} + // SelectByIds 通过ID查询 // -// bandStatus 带主机信息 +// bandHost 带主机信息 func (r *NeInfoImpl) SelectById(infoId string, bandHost bool) model.NeInfo { if infoId == "" { return model.NeInfo{} @@ -209,7 +200,7 @@ func (r *NeInfoImpl) SelectById(infoId string, bandHost bool) model.NeInfo { neInfo := neInfos[0] // 带主机信息 if neInfo.HostIDs != "" && bandHost { - neInfo.Hosts = r.neHostRepository.SelectByIds(strings.Split(neInfo.HostIDs, ",")) + neInfo.Hosts = NewNeHostImpl.neHostRepository.SelectByIds(strings.Split(neInfo.HostIDs, ",")) } return neInfo } @@ -224,7 +215,7 @@ func (r *NeInfoImpl) Insert(neInfo model.NeInfo) string { for _, host := range neInfo.Hosts { host.Title = fmt.Sprintf("%s_%s_%d", strings.ToUpper(neInfo.NeType), neInfo.NeId, host.Port) host.GroupID = "1" - hostId := r.neHostRepository.Insert(host) + hostId := NewNeHostImpl.Insert(host) if hostId != "" { hostIDs = append(hostIDs, hostId) } @@ -248,7 +239,7 @@ func (r *NeInfoImpl) Update(neInfo model.NeInfo) int64 { if host.HostID != "" { host.Title = fmt.Sprintf("%s_%s_%d", strings.ToUpper(neInfo.NeType), neInfo.NeId, host.Port) host.GroupID = "1" - r.neHostRepository.Update(host) + NewNeHostImpl.Update(host) } } } @@ -273,12 +264,20 @@ func (r *NeInfoImpl) DeleteByIds(infoIds []string) (int64, error) { for _, v := range infos { // 主机信息删除 if v.HostIDs != "" { - hostIds := strings.Split(v.HostIDs, ",") - r.neHostRepository.DeleteByIds(hostIds) + NewNeHostImpl.DeleteByIds(strings.Split(v.HostIDs, ",")) + } + // 删除License + neLicense := NewNeLicenseImpl.SelectByNeTypeAndNeID(v.NeType, v.NeId) + if neLicense.NeId == v.NeId { + NewNeLicenseImpl.DeleteByIds([]string{neLicense.ID}) + } + // 删除Version + neVersion := NewNeVersionImpl.SelectByNeTypeAndNeID(v.NeType, v.NeId) + if neVersion.NeId == v.NeId { + NewNeVersionImpl.DeleteByIds([]string{neVersion.ID}) } // 缓存信息删除 - key := fmt.Sprintf("%s%s:%s", cachekey.NE_KEY, v.NeType, v.NeId) - redis.Del("", key) + redis.Del("", fmt.Sprintf("%s%s:%s", cachekey.NE_KEY, v.NeType, v.NeId)) } rows := r.neInfoRepository.DeleteByIds(infoIds) return rows, nil @@ -288,149 +287,456 @@ func (r *NeInfoImpl) DeleteByIds(infoIds []string) (int64, error) { } // CheckUniqueNeTypeAndNeId 校验同类型下标识是否唯一 -func (r *NeInfoImpl) CheckUniqueNeTypeAndNeId(neType, neId, infoId string) bool { +func (r *NeInfoImpl) CheckUniqueNeTypeAndNeId(neType, neId, id string) bool { uniqueId := r.neInfoRepository.CheckUniqueNeTypeAndNeId(model.NeInfo{ NeType: neType, NeId: neId, }) - if uniqueId == infoId { + if uniqueId == id { return true } return uniqueId == "" } -// NeRunCMD 向网元发送cmd命令 -func (r *NeInfoImpl) NeRunCMD(neType, neId, cmd string) (string, error) { +// NeRunSSHclient 网元主机的SSH客户端-为创建相关连接 +func (r *NeInfoImpl) NeRunSSHclient(neType, neId string) (*ssh.ConnSSH, error) { neInfo := r.SelectNeInfoByNeTypeAndNeID(neType, neId) if neInfo.NeId != neId { - logger.Errorf("NeRunCMD NeType:%s NeID:%s not found", neType, neId) - return "", fmt.Errorf("neinfo not found") + logger.Errorf("NeRunSSHclient NeType:%s NeID:%s not found", neType, neId) + return nil, fmt.Errorf("neinfo not found") } - // 带主机信息 - if neInfo.HostIDs != "" { - neInfo.Hosts = r.neHostRepository.SelectByIds(strings.Split(neInfo.HostIDs, ",")) - if len(neInfo.Hosts) <= 0 { - logger.Errorf("NeRunCMD Hosts %s not found", neInfo.HostIDs) - return "", fmt.Errorf("neinfo host not found") - } + // 取主机信息 + if neInfo.HostIDs == "" { + logger.Errorf("NeRunSSHclient NeType:%s NeID:%s hostId not found", neType, neId) + return nil, fmt.Errorf("neinfo hostId not found") + } + neInfo.Hosts = NewNeHostImpl.neHostRepository.SelectByIds(strings.Split(neInfo.HostIDs, ",")) + if len(neInfo.Hosts) <= 0 { + logger.Errorf("NeRunSSHclient Hosts %s not found", neInfo.HostIDs) + return nil, fmt.Errorf("neinfo host not found") } - neHost := neInfo.Hosts[0] if neHost.HostType != "ssh" { - logger.Errorf("NeRunCMD Hosts first HostType %s not ssh", neHost.HostType) - return "", fmt.Errorf("neinfo host type not ssh") + logger.Errorf("NeRunSSHclient Hosts first HostType %s not ssh", neHost.HostType) + return nil, fmt.Errorf("neinfo host type not ssh") } + var connSSH ssh.ConnSSH neHost.CopyTo(&connSSH) - client, err := connSSH.NewClient() - if err != nil { - logger.Errorf("NeRunCMD NewClient err => %s", err.Error()) - return "", fmt.Errorf("neinfo ssh client new err") + var client *ssh.ConnSSH + var err error + if neHost.AuthMode == "2" { + client, err = connSSH.NewClientByLocalPrivate() + } else { + client, err = connSSH.NewClient() } - defer client.Close() + if err != nil { + logger.Errorf("NeRunSSHclient NewClient err => %s", err.Error()) + return nil, fmt.Errorf("neinfo ssh client new err") + } + return client, nil +} + +// NeRunCMD 向网元发送cmd命令 +func (r *NeInfoImpl) NeRunCMD(neType, neId, cmd string) (string, error) { + sshClient, err := r.NeRunSSHclient(neType, neId) + if err != nil { + return "", err + } + defer sshClient.Close() // 执行命令 - output, err := client.RunCMD(cmd) + output, err := sshClient.RunCMD(cmd) if err != nil { logger.Errorf("NeRunCMD RunCMD %s err => %s", output, err.Error()) return "", fmt.Errorf("neinfo ssh run cmd err") } - return output, nil } -// NeConfigFileRead 网元配置文件读取 网元配置yaml文件复制到本地后通过filePath读取 -func (r *NeInfoImpl) NeConfigFileRead(neInfo model.NeInfo, filePath string) []string { - files := []string{} - neTypeLower := strings.ToLower(neInfo.NeType) - - // 网管本地路径 - omcPath := "/usr/local/etc/omc/ne_config" - if runtime.GOOS == "windows" { - omcPath = fmt.Sprintf("C:%s", omcPath) +// neConfOAMData 网元OAM配置文件默认格式数据 +func (r *NeInfoImpl) neConfOAMData() map[string]any { + return map[string]any{ + "httpManageCfg": map[string]any{ + "ipType": "ipv4", + // 必改 + "ipv4": "172.60.5.2", + "ipv6": "", + "port": 33030, + "scheme": "http", + }, + "oamConfig": map[string]any{ + "enable": true, + "ipType": "ipv4", + "ipv4": "172.60.5.1", // 必改 + "ipv6": "", + "port": 33030, + "scheme": "http", + "neConfig": map[string]any{ // 必改 + "neId": "001", + "rmUid": "4400HX1XXX001", + "neName": "XXX_001", + "dn": "-", + "vendorName": "GD", + "province": "-", + "pvFlag": "PNF", + }, + }, + "snmpConfig": map[string]any{ + "enable": false, + "ipType": "ipv4", + "ipv4": "172.60.5.2", // 必改 + "ipv6": "", + "port": 4957, + }, + "kpiConfig": map[string]any{ + "enable": true, + "timer": 60, // 必改 + }, + // "pubConfigPath": "/usr/local/etc/conf/para5G.yaml", // 网元只会读一次后续会置空,建议不放 } - omcPath = fmt.Sprintf("%s/%s/%s", omcPath, neTypeLower, neInfo.NeId) - - // 读取文件内容 - if filePath != "" { - bytes, err := os.ReadFile(fmt.Sprintf("%s/%s", omcPath, filePath)) - if err != nil { - logger.Warnf("NeConfigFile ReadFile => %s", err.Error()) - return files - } - files = append(files, string(bytes)) - return files - } - - // 删除原有配置文件 - // err := os.RemoveAll(omcPath) - // if err != nil { - // logger.Warnf("NeConfigFile Remove => %s", err.Error()) - // return files - // } - - // 网元端配置路径 - nePath := "/usr/local/etc" - nePath = fmt.Sprintf("%s/%s", nePath, neTypeLower) - - // 各个网元与网元间约定配置文件 - err := ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/oam_manager.yaml", omcPath+"/oam_manager.yaml") - if err == nil { - files = append(files, "oam_manager.yaml") - } - - // 根据情况复制网元特殊配置 - switch neTypeLower { - case "ausf": - err = ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/ausfcfg.yaml", omcPath+"/ausfcfg.yaml") - if err == nil { - files = append(files, "ausfcfg.yaml") - } - case "smf": - ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/smf_conf.yaml", omcPath+"/smf_conf.yaml") - if err == nil { - files = append(files, "smf_conf.yaml") - } - ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/smf_policy.yaml", omcPath+"/smf_policy.yaml") - if err == nil { - files = append(files, "smf_policy.yaml") - } - case "ims": - } - - return files } -// NeConfigFileWirte 网元配置文件写入 content内容 sync同步到网元端 -func (r *NeInfoImpl) NeConfigFileWirte(neInfo model.NeInfo, filePath, content string, sync bool) error { - neTypeLower := strings.ToLower(neInfo.NeType) - +// neConfOAMRead 网元OAM配置文件读取 +func (r *NeInfoImpl) NeConfOAMRead(neType, neId string) (map[string]any, error) { + neTypeLower := strings.ToLower(neType) // 网管本地路径 omcPath := "/usr/local/etc/omc/ne_config" if runtime.GOOS == "windows" { omcPath = fmt.Sprintf("C:%s", omcPath) } - localFilePath := fmt.Sprintf("%s/%s/%s/%s", omcPath, neTypeLower, neInfo.NeId, filePath) + localFilePath := fmt.Sprintf("%s/%s/%s/%s", omcPath, neTypeLower, neId, "oam_manager.yaml") - err := os.WriteFile(localFilePath, []byte(content), 0644) + // 读取文件内容 + bytes, err := os.ReadFile(localFilePath) if err != nil { - logger.Warnf("NeConfigFile WriteFile => %s", err.Error()) + // logger.Warnf("NeConfOAMRead ReadFile => %s", err.Error()) + // return nil, fmt.Errorf("read file error") + // 无保留文件时返回默认文件数据 + oamData := r.neConfOAMData() + r.neConfOAMWirte(neType, neId, oamData, false) + return oamData, nil + } + content := string(bytes) + + // 序列化Map + mapData, err := parse.ConvertConfigToMap("yaml", content) + if err != nil { + logger.Warnf("NeConfOAMRead ConvertConfigToMap => %s", err.Error()) + return nil, fmt.Errorf("content convert type error") + } + return mapData, nil +} + +// neConfOAMWirte 网元OAM配置文件写入 content内容 sync同步到网元端 +func (r *NeInfoImpl) neConfOAMWirte(neType, neId string, content any, sync bool) error { + neTypeLower := strings.ToLower(neType) + fileName := "oam_manager.yaml" + // 网管本地路径 + omcPath := "/usr/local/etc/omc/ne_config" + if runtime.GOOS == "windows" { + omcPath = fmt.Sprintf("C:%s", omcPath) + } + localFilePath := fmt.Sprintf("%s/%s/%s/%s", omcPath, neTypeLower, neId, fileName) + + // 写入文件 + if err := parse.ConvertConfigToFile("yaml", localFilePath, content); err != nil { return fmt.Errorf("please check if the file exists or write permissions") } // 同步到网元端 if sync { - // 网元端配置路径 - neFilePath := fmt.Sprintf("/usr/local/etc/%s/%s", neTypeLower, filePath) - // 修改网元文件权限 - r.NeRunCMD(neInfo.NeType, neInfo.NeId, fmt.Sprintf("sudo chmod o+w %s", neFilePath)) - // 复制到网元进行覆盖 - err = ssh.FileSCPLocalToNe(neInfo.IP, localFilePath, neFilePath) + // 网元主机的SSH客户端 + sshClient, err := r.NeRunSSHclient(neType, neId) if err != nil { - logger.Warnf("NeConfigFile SyncFile => %s", err.Error()) + return err + } + defer sshClient.Close() + // 网元主机的SSH客户端进行文件传输 + sftpClient, err := sshClient.NewClientSFTP() + if err != nil { + return err + } + defer sftpClient.Close() + + // 网元端配置路径 + neFilePath := fmt.Sprintf("/usr/local/etc/%s/%s", neTypeLower, fileName) + neFileDir := filepath.ToSlash(filepath.Dir(neFilePath)) + // 修改网元文件权限 + sshClient.RunCMD(fmt.Sprintf("sudo mkdir -p %s && sudo chmod 775 %s && sudo touch %s && sudo chmod o+w %s", neFileDir, neFileDir, neFilePath, neFilePath)) + // 复制到网元进行覆盖 + if err = sftpClient.CopyFileLocalToRemote(localFilePath, neFilePath); err != nil { return fmt.Errorf("please check if scp remote copy is allowed") } } return nil } + +// NeConfOAMSync 网元OAM配置文件生成并同步 +func (r *NeInfoImpl) NeConfOAMSync(neInfo model.NeInfo, content map[string]any, sync bool) error { + oamData, err := r.NeConfOAMRead(neInfo.NeType, neInfo.NeId) + if oamData == nil || err != nil { + return fmt.Errorf("error read OAM file info") + } + // 网元HTTP服务 + if v, ok := oamData["httpManageCfg"]; ok { + item := v.(map[string]any) + item["port"] = neInfo.Port + if strings.Contains(neInfo.IP, ":") { + item["ipType"] = "ipv6" + item["ipv6"] = neInfo.IP + } + if strings.Contains(neInfo.IP, ".") { + item["ipType"] = "ipv4" + item["ipv4"] = neInfo.IP + } + + oamData["httpManageCfg"] = item + } + // 对网管HTTP配置 + if v, ok := oamData["oamConfig"]; ok { + item := v.(map[string]any) + item["neConfig"] = map[string]string{ + "neId": neInfo.NeId, + "rmUid": neInfo.RmUID, + "neName": neInfo.NeName, + "dn": neInfo.Dn, + "vendorName": neInfo.VendorName, + "province": neInfo.Province, + "pvFlag": neInfo.PvFlag, + } + + if omcIP, ok := r.Para5GData["OMC_IP"]; ok && omcIP != "" { + if strings.Contains(omcIP, ":") { + item["ipType"] = "ipv6" + item["ipv6"] = omcIP + } + if strings.Contains(omcIP, ".") { + item["ipType"] = "ipv4" + item["ipv4"] = omcIP + } + } + + if oamEnable, ok := content["oamEnable"]; ok && oamEnable != nil { + item["enable"] = parse.Boolean(oamEnable) + } + if oamPort, ok := content["oamPort"]; ok && oamPort != nil { + item["port"] = parse.Number(oamPort) + } + oamData["oamConfig"] = item + } + // 对网管SNMP配置 + if v, ok := oamData["snmpConfig"]; ok { + item := v.(map[string]any) + if strings.Contains(neInfo.IP, ":") { + item["ipType"] = "ipv6" + item["ipv6"] = neInfo.IP + } + if strings.Contains(neInfo.IP, ".") { + item["ipType"] = "ipv4" + item["ipv4"] = neInfo.IP + } + + if snmpEnable, ok := content["snmpEnable"]; ok && snmpEnable != nil { + item["enable"] = parse.Boolean(snmpEnable) + } + if snmpPort, ok := content["snmpPort"]; ok && snmpPort != nil { + item["port"] = parse.Number(snmpPort) + } + oamData["snmpConfig"] = item + } + // 对网管KPI上报配置 + if v, ok := oamData["kpiConfig"]; ok { + item := v.(map[string]any) + if neInfo.NeType == "UPF" { + item["timer"] = 5 + } + + if kpiEnable, ok := content["kpiEnable"]; ok && kpiEnable != nil { + item["enable"] = parse.Boolean(kpiEnable) + } + if kpiTimer, ok := content["kpiTimer"]; ok && kpiTimer != nil { + item["timer"] = parse.Number(kpiTimer) + } + oamData["kpiConfig"] = item + } + if err := NewNeInfoImpl.neConfOAMWirte(neInfo.NeType, neInfo.NeId, oamData, sync); err != nil { + return fmt.Errorf("error wirte OAM file info") + } + return nil +} + +// NeConfPara5GRead 网元公共配置文件读取 +func (r *NeInfoImpl) NeConfPara5GRead() (map[string]any, error) { + // 网管本地路径 + omcFilePath := "/usr/local/etc/omc/para5G.yaml" + if runtime.GOOS == "windows" { + omcFilePath = fmt.Sprintf("C:%s", omcFilePath) + } + // 读取文件内容 + bytes, err := os.ReadFile(omcFilePath) + if err != nil { + logger.Warnf("NeConfPara5GRead ReadFile => %s", err.Error()) + return nil, fmt.Errorf("read file error") + } + content := string(bytes) + + // 序列化Map + mapData, err := parse.ConvertConfigToMap("yaml", content) + if err != nil { + logger.Warnf("NeConfPara5GRead ConvertConfigToMap => %s", err.Error()) + return nil, fmt.Errorf("content convert type error") + } + return mapData, nil +} + +// NeConfPara5GWirte 网元公共配置文件写入 content内容 syncNE同步到网元端NeType@NeId +func (r *NeInfoImpl) NeConfPara5GWirte(content map[string]any, syncNE []string) error { + // 网管本地路径 + omcFilePath := "/usr/local/etc/omc/para5G.yaml" + if runtime.GOOS == "windows" { + omcFilePath = fmt.Sprintf("C:%s", omcFilePath) + } + + if err := parse.ConvertConfigToFile("yaml", omcFilePath, content); err != nil { + return fmt.Errorf("please check if the file exists or write permissions") + } + + // 同步到网元端 + if len(syncNE) > 0 { + errMsg := []string{} + for _, neTI := range syncNE { + ti := strings.SplitN(neTI, "@", 2) + // 网元主机的SSH客户端 + sshClient, err := r.NeRunSSHclient(ti[0], ti[1]) + if err != nil { + errMsg = append(errMsg, fmt.Sprintf("%s : %s", ti, err.Error())) + continue + } + defer sshClient.Close() + // 网元主机的SSH客户端进行文件传输 + sftpClient, err := sshClient.NewClientSFTP() + if err != nil { + errMsg = append(errMsg, fmt.Sprintf("%s : %s", ti, err.Error())) + continue + } + defer sftpClient.Close() + + // 网元端配置路径 + neFilePath := "/usr/local/etc/conf/para5G.yaml" + neFileDir := filepath.ToSlash(filepath.Dir(neFilePath)) + // 修改网元文件权限 + sshClient.RunCMD(fmt.Sprintf("sudo mkdir -p %s && sudo chmod 775 %s && sudo touch %s && sudo chmod o+rw %s", neFileDir, neFileDir, neFilePath, neFilePath)) + // 复制到网元进行覆盖 + if err = sftpClient.CopyFileLocalToRemote(omcFilePath, neFilePath); err != nil { + errMsg = append(errMsg, fmt.Sprintf("%s : please check if scp remote copy is allowed", ti)) + continue + } + } + if len(errMsg) > 0 { + return fmt.Errorf(strings.Join(errMsg, "\r\n")) + } + } + + // 转换一份数据到全局 + r.Para5GData = r.neConfPara5GDataConvert(content) + return nil +} + +// NeConfPara5GConvert 网元公共配置数据转化 content网元公共配置文件读取内容 +func (r *NeInfoImpl) neConfPara5GDataConvert(content map[string]any) map[string]string { + basic := content["basic"].(map[string]any) + external := content["external"].(map[string]any) + sbi := content["sbi"].(map[string]any) + + mcc := "460" + mnc := "01" + mncDomain := "001" + if plmnId, plmnIdOk := basic["plmnId"].(map[string]any); plmnIdOk { + mcc = plmnId["mcc"].(string) + mnc = plmnId["mnc"].(string) + // If a user input two digit MNC, add a leading zero + if len(mnc) == 2 { + mncDomain = fmt.Sprintf("0%s", mnc) + } else { + mncDomain = mnc + } + } + + sst := "1" + sd := "000001" + if plmnId, plmnIdOk := basic["snssai"].(map[string]any); plmnIdOk { + sst = plmnId["sst"].(string) + sd = plmnId["sd"].(string) + } + + n3IPAmdMask := external["upfn3_ip"].(string) + n3Arr := strings.Split(n3IPAmdMask, "/") + n3IP := n3Arr[0] + n3Mask := parse.ConvertIPMask(parse.Number(n3Arr[1])) + + n6IPAmdMask := external["upfn6_ip"].(string) + n6Arr := strings.Split(n6IPAmdMask, "/") + n6IP := n6Arr[0] + n6Mask := parse.ConvertIPMask(parse.Number(n6Arr[1])) + + ueIPAmdMask := external["ue_pool"].(string) + ueArr := strings.Split(ueIPAmdMask, "/") + ueIP := ueArr[0] + ueCicr := ueArr[1] + ueMask := parse.ConvertIPMask(parse.Number(ueArr[1])) + + return map[string]string{ + // basic + "TAC": basic["tac"].(string), + "MCC": mcc, + "MNC": mnc, + "MNC_DOMAIN": mncDomain, + "SST": sst, + "SD": sd, + "DNN_DATA": basic["dnn_data"].(string), + "DNN_IMS": basic["dnn_ims"].(string), + + // external + "N2_IP": external["amfn2_ip"].(string), + "UE_POOL": external["ue_pool"].(string), + "UE_IP": ueIP, + "UE_MASK": ueMask, + "UE_CIDR": ueCicr, + "UPF_TYPE": external["upf_type"].(string), // StandardUPF LightUPF + "N3_IP": n3IP, + "N3_MASK": n3Mask, + "N3_GW": external["upfn3_gw"].(string), + "N3_PCI": external["upfn3_pci"].(string), + "N3_MAC": external["upfn3_mac"].(string), + "N6_IP": n6IP, + "N6_MASK": n6Mask, + "N6_GW": external["upfn6_gw"].(string), + "N6_PCI": external["upfn6_pci"].(string), + "N6_MAC": external["upfn6_mac"].(string), + + "SIP_IP": external["ims_sip_ip"].(string), + + "S1_MMEIP": external["mmes1_ip"].(string), + "S11_MMEIP": external["mmes11_ip"].(string), + "S10_MMEIP": external["mmes10_ip"].(string), + + // sbi + "OMC_IP": sbi["omc_ip"].(string), + "IMS_IP": sbi["ims_ip"].(string), + "AMF_IP": sbi["amf_ip"].(string), + "AUSF_IP": sbi["ausf_ip"].(string), + "UDM_IP": sbi["udm_ip"].(string), + "ADB_IP": sbi["adb_ip"].(string), + "SMF_IP": sbi["smf_ip"].(string), + "PCF_IP": sbi["pcf_ip"].(string), + "NSSF_IP": sbi["nssf_ip"].(string), + "NRF_IP": sbi["nrf_ip"].(string), + "UPF_IP": sbi["upf_ip"].(string), + "LMF_IP": sbi["lmf_ip"].(string), + "NEF_IP": sbi["nef_ip"].(string), + "MME_IP": sbi["mme_ip"].(string), + "N3IWF_IP": sbi["n3iwf_ip"].(string), + } +} diff --git a/src/modules/network_element/service/ne_license.go b/src/modules/network_element/service/ne_license.go index c5ea23a1..ace554d1 100644 --- a/src/modules/network_element/service/ne_license.go +++ b/src/modules/network_element/service/ne_license.go @@ -22,16 +22,13 @@ type INeLicense interface { // DeleteByIds 批量删除信息 DeleteByIds(ids []string) (int64, error) - // CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 - CheckUniqueTypeAndID(neType, neId, id string) bool - // SelectByNeTypeAndNeID 通过ne_type和ne_id查询信息 SelectByNeTypeAndNeID(neType, neId string) model.NeLicense // ReadLicenseInfo 读取授权文件信息 - // 激活申请码, 激活文件 - ReadLicenseInfo(neInfo model.NeInfo) (string, string) + // 返回激活申请码, 激活文件 + ReadLicenseInfo(neLicense model.NeLicense) (string, string) - // UploadToNeHost 授权文件上传到网元主机 - UploadToNeHost(neLicense model.NeLicense) error + // UploadLicense 授权文件上传到网元主机 + UploadLicense(neLicense model.NeLicense) error } diff --git a/src/modules/network_element/service/ne_license.impl.go b/src/modules/network_element/service/ne_license.impl.go index d41b1918..d6f684ee 100644 --- a/src/modules/network_element/service/ne_license.impl.go +++ b/src/modules/network_element/service/ne_license.impl.go @@ -3,12 +3,12 @@ package service import ( "fmt" "os" + "path/filepath" "runtime" "strings" "time" "be.ems/src/framework/utils/file" - "be.ems/src/framework/utils/ssh" "be.ems/src/modules/network_element/model" "be.ems/src/modules/network_element/repository" ) @@ -84,18 +84,6 @@ func (r *NeLicenseImpl) SelectByTypeAndID(neType, neId string) model.NeLicense { return model.NeLicense{} } -// CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 -func (r *NeLicenseImpl) CheckUniqueTypeAndID(neType, neId, id string) bool { - uniqueId := r.neLicenseRepository.CheckUniqueTypeAndID(model.NeLicense{ - NeType: neType, - NeId: neId, - }) - if uniqueId == id { - return true - } - return uniqueId == "" -} - // SelectByNeTypeAndNeID 通过ne_type和ne_id查询信息 func (r *NeLicenseImpl) SelectByNeTypeAndNeID(neType, neId string) model.NeLicense { neLicenses := r.neLicenseRepository.SelectList(model.NeLicense{ @@ -109,75 +97,95 @@ func (r *NeLicenseImpl) SelectByNeTypeAndNeID(neType, neId string) model.NeLicen } // ReadLicenseInfo 读取授权文件信息 -// 激活申请码, 激活文件 -func (r *NeLicenseImpl) ReadLicenseInfo(neInfo model.NeInfo) (string, string) { - neTypeLower := strings.ToLower(neInfo.NeType) +// 返回激活申请码, 激活文件 +func (r *NeLicenseImpl) ReadLicenseInfo(neLicense model.NeLicense) (string, string) { + neTypeLower := strings.ToLower(neLicense.NeType) // 网管本地路径 omcPath := "/usr/local/etc/omc/ne_license" if runtime.GOOS == "windows" { omcPath = fmt.Sprintf("C:%s", omcPath) } - omcPath = fmt.Sprintf("%s/%s/%s", omcPath, neTypeLower, neInfo.NeId) + omcPath = fmt.Sprintf("%s/%s/%s", omcPath, neTypeLower, neLicense.NeId) // 网元端授权文件路径 nePath := fmt.Sprintf("/usr/local/etc/%s/license", neTypeLower) - // 复制授权申请码到本地 - err := ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/Activation_request_code.txt", omcPath+"/Activation_request_code.txt") + // 网元主机的SSH客户端 + sshClient, err := NewNeInfoImpl.NeRunSSHclient(neLicense.NeType, neLicense.NeId) if err != nil { return "", "" } + defer sshClient.Close() + // 网元主机的SSH客户端进行文件传输 + sftpClient, err := sshClient.NewClientSFTP() + if err != nil { + return "", "" + } + defer sftpClient.Close() + + // 复制授权申请码到本地 + if err = sftpClient.CopyFileRemoteToLocal(nePath+"/Activation_request_code.txt", omcPath+"/Activation_request_code.txt"); err != nil { + return "", "" + } // 读取文件内容 bytes, err := os.ReadFile(omcPath + "/Activation_request_code.txt") if err != nil { return "", "" } - // 激活文件 + // 复制激活文件到本地 licensePath := "" - if err = ssh.FileSCPNeToLocal(neInfo.IP, nePath+"/system.ini", omcPath+"/system.ini"); err == nil { + if err = sftpClient.CopyFileRemoteToLocal(nePath+"/system.ini", omcPath+"/system.ini"); err == nil { licensePath = omcPath + "/system.ini" } return strings.TrimSpace(string(bytes)), licensePath } -// UploadToNeHost 授权文件上传到网元主机 -func (r *NeLicenseImpl) UploadToNeHost(neLicense model.NeLicense) error { - +// UploadLicense 授权文件上传到网元主机 +func (r *NeLicenseImpl) UploadLicense(neLicense model.NeLicense) error { // 检查文件是否存在 omcLicensePath := file.ParseUploadFilePath(neLicense.LicensePath) if _, err := os.Stat(omcLicensePath); err != nil { return fmt.Errorf("file read failure") } - // 检查网元主机 - neHostInfo := NewNeHostImpl.SelectById(neLicense.HostId) - if neHostInfo.HostType != "ssh" || neHostInfo.HostID != neLicense.HostId { - return fmt.Errorf("no found host info") + // 网元主机的SSH客户端 + sshClient, err := NewNeInfoImpl.NeRunSSHclient(neLicense.NeType, neLicense.NeId) + if err != nil { + return err } + defer sshClient.Close() + // 网元主机的SSH客户端进行文件传输 + sftpClient, err := sshClient.NewClientSFTP() + if err != nil { + return err + } + defer sftpClient.Close() // 网元端授权文件路径 neTypeLower := strings.ToLower(neLicense.NeType) - neLicensePath := fmt.Sprintf("/usr/local/etc/%s/license", neTypeLower) - // 修改文件夹权限 - NewNeInfoImpl.NeRunCMD(neLicense.NeType, neLicense.NeId, fmt.Sprintf("sudo chmod o+w %s/", neLicensePath)) + neLicensePath := fmt.Sprintf("/usr/local/etc/%s/license/system.ini", neTypeLower) + neLicenseDir := filepath.ToSlash(filepath.Dir(neLicensePath)) + // 修改网元文件权限 + sshClient.RunCMD(fmt.Sprintf("sudo mkdir -p %s && sudo chmod 775 %s && sudo touch %s && sudo chmod o+rw %s", neLicenseDir, neLicenseDir, neLicensePath, neLicensePath)) + // 尝试备份授权文件 neLicensePathBack := fmt.Sprintf("%s/system_%s.ini", neLicensePath, time.Now().Format("20060102_150405")) - NewNeInfoImpl.NeRunCMD(neLicense.NeType, neLicense.NeId, fmt.Sprintf("sudo cp -rf %s/system.ini %s", neLicensePath, neLicensePathBack)) + sshClient.RunCMD(fmt.Sprintf("sudo cp -rf %s/system.ini %s", neLicensePath, neLicensePathBack)) + // 上传授权文件去覆盖 - NewNeInfoImpl.NeRunCMD(neLicense.NeType, neLicense.NeId, fmt.Sprintf("sudo chmod o+w %s/system.ini", neLicensePath)) - if err := ssh.FileSCPLocalToNe(neHostInfo.Addr, omcLicensePath, neLicensePath+"/system.ini"); err != nil { - return fmt.Errorf("error uploading license") + if err := sftpClient.CopyFileLocalToRemote(omcLicensePath, neLicensePath); err != nil { + return err } // 重启服务 if neLicense.Reload { cmdStr := fmt.Sprintf("sudo service %s restart", neTypeLower) if neTypeLower == "ims" { - cmdStr = "sudo ims-stop && sudo ims-start" + cmdStr = "sudo ims-stop || true && sudo ims-start" } else if neTypeLower == "omc" { cmdStr = "sudo /usr/local/omc/bin/omcsvc.sh restart" } - NewNeInfoImpl.NeRunCMD(neLicense.NeType, neLicense.NeId, cmdStr) + sshClient.RunCMD(cmdStr) } return nil } diff --git a/src/modules/network_element/service/ne_software.go b/src/modules/network_element/service/ne_software.go index 5f5e10f2..37e9ad4a 100644 --- a/src/modules/network_element/service/ne_software.go +++ b/src/modules/network_element/service/ne_software.go @@ -25,7 +25,6 @@ type INeSoftware interface { // CheckUniqueTypeAndNameAndVersion 校验网元类型和文件名版本是否唯一 CheckUniqueTypeAndNameAndVersion(neType, name, version, id string) bool - // UploadToNeHost 安装包上传到网元主机 - // 返回执行命令步骤 - UploadToNeHost(neSoftware model.NeSoftware) ([]string, error) + // UpdateVersions 更新软件包对应网元的新版本 + UpdateVersions(neSoftware model.NeSoftware, neVersion model.NeVersion) int64 } diff --git a/src/modules/network_element/service/ne_software.impl.go b/src/modules/network_element/service/ne_software.impl.go index 77783a33..8ac52094 100644 --- a/src/modules/network_element/service/ne_software.impl.go +++ b/src/modules/network_element/service/ne_software.impl.go @@ -3,11 +3,8 @@ package service import ( "fmt" "os" - "path/filepath" - "strings" "be.ems/src/framework/utils/file" - "be.ems/src/framework/utils/ssh" "be.ems/src/modules/network_element/model" "be.ems/src/modules/network_element/repository" ) @@ -47,26 +44,69 @@ func (r *NeSoftwareImpl) SelectById(id string) model.NeSoftware { // Insert 新增信息 func (r *NeSoftwareImpl) Insert(neSoftware model.NeSoftware) string { - return r.neSoftwareRepository.Insert(neSoftware) + inserId := r.neSoftwareRepository.Insert(neSoftware) + if inserId != "" { + // 更新同类型的新包版本 + neVersions := NewNeVersionImpl.SelectList(model.NeVersion{NeType: neSoftware.NeType}) + if len(neVersions) > 0 { + for _, neVersion := range neVersions { + neVersion.NewName = neSoftware.Name + neVersion.NewVersion = neSoftware.Version + neVersion.NewPath = neSoftware.Path + neVersion.Status = "3" + neVersion.UpdateBy = neSoftware.CreateBy + NewNeVersionImpl.Update(neVersion) + } + } + } + return inserId } // Update 修改信息 func (r *NeSoftwareImpl) Update(neSoftware model.NeSoftware) int64 { - return r.neSoftwareRepository.Update(neSoftware) + rows := r.neSoftwareRepository.Update(neSoftware) + if rows > 0 { + // 更新同类型的新包版本 + neVersions := NewNeVersionImpl.SelectList(model.NeVersion{ + NeType: neSoftware.NeType, + Status: "3", + }) + if len(neVersions) > 0 { + for _, neVersion := range neVersions { + neVersion.NewName = neSoftware.Name + neVersion.NewVersion = neSoftware.Version + neVersion.NewPath = neSoftware.Path + neVersion.Status = "3" + neVersion.UpdateBy = neSoftware.UpdateBy + NewNeVersionImpl.Update(neVersion) + } + } + } + return rows } // DeleteByIds 批量删除信息 func (r *NeSoftwareImpl) DeleteByIds(ids []string) (int64, error) { // 检查是否存在 - rowIds := r.neSoftwareRepository.SelectByIds(ids) - if len(rowIds) <= 0 { + rows := r.neSoftwareRepository.SelectByIds(ids) + if len(rows) <= 0 { return 0, fmt.Errorf("neSoftware.noData") } - if len(rowIds) == len(ids) { + if len(rows) == len(ids) { + // 遍历软件包列表进行文件删除 + for _, row := range rows { + // 检查文件是否存在 + filePath := file.ParseUploadFilePath(row.Path) + if _, err := os.Stat(filePath); err != nil { + continue + } + os.Remove(filePath) + } rows := r.neSoftwareRepository.DeleteByIds(ids) return rows, nil } + // 删除信息失败! return 0, fmt.Errorf("delete fail") } @@ -84,54 +124,20 @@ func (r *NeSoftwareImpl) CheckUniqueTypeAndNameAndVersion(neType, name, version, return uniqueId == "" } -// UploadToNeHost 安装包上传到网元主机 -// 返回执行命令步骤 -func (r *NeSoftwareImpl) UploadToNeHost(neSoftware model.NeSoftware) ([]string, error) { - cmdStrArr := []string{} - // 检查文件是否存在 - filePath := file.ParseUploadFilePath(neSoftware.Path) - if _, err := os.Stat(filePath); err != nil { - return cmdStrArr, fmt.Errorf("file read failure") +// UpdateVersions 更新软件包对应网元的新版本 +func (r *NeSoftwareImpl) UpdateVersions(neSoftware model.NeSoftware, neVersion model.NeVersion) int64 { + var rows int64 = 0 + // 更新同类型的新包版本 + neVersions := NewNeVersionImpl.SelectList(neVersion) + if len(neVersions) > 0 { + for _, v := range neVersions { + v.NewName = neSoftware.Name + v.NewVersion = neSoftware.Version + v.NewPath = neSoftware.Path + v.Status = "3" + v.UpdateBy = neVersion.UpdateBy + rows += NewNeVersionImpl.Update(v) + } } - fileName := filepath.Base(neSoftware.Path) - if strings.Contains(fileName, "*") { - fileName = strings.ReplaceAll(fileName, "*", "_") - } - nePath := "/tmp" - neFilePath := fmt.Sprintf("%s/%s", nePath, fileName) - - // 检查网元主机 - neHostInfo := NewNeHostImpl.SelectById(neSoftware.HostId) - if neHostInfo.HostType != "ssh" || neHostInfo.HostID != neSoftware.HostId { - return cmdStrArr, fmt.Errorf("no found host info") - } - - // 上传软件包到 /tmp - if err := ssh.FileSCPLocalToNe(neHostInfo.Addr, filePath, neFilePath); err != nil { - return cmdStrArr, fmt.Errorf("error uploading package") - } - - // 安装软件包 - cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo dpkg -i %s", neFilePath)) - - if neSoftware.NeType == "IMS" { - // 公网 PLMN地址 - cmdStrArr = append(cmdStrArr, "sudo /usr/local/etc/ims/default/tools/modipplmn.sh {PUBIP} {MCC} {MNC}") - // 内网 服务地址 - cmdStrArr = append(cmdStrArr, "sudo /usr/local/etc/ims/default/tools/modintraip.sh {PRIIP}") - // 10s后停止服务 - cmdStrArr = append(cmdStrArr, "sudo ims-start") - cmdStrArr = append(cmdStrArr, `nohup sh -c "sleep 10s && sudo ims-stop" > /dev/null 2>&1 &`) - } else { - // 10s后停止服务 - cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo service %s restart", strings.ToLower(neSoftware.NeType))) - cmdStrArr = append(cmdStrArr, fmt.Sprintf(`nohup sh -c "sleep 10s && sudo service %s stop" > /dev/null 2>&1 &`, strings.ToLower(neSoftware.NeType))) - } - - // 删除软件包 - cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo rm %s", neFilePath)) - - // 结束 - cmdStrArr = append(cmdStrArr, fmt.Sprintf("echo '%s software install successful!'", neSoftware.NeType)) - return cmdStrArr, nil + return rows } diff --git a/src/modules/network_element/service/ne_version.go b/src/modules/network_element/service/ne_version.go index d0ebc058..f92a81be 100644 --- a/src/modules/network_element/service/ne_version.go +++ b/src/modules/network_element/service/ne_version.go @@ -22,9 +22,11 @@ type INeVersion interface { // DeleteByIds 批量删除信息 DeleteByIds(ids []string) (int64, error) - // SelectByTypeAndID 通过网元类型和网元ID查询 - SelectByTypeAndID(neType, neId string) model.NeVersion + // SelectByNeTypeAndNeID 通过网元类型和网元ID查询 + SelectByNeTypeAndNeID(neType, neId string) model.NeVersion - // CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 - CheckUniqueTypeAndID(neType, neId, id string) bool + // Operate 操作版本上传到网元主机执行命令 + // + // action 安装行为:install upgrade rollback + Operate(action string, neVersion model.NeVersion, preinput map[string]string) (string, error) } diff --git a/src/modules/network_element/service/ne_version.impl.go b/src/modules/network_element/service/ne_version.impl.go index d3f4f08b..473f109a 100644 --- a/src/modules/network_element/service/ne_version.impl.go +++ b/src/modules/network_element/service/ne_version.impl.go @@ -2,7 +2,13 @@ package service import ( "fmt" + "os" + "path/filepath" + "strings" + "time" + "be.ems/src/framework/utils/file" + "be.ems/src/framework/utils/ssh" "be.ems/src/modules/network_element/model" "be.ems/src/modules/network_element/repository" ) @@ -66,8 +72,8 @@ func (r *NeVersionImpl) DeleteByIds(ids []string) (int64, error) { return 0, fmt.Errorf("delete fail") } -// SelectByTypeAndID 通过网元类型和网元ID查询 -func (r *NeVersionImpl) SelectByTypeAndID(neType, neId string) model.NeVersion { +// SelectByNeTypeAndNeID 通过网元类型和网元ID查询 +func (r *NeVersionImpl) SelectByNeTypeAndNeID(neType, neId string) model.NeVersion { neVersions := r.neVersionRepository.SelectList(model.NeVersion{ NeType: neType, NeId: neId, @@ -78,14 +84,539 @@ func (r *NeVersionImpl) SelectByTypeAndID(neType, neId string) model.NeVersion { return model.NeVersion{} } -// CheckUniqueTypeAndID 校验网元类型和网元ID是否唯一 -func (r *NeVersionImpl) CheckUniqueTypeAndID(neType, neId, id string) bool { - uniqueId := r.neVersionRepository.CheckUniqueTypeAndID(model.NeVersion{ - NeType: neType, - NeId: neId, - }) - if uniqueId == id { - return true +// Operate 操作版本上传到网元主机执行命令 +// +// action 安装行为:install upgrade rollback +func (r *NeVersionImpl) Operate(action string, neVersion model.NeVersion, preinput map[string]string) (string, error) { + // 网元主机的SSH客户端 + sshClient, err := NewNeInfoImpl.NeRunSSHclient(neVersion.NeType, neVersion.NeId) + if err != nil { + return "", err } - return uniqueId == "" + defer sshClient.Close() + + // ========= 文件传输阶段 ========= + softwarePath := neVersion.Path + if action == "install" || action == "upgrade" { + softwarePath = neVersion.NewPath + } + if action == "rollback" { + softwarePath = neVersion.PrePath + } + neFilePaths, err := r.operateFile(sshClient, softwarePath) + if err != nil { + return "", err + } + + // ========= 安装时设置 ========= + if action == "install" { + // 网元公共配置文件 + para5GMap, err := NewNeInfoImpl.NeConfPara5GRead() + if para5GMap == nil || err != nil { + return "", fmt.Errorf("error read para5G file info") + } + if err := NewNeInfoImpl.NeConfPara5GWirte(para5GMap, []string{fmt.Sprintf("%s@%s", neVersion.NeType, neVersion.NeId)}); err != nil { + return "", fmt.Errorf("error wirte para5G file info") + } + } + + // ========= 命令生成阶段 ========= + okFlagStr, cmdStrArr, err := r.operateCommand(action, neVersion.NeType, neFilePaths) + if err != nil { + return "", err + } + // 操作自己omc时 + if neVersion.NeType == "OMC" { + return sshClient.RunCMD(fmt.Sprintf("nohup sh -c \"sleep 3s && %s\" > /dev/null 2>&1 & \n", strings.Join(cmdStrArr, " && "))) + } + + // ========= 执行阶段 ========= + commandLine, err := r.operateRun(sshClient, preinput, cmdStrArr, neVersion.NeType, okFlagStr) + if err != nil { + return "", err + } + + // ========= 完成阶段 ========= + if strings.LastIndex(commandLine, okFlagStr) > 5 { + if err := r.operateDome(action, neVersion); err != nil { + return "", err + } + } + return commandLine, nil +} + +// operateDome 操作版本-文件传输阶段 +func (r *NeVersionImpl) operateFile(sshClient *ssh.ConnSSH, softwarePath string) ([]string, error) { + // 网元主机的SSH客户端进行文件传输 + sftpClient, err := sshClient.NewClientSFTP() + if err != nil { + return nil, err + } + defer sftpClient.Close() + + nePath := "/tmp" + copyFileToNeMap := map[string]string{} + + // 统一处理多个文件和单个文件的情况 + var softwarePaths []string + if strings.Contains(softwarePath, ",") { + softwarePaths = strings.Split(softwarePath, ",") + } else { + softwarePaths = []string{softwarePath} + } + + for _, path := range softwarePaths { + // 检查文件是否存在 + localFilePath := file.ParseUploadFilePath(path) + if _, err := os.Stat(localFilePath); err != nil { + return nil, fmt.Errorf("file read failure") + } + + fileName := filepath.Base(path) + neFilePath := fmt.Sprintf("%s/%s", nePath, fileName) + copyFileToNeMap[localFilePath] = neFilePath + } + + // 上传软件包到 /tmp + neFilePaths := []string{} + for k, v := range copyFileToNeMap { + if err = sftpClient.CopyFileLocalToRemote(k, v); err != nil { + return nil, fmt.Errorf("error uploading package") + } + neFilePaths = append(neFilePaths, v) + } + return neFilePaths, nil +} + +// operateDome 操作版本-命令生成阶段 +func (r *NeVersionImpl) operateCommand(action, neType string, neFilePaths []string) (string, []string, error) { + neTypeLower := strings.ToLower(neType) + // 命令终止结束标记 + okFlagStr := fmt.Sprintf("%s version %s successful!", neTypeLower, action) + // 安装软件包 + pkgCmdStr := fmt.Sprintf("sudo dpkg -i %s", strings.Join(neFilePaths, " ")) + fileExt := filepath.Ext(strings.ToLower(neFilePaths[0])) + if strings.HasSuffix(fileExt, "rpm") { + pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh %s", strings.Join(neFilePaths, " ")) + } + + // 组合命令输入 + cmdStrArr := []string{} + if neType == "OMC" { + cmdStrArr = append(cmdStrArr, pkgCmdStr) + if action == "install" { + cmdStrArr = append(cmdStrArr, "sudo /usr/local/omc/bin/setomc.sh -m install") // 初始化数据库 + } else { + cmdStrArr = append(cmdStrArr, "sudo /usr/local/omc/bin/omcsvc.sh stop") + cmdStrArr = append(cmdStrArr, "sudo /usr/local/omc/bin/setomc.sh -m upgrade") // 升级数据库 + } + cmdStrArr = append(cmdStrArr, "sudo /usr/local/omc/bin/omcsvc.sh restart") + } else if neType == "IMS" { + if action == "install" { + para5GData := NewNeInfoImpl.Para5GData + cmdStrArr = append(cmdStrArr, pkgCmdStr+" \n") + + // 公网 PLMN地址 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo /usr/local/etc/ims/default/tools/modipplmn.sh %s %s %s \n", para5GData["SIP_IP"], para5GData["MCC"], para5GData["MNC"])) + // 内网 服务地址 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo /usr/local/etc/ims/default/tools/modintraip.sh %s \n", para5GData["IMS_IP"])) + // IWF连接PCF服务 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.160/%s/g\" /usr/local/etc/iwf/iwf_conf.yaml \n", para5GData["PCF_IP"])) + // 设置 HOST + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s ims' /etc/hosts || echo '%s ims' | sudo tee -a /etc/hosts \n", para5GData["IMS_IP"], para5GData["IMS_IP"])) + mnc_mcc := fmt.Sprintf("mnc%s.mcc%s", para5GData["MNC_DOMAIN"], para5GData["MCC"]) + hssHost := fmt.Sprintf("%s hss.ims.%s.3gppnetwork.org hss", para5GData["UDM_IP"], mnc_mcc) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", hssHost, hssHost)) + pcrfHost := fmt.Sprintf("%s pcrf.epc.%s.3gppnetwork.org pcrf", para5GData["IMS_IP"], mnc_mcc) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", pcrfHost, pcrfHost)) + imsOrgHost := fmt.Sprintf("ims.%s.3gppnetwork.org", mnc_mcc) + imsHost := fmt.Sprintf("%s %s ims", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", imsHost, imsHost)) + pcscfHost := fmt.Sprintf("%s pcscf.%s pcscf", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", pcscfHost, pcscfHost)) + icscfHost := fmt.Sprintf("%s icscf.%s icscf", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", icscfHost, icscfHost)) + scscfHost := fmt.Sprintf("%s scscf.%s scscf", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", scscfHost, scscfHost)) + mmtelHost := fmt.Sprintf("%s mmtel.%s mmtel", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", mmtelHost, mmtelHost)) + mrfcHost := fmt.Sprintf("%s mrfc.%s mrfc", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", mrfcHost, mrfcHost)) + smsHost := fmt.Sprintf("%s smsc.%s smsc", para5GData["SIP_IP"], imsOrgHost) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s' /etc/hosts || echo '%s' | sudo tee -a /etc/hosts \n", smsHost, smsHost)) + // adb + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/adb/default/adb.conf /usr/local/etc/adb/adb.conf \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/bind 127.0.0.1/bind %s/g\" /usr/local/etc/adb/adb.conf \n", para5GData["ADB_IP"])) + + cmdStrArr = append(cmdStrArr, "sudo ims-stop || true && sudo ims-start \n") + // 30s后停止服务 + // cmdStrArr = append(cmdStrArr, "nohup sh -c \"sleep 30s && sudo ims-stop\" > /dev/null 2>&1 & \n") + } else { + cmdStrArr = append(cmdStrArr, "sudo ims-stop \n") + cmdStrArr = append(cmdStrArr, pkgCmdStr+" \n") + cmdStrArr = append(cmdStrArr, "sudo ims-start \n") + } + } else { + if action == "install" { + para5GData := NewNeInfoImpl.Para5GData + cmdStrArr = append(cmdStrArr, pkgCmdStr+" \n") + + // AMF配置修改 + if neTypeLower == "amf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/amf/default/amfcfg.yaml /usr/local/etc/amf/amfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.120/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["N2_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sst: 1/sst: %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["SST"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sd: 000001/sd: %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["SD"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/- 4388/- %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["TAC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.130/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["AUSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.150/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["SMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.160/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["PCF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.200/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["LMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.210/%s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["NEF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/- internet/- %s/g\" /usr/local/etc/amf/amfcfg.yaml \n", para5GData["DNN_DATA"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s n2' /etc/hosts || echo '%s n2' | sudo tee -a /etc/hosts \n", para5GData["N2_IP"], para5GData["N2_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s amf' /etc/hosts || echo '%s amf' | sudo tee -a /etc/hosts \n", para5GData["AMF_IP"], para5GData["AMF_IP"])) + } + // AUSF配置修改 + if neTypeLower == "ausf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/ausf/default/ausfcfg.yaml /usr/local/etc/ausf/ausfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.130/%s/g\" /usr/local/etc/ausf/ausfcfg.yaml \n", para5GData["AUSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/ausf/ausfcfg.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/ausf/ausfcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/ausf/ausfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/ausf/ausfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s ausf' /etc/hosts || echo '%s ausf' | sudo tee -a /etc/hosts \n", para5GData["AUSF_IP"], para5GData["AUSF_IP"])) + } + // UDM配置修改 + if neTypeLower == "udm" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/udmcfg.yaml /usr/local/etc/udm/udmcfg.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/nssai.yaml /usr/local/etc/udm/nssai.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/snssai.yaml /usr/local/etc/udm/snssai.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/as.yaml /usr/local/etc/udm/as.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/dnn.yaml /usr/local/etc/udm/dnn.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/udm/default/scscfSet.yaml /usr/local/etc/udm/scscfSet.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.130/%s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["AUSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc001.mcc001/mnc%s.mcc%s/g\" /usr/local/etc/udm/udmcfg.yaml \n", para5GData["MNC_DOMAIN"], para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc001.mcc001/mnc%s.mcc%s/g\" /usr/local/etc/udm/as.yaml \n", para5GData["MNC_DOMAIN"], para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc001.mcc001/mnc%s.mcc%s/g\" /usr/local/etc/udm/scscfSet.yaml \n", para5GData["MNC_DOMAIN"], para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sst: 1/sst: %s/g\" /usr/local/etc/udm/nssai.yaml \n", para5GData["SST"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sst: 1/sst: %s/g\" /usr/local/etc/udm/snssai.yaml \n", para5GData["SST"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sd: 000001/sd: %s/g\" /usr/local/etc/udm/nssai.yaml \n", para5GData["SD"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/sd: 000001/sd: %s/g\" /usr/local/etc/udm/snssai.yaml \n", para5GData["SD"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/dnn: internet/dnn: %s/g\" /usr/local/etc/udm/snssai.yaml \n", para5GData["DNN_DATA"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/dnn: ims/dnn: %s/g\" /usr/local/etc/udm/snssai.yaml \n", para5GData["DNN_IMS"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/serviceSelection: 'internet'/serviceSelection: '%s'/g\" /usr/local/etc/udm/epsApn.yaml \n", para5GData["DNN_DATA"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/serviceSelection: 'ims'/serviceSelection: '%s'/g\" /usr/local/etc/udm/epsApn.yaml \n", para5GData["DNN_IMS"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/dnn: internet/dnn: %s/g\" /usr/local/etc/udm/dnn.yaml \n", para5GData["DNN_DATA"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/dnn: ims/dnn: %s/g\" /usr/local/etc/udm/dnn.yaml \n", para5GData["DNN_IMS"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.18.81/%s/g\" /usr/local/etc/udm/as.yaml \n", para5GData["SIP_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s udm' /etc/hosts || echo '%s udm' | sudo tee -a /etc/hosts \n", para5GData["UDM_IP"], para5GData["UDM_IP"])) + // adb + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/adb/default/adb.conf /usr/local/etc/adb/adb.conf \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/bind 127.0.0.1/bind %s/g\" /usr/local/etc/adb/adb.conf \n", para5GData["ADB_IP"])) + } + // SMF配置修改 + if neTypeLower == "smf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/smf/default/smf_conf.yaml /usr/local/etc/smf/smf_conf.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.110/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["SIP_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.150/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["SMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.160/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["PCF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.190/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["UPF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s|10.2.1.0/24|%s|g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["UE_POOL"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/internet/%s/g\" /usr/local/etc/smf/smf_conf.yaml \n", para5GData["DNN_DATA"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s smf' /etc/hosts || echo '%s smf' | sudo tee -a /etc/hosts \n", para5GData["SMF_IP"], para5GData["SMF_IP"])) + } + // PCF配置修改 + if neTypeLower == "pcf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/pcf/default/pcfcfg.yaml /usr/local/etc/pcf/pcfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.160/%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["PCF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.210/%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["NEF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc001.mcc001/mnc%s.mcc%s/g\" /usr/local/etc/pcf/pcfcfg.yaml \n", para5GData["MNC_DOMAIN"], para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s pcf' /etc/hosts || echo '%s pcf' | sudo tee -a /etc/hosts \n", para5GData["PCF_IP"], para5GData["PCF_IP"])) + } + + // NSSF配置修改 + if neTypeLower == "nssf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/nssf/default/nssfcfg.yaml /usr/local/etc/nssf/nssfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.170/%s/g\" /usr/local/etc/nssf/nssfcfg.yaml \n", para5GData["NSSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/nssf/nssfcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/nssf/nssfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/nssf/nssfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s nssf' /etc/hosts || echo '%s nssf' | sudo tee -a /etc/hosts \n", para5GData["NSSF_IP"], para5GData["NSSF_IP"])) + } + // NRF配置修改 + if neTypeLower == "nrf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/nrf/default/nrfcfg.yaml /usr/local/etc/nrf/nrfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/nrf/nrfcfg.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mcc: 001/mcc: %s/g\" /usr/local/etc/nrf/nrfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc: 01/mnc: %s/g\" /usr/local/etc/nrf/nrfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s nrf' /etc/hosts || echo '%s nrf' | sudo tee -a /etc/hosts \n", para5GData["NRF_IP"], para5GData["NRF_IP"])) + } + + // UPF配置修改 + if neTypeLower == "upf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/upf/default/upfcfg.yaml /usr/local/etc/upf/upfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/upf/default/upfForwarder_1.yaml /usr/local/etc/upf/upfForwarder_1.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.190/%s/g\" /usr/local/etc/upf/upfcfg.yaml \n", para5GData["UPF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/localhost/%s/g\" /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["UPF_IP"])) + // UE + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/ueIpv4: 10.2.1.0/s/ueIpv4: 10.2.1.0/ueIpv4: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["UE_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/ueIpv4Mask: 255.255.255.0/s/ueIpv4Mask: 255.255.255.0/ueIpv4Mask: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["UE_MASK"])) + // N3 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.190/%s/g\" /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N3_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N3\"/,/ipv4Mask: 255.255.240.0/s/ipv4Mask: 255.255.240.0/ipv4Mask: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N3_MASK"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N3\"/,/gatewayIpv4: 192.168.1.254/s/gatewayIpv4: 192.168.1.254/gatewayIpv4: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N3_GW"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N3\"/,/interfacePCI: \"0000:00:00.0\"/s/interfacePCI: \"0000:00:00.0\"/interfacePCI: \"%s\"/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N3_PCI"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N3\"/,/macAddr: \"00:00:00:00:00:00\"/s/macAddr: \"00:00:00:00:00:00\"/macAddr: \"%s\"/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N3_MAC"])) + // 标准版 N6 + if para5GData["UPF_TYPE"] == "StandardUPF" { + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.191/%s/g\" /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N6_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/ipv4Mask: 255.255.240.0/s/ipv4Mask: 255.255.240.0/ipv4Mask: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N6_MASK"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/gatewayIpv4: 192.168.1.254/s/gatewayIpv4: 192.168.1.254/gatewayIpv4: %s/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N6_GW"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/interfacePCI: \"0000:00:00.0\"/s/interfacePCI: \"0000:00:00.0\"/interfacePCI: \"%s\"/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N6_PCI"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i '/- interfaceType: \"N6\"/,/macAddr: \"00:00:00:00:00:00\"/s/macAddr: \"00:00:00:00:00:00\"/macAddr: \"%s\"/' /usr/local/etc/upf/upfForwarder_1.yaml \n", para5GData["N6_MAC"])) + // 路由 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo ip route add '%s/%s' via '%s' \n", para5GData["UE_IP"], para5GData["UE_CIDR"], para5GData["N6_IP"])) + } + // 轻量版 + if para5GData["UPF_TYPE"] == "LightUPF" { + cmdStrArr = append(cmdStrArr, "sudo sed -i \"s/192.168.8.191/0.0.0.0/g\" /usr/local/etc/upf/upfForwarder_1.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo sed -i \"s/type: upfd/type: tun/g\" /usr/local/etc/upf/upfForwarder_1.yaml \n") + cmdStrArr = append(cmdStrArr, "sudo sed -i 's/driverType: vmxnet3/driverType: \"\"/g' /usr/local/etc/upf/upfForwarder_1.yaml \n") + } + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s upf' /etc/hosts || echo '%s upf' | sudo tee -a /etc/hosts \n", para5GData["UPF_IP"], para5GData["UPF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s upfn3' /etc/hosts || echo '%s upfn3' | sudo tee -a /etc/hosts \n", para5GData["N3_IP"], para5GData["N3_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s upfn6' /etc/hosts || echo '%s upfn6' | sudo tee -a /etc/hosts \n", para5GData["N6_IP"], para5GData["N6_IP"])) + } + + // LMF配置修改 - 已不再维护,导致激活License失败 + // NEF配置修改 - SNMP无需License + if neTypeLower == "nef" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/nef/default/nef_conf.yaml /usr/local/etc/nef/nef_conf.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.110/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["IMS_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.130/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["AUSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.140/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.150/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["SMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.160/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["PCF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.170/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["NSSF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.180/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["NRF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.190/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["UPF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.210/%s/g\" /usr/local/etc/nef/nef_conf.yaml \n", para5GData["NEF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s nef' /etc/hosts || echo '%s nef' | sudo tee -a /etc/hosts \n", para5GData["NEF_IP"], para5GData["NEF_IP"])) + } + + // MME配置修改 - 4G + if neTypeLower == "mme" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/mme/default/mme.conf /usr/local/etc/mme/mme.conf \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.120/%s/g\" /usr/local/etc/mme/mme.conf \n", para5GData["AMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/172.16.5.150/%s/g\" /usr/local/etc/mme/mme.conf \n", para5GData["SMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s|192.168.8.220/20|%s|g\" /usr/local/etc/mme/mme.conf \n", para5GData["S1_MMEIP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s|172.16.5.220/24|%s|g\" /usr/local/etc/mme/mme.conf \n", para5GData["S11_MMEIP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s|172.16.5.221/24|%s|g\" /usr/local/etc/mme/mme.conf \n", para5GData["S10_MMEIP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/mnc001.mcc001/mnc%s.mcc%s/g\" /usr/local/etc/mme/mme.conf \n", para5GData["MNC_DOMAIN"], para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/\"00101\"/\"%s%s\"/g\" /usr/local/etc/mme/mme.conf \n", para5GData["MCC"], para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/MCC=\"001\" ; MNC=\"01\";/MCC=\"%s\" ; MNC=\"%s\";/g\" /usr/local/etc/mme/mme.conf \n", para5GData["MCC"], para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/TAC = \"1\";/TAC = \"%s\";/g\" /usr/local/etc/mme/mme.conf \n", para5GData["TAC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/TAC = 1;/TAC = %s;/g\" /usr/local/etc/mme/mme.conf \n", para5GData["TAC"])) + // SMF开启 + cmdStrArr = append(cmdStrArr, "sudo sed -i \"/^ *gxcfg:/,/^ *[^ ]/{s/enable: false/enable: true/;b};\" /usr/local/etc/smf/smf_conf.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s mme' /etc/hosts || echo '%s mme' | sudo tee -a /etc/hosts \n", para5GData["S11_MMEIP"], para5GData["S11_MMEIP"])) + } + // N3IWF配置修改 + if neTypeLower == "n3iwf" { + cmdStrArr = append(cmdStrArr, "sudo cp /usr/local/etc/n3iwf/default/n3iwfcfg.yaml /usr/local/etc/n3iwf/n3iwfcfg.yaml \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/MCC: 001/MCC: %s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["MCC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/MNC: 01/MNC: %s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["MNC"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.12.161/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["N3IWF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.12.160/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["N3IWF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.27/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["UDM_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.1.239/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["SMF_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.8.22/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["N2_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.1.161/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["N3_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo sed -i \"s/192.168.1.160/%s/g\" /usr/local/etc/n3iwf/n3iwfcfg.yaml \n", para5GData["N6_IP"])) + cmdStrArr = append(cmdStrArr, fmt.Sprintf("grep -qxF '%s n3iwf' /etc/hosts || echo '%s n3iwf' | sudo tee -a /etc/hosts \n", para5GData["N3IWF_IP"], para5GData["N3IWF_IP"])) + } + + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo service %s restart \n", neTypeLower)) + // 30s后停止服务 + // cmdStrArr = append(cmdStrArr, fmt.Sprintf("nohup sh -c \"sleep 30s && sudo service %s stop\" > /dev/null 2>&1 & \n", neTypeLower)) + } else { + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo service %s stop \n", neTypeLower)) + cmdStrArr = append(cmdStrArr, pkgCmdStr+" \n") + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo service %s restart \n", neTypeLower)) + } + } + + // 删除软件包 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("sudo rm %s \n", strings.Join(neFilePaths, " "))) + // 结束 + cmdStrArr = append(cmdStrArr, fmt.Sprintf("echo '%s' \n", okFlagStr)) + + return okFlagStr, cmdStrArr, nil +} + +// operateDome 操作版本-执行阶段 +func (r *NeVersionImpl) operateRun(sshClient *ssh.ConnSSH, preinput map[string]string, cmdStrArr []string, neType string, okFlagStr string) (string, error) { + // ssh连接会话 + clientSession, err := sshClient.NewClientSession(127, 42) + if err != nil { + return "", fmt.Errorf("neinfo ssh client session new err") + } + defer clientSession.Close() + + firstRead := true // 首次命令进行记录日志信息 + commandLineText := "" // 日志信息 + done := make(chan bool) // 完成信号 + // 超时退出 120s + timeoutTicker := time.NewTicker(120 * time.Second) + defer timeoutTicker.Stop() + // 实时读取SSH消息直接输出 + msTicker := time.NewTicker(100 * time.Millisecond) + defer msTicker.Stop() + go func() { + for { + select { + case <-timeoutTicker.C: + done <- true + return + case <-msTicker.C: + outputByte := clientSession.Read() + if len(outputByte) > 0 { + outputStr := string(outputByte) + // 非首次进行记录命令 + if !firstRead { + commandLineText += outputStr + } + + // IMS预输入 + if neType == "IMS" { + // IMS包 P/I/S-CSCF Config 配置覆盖 + if strings.Contains(outputStr, "(P/I/S-CSCF Config)? ") { + if pisCSCF, ok := preinput["pisCSCF"]; ok && pisCSCF != "" { + clientSession.Write(fmt.Sprintf("%s \n", pisCSCF)) + } else { + clientSession.Write("y \n") + } + continue + } + // MF包 etc下目录覆盖 + if strings.Contains(outputStr, "/usr/local/etc/mf directory? (Yes/No, default: No)") { + if pisCSCF, ok := preinput["updateMFetc"]; ok && pisCSCF != "" { + clientSession.Write(fmt.Sprintf("%s \n", pisCSCF)) + } else { + clientSession.Write("No \n") + } + continue + } + // MF包 share下目录覆盖 + if strings.Contains(outputStr, "/usr/local/share/mf directory? (Yes/No, default: No)") { + if pisCSCF, ok := preinput["updateMFshare"]; ok && pisCSCF != "" { + clientSession.Write(fmt.Sprintf("%s \n", pisCSCF)) + } else { + clientSession.Write("No \n") + } + continue + } + } + + // 命令终止符后继续执行命令 + if len(cmdStrArr) > 0 && strings.LastIndex(outputStr, "~$ ") > 2 { + if firstRead { + firstRead = false + } + shiftElement := cmdStrArr[0] // 获取第一个元素 + cmdStrArr = cmdStrArr[1:] // 将第一个元素从切片中移除 + clientSession.Write(shiftElement) + continue + } + // 最后输出的退出标记 + if strings.LastIndex(outputStr, okFlagStr) > 5 { + done <- true + break + } + } + } + } + }() + // 等待写入协程完成 + <-done + + return commandLineText, nil +} + +// operateDome 操作版本-完成阶段 +func (r *NeVersionImpl) operateDome(action string, neVersion model.NeVersion) error { + if action == "install" { + // 网元信息 + neInfo := NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neVersion.NeType, neVersion.NeId) + if neInfo.NeId != neVersion.NeId { + return fmt.Errorf("error found neinfo") + } + // ========= 网元OAM配置文件 start ========== + if err := NewNeInfoImpl.NeConfOAMSync(neInfo, nil, true); err != nil { + return fmt.Errorf("error wirte OAM file info") + } + // ========= 网元OAM配置文件 end =========== + } + + // 更新Version + verInfo := r.SelectByNeTypeAndNeID(neVersion.NeType, neVersion.NeId) + if verInfo.NeId == neVersion.NeId { + curName := verInfo.Name + curVersion := verInfo.Version + curPath := verInfo.Path + if action == "install" { + verInfo.Name = neVersion.NewName + verInfo.Version = neVersion.NewVersion + verInfo.Path = neVersion.NewPath + verInfo.PreName = "-" + verInfo.PreVersion = "-" + verInfo.PrePath = "-" + verInfo.NewName = "-" + verInfo.NewVersion = "-" + verInfo.NewPath = "-" + } + if action == "upgrade" { + verInfo.Name = neVersion.NewName + verInfo.Version = neVersion.NewVersion + verInfo.Path = neVersion.NewPath + verInfo.PreName = curName + verInfo.PreVersion = curVersion + verInfo.PrePath = curPath + verInfo.NewName = "-" + verInfo.NewVersion = "-" + verInfo.NewPath = "-" + } + if action == "rollback" { + verInfo.Name = neVersion.PreName + verInfo.Version = neVersion.PreVersion + verInfo.Path = neVersion.PrePath + verInfo.PreName = curName + verInfo.PreVersion = curVersion + verInfo.PrePath = curPath + } + + verInfo.Status = "1" + NewNeVersionImpl.Update(verInfo) + } + return nil } diff --git a/src/modules/ws/controller/ws.go b/src/modules/ws/controller/ws.go index 50fd01fa..04257dd3 100644 --- a/src/modules/ws/controller/ws.go +++ b/src/modules/ws/controller/ws.go @@ -144,8 +144,14 @@ func (s *WSController) SSH(c *gin.Context) { // 创建链接SSH客户端 var connSSH ssh.ConnSSH neHost.CopyTo(&connSSH) - client, err := connSSH.NewClient() - if err != nil { + var client *ssh.ConnSSH + var clientErr error + if neHost.AuthMode == "2" { + client, clientErr = connSSH.NewClientByLocalPrivate() + } else { + client, clientErr = connSSH.NewClient() + } + if clientErr != nil { // 连接主机失败,请检查连接参数后重试 c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo"))) return @@ -250,8 +256,19 @@ func (s *WSController) Telnet(c *gin.Context) { } defer client.Close() + // 终端单行字符数 + cols, err := strconv.Atoi(c.Query("cols")) + if err != nil || cols > 254 { + cols = 80 + } + // 终端显示行数 + rows, err := strconv.Atoi(c.Query("rows")) + if err != nil || cols > rows { + rows = 40 + } + // 创建Telnet客户端会话 - clientSession, err := client.NewClientSession() + clientSession, err := client.NewClientSession(uint8(cols), uint8(rows)) if err != nil { // 连接主机失败,请检查连接参数后重试 c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo")))