Merge remote-tracking branch 'origin/lichang'
This commit is contained in:
@@ -10,6 +10,7 @@ amf:
|
||||
filter: "0~64"
|
||||
display: "AMF Name"
|
||||
comment: ""
|
||||
visible: "self"
|
||||
- name: "relativeCapacity"
|
||||
type: "int"
|
||||
value: "255"
|
||||
@@ -17,6 +18,7 @@ amf:
|
||||
filter: "0~255"
|
||||
display: "Relative Capacity"
|
||||
comment: "0~255"
|
||||
visible: "self"
|
||||
- name: "sbiScheme"
|
||||
type: "enum"
|
||||
value: "0"
|
||||
@@ -31,6 +33,7 @@ amf:
|
||||
filter: "0~64"
|
||||
display: "SBI Server IP"
|
||||
comment: ""
|
||||
visible: "self"
|
||||
- name: "sbiServerPort"
|
||||
type: "int"
|
||||
value: "8080"
|
||||
@@ -230,6 +233,7 @@ amf:
|
||||
association:
|
||||
display: "TNL Association List"
|
||||
sort: 3
|
||||
visible: "self"
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -262,6 +266,7 @@ amf:
|
||||
guami:
|
||||
display: "GUAMI List"
|
||||
sort: 5
|
||||
visible: "self"
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
|
||||
210
config/param/sgwc_param_config.yaml
Normal file
210
config/param/sgwc_param_config.yaml
Normal file
@@ -0,0 +1,210 @@
|
||||
sgwc:
|
||||
sgwcSystem:
|
||||
display: "System Config"
|
||||
sort: 1
|
||||
list:
|
||||
- name: "s11IpType"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "^(IPv4|IPv6|IPv4v6)$"
|
||||
display: "Local S11 IP Type"
|
||||
comment: "IPv4/IPv6/IPv4v6"
|
||||
- name: "s11Ipv4"
|
||||
type: "string"
|
||||
value: "172.16.5.80"
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local S11 IPv4"
|
||||
comment: "IPv4 Format"
|
||||
- name: "s11Ipv6"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local S11 IPv6"
|
||||
comment: "IPv6 Format"
|
||||
- name: "s58IpType"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "^(IPv4|IPv6|IPv4v6)$"
|
||||
display: "Local S5/S8 IP Type"
|
||||
comment: "IPv4/IPv6/IPv4v6"
|
||||
- name: "s58Ipv4"
|
||||
type: "string"
|
||||
value: "172.16.5.81"
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local S5/S8 IPv4"
|
||||
comment: "IPv4 Format"
|
||||
- name: "s58Ipv6"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local S5/S8 IPv6"
|
||||
comment: "IPv6 Format"
|
||||
- name: "sxIpType"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "^(IPv4|IPv6|IPv4v6)$"
|
||||
display: "Local Sx IP Type"
|
||||
comment: "IPv4/IPv6/IPv4v6"
|
||||
- name: "sxIpv4"
|
||||
type: "string"
|
||||
value: "172.16.5.81"
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local Sx IPv4"
|
||||
comment: "IPv4 Format"
|
||||
- name: "sxIpv6"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Local Sx IPv6"
|
||||
comment: "IPv6 Format"
|
||||
upfConfig:
|
||||
display: "UPF Config"
|
||||
sort: 3
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
filter: "0~2047"
|
||||
display: "Index"
|
||||
comment: ""
|
||||
- name: "id"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "UPF ID"
|
||||
comment: ""
|
||||
- name: "addr"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "7~45"
|
||||
display: "Address"
|
||||
comment: "e.g. ip:port"
|
||||
dnnSelectUpf:
|
||||
display: "DNN Select UPF"
|
||||
sort: 5
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
value: "0"
|
||||
access: "read-only"
|
||||
filter: "0~65535"
|
||||
display: "Index"
|
||||
comment: ""
|
||||
- name: "dnn"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "DNN"
|
||||
comment: ""
|
||||
- name: "upfId"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "UPF ID"
|
||||
comment: ""
|
||||
dnnTaiSelectUpf:
|
||||
display: "DNN TAI Select UPF"
|
||||
sort: 7
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
filter: "0~65535"
|
||||
display: "Index"
|
||||
comment: ""
|
||||
- name: "dnn"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "DNN"
|
||||
comment: ""
|
||||
- name: "tai"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "TAI"
|
||||
comment: "MCC+MNC+TAC"
|
||||
- name: "upfId"
|
||||
type: "string"
|
||||
value: "upf2-Id"
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "UPF ID"
|
||||
comment: ""
|
||||
cdrConfig:
|
||||
display: "Charging Data Report Config"
|
||||
sort: 9
|
||||
list:
|
||||
- name: "enable"
|
||||
type: "bool"
|
||||
value: "false"
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "CDR Enable"
|
||||
comment: ""
|
||||
- name: "cdrFileName"
|
||||
type: "string"
|
||||
value: "smf.cdr"
|
||||
access: "read-write"
|
||||
filter: "1~64"
|
||||
display: "CDR File Name"
|
||||
comment: ""
|
||||
- name: "cdrFilePath"
|
||||
type: "string"
|
||||
value: "/var/log/smfCdr"
|
||||
access: "read-write"
|
||||
filter: "1~256"
|
||||
display: "CDR File Path"
|
||||
comment: ""
|
||||
- name: "cdrFileNum"
|
||||
type: "int"
|
||||
value: "50"
|
||||
access: "read-write"
|
||||
filter: "1~999999999"
|
||||
display: "CDR File Num"
|
||||
comment: ""
|
||||
- name: "cdrFileSize"
|
||||
type: "int"
|
||||
value: "300"
|
||||
access: "read-write"
|
||||
filter: "1~999999"
|
||||
display: "CDR File Size"
|
||||
comment: "Megabytes"
|
||||
- name: "cdrFileMaxAge"
|
||||
type: "int"
|
||||
value: "30"
|
||||
access: "read-write"
|
||||
filter: "0~9999"
|
||||
display: "CDR File Max Age"
|
||||
comment: "Days"
|
||||
- name: "timeThreshold"
|
||||
type: "int"
|
||||
value: "600"
|
||||
access: "read-write"
|
||||
filter: "0~999999999"
|
||||
display: "Time Threshold"
|
||||
comment: "Seconds"
|
||||
- name: "volumeThreshold"
|
||||
type: "int"
|
||||
value: "0~999999999999999"
|
||||
access: "read-write"
|
||||
filter: ""
|
||||
display: "Volume Threshold"
|
||||
comment: "Bytes"
|
||||
File diff suppressed because one or more lines are too long
@@ -1,47 +1,21 @@
|
||||
-- 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 `cdr_event`
|
||||
--
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cdr_event
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cdr_event`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `cdr_event` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) DEFAULT NULL,
|
||||
`ne_name` varchar(64) DEFAULT NULL,
|
||||
`rm_uid` varchar(32) DEFAULT NULL,
|
||||
`timestamp` int(11) DEFAULT NULL,
|
||||
`cdr_json` longtext DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT current_timestamp(),
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`timestamp` int DEFAULT NULL,
|
||||
`cdr_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 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 */;
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_基础表结构';
|
||||
|
||||
/*!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
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -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: 28/05/2024 10:19:12
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -31,7 +15,7 @@ CREATE TABLE `cdr_event_ims` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_IMS';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
21
database/install/cdr_event_sgwc.sql
Normal file
21
database/install/cdr_event_sgwc.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cdr_event_sgwc
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cdr_event_sgwc`;
|
||||
CREATE TABLE `cdr_event_sgwc` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`timestamp` int DEFAULT NULL,
|
||||
`cdr_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SGWC';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -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: 28/05/2024 10:19:23
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -31,7 +15,7 @@ CREATE TABLE `cdr_event_smf` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SMF';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -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: 28/05/2024 10:19:23
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -31,7 +15,7 @@ CREATE TABLE `cdr_event_smsc` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SMSC';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -68,12 +68,12 @@ INSERT INTO `sys_dict_data` VALUES (1060, 1060, 'menu.ueUser.authUDM', 'UDM鉴
|
||||
INSERT INTO `sys_dict_data` VALUES (1061, 1061, 'menu.ueUser.subUDM', 'UDM签约用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1062, 1062, 'menu.ueUser.authUDMRemark', 'UDM鉴权用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1063, 1063, 'menu.ueUser.subUDMRemark', 'UDM签约用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1064, 1064, 'menu.config.neManage', '网元管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1065, 1065, 'menu.config.configNE', '参数配置Original', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1066, 1066, 'menu.config.neManageRemark', '网元管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1067, 1067, 'menu.config.configNERemark', '参数配置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1068, 1068, 'menu.config.backupManage', '备份管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1069, 1069, 'menu.config.softwareManage', '软件管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1064, 1064, 'menu.config.neManage', '网元管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1065, 1065, 'menu.config.configNE', '参数配置Original', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1066, 1066, 'menu.config.neManageRemark', '网元管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1067, 1067, 'menu.config.configNERemark', '参数配置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1068, 1068, 'menu.config.backupManage', '备份管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1069, 1069, 'menu.config.softwareManage', '软件管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1070, 1070, 'menu.ueUser.onlineIMS', 'IMS在线用户', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1071, 1071, 'menu.ueUser.onlineUE', 'UE在线信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1072, 1072, 'menu.ueUser.base5G', '基站信息', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
@@ -82,8 +82,8 @@ INSERT INTO `sys_dict_data` VALUES (1074, 1074, 'menu.trace.task', '网元跟踪
|
||||
INSERT INTO `sys_dict_data` VALUES (1075, 1075, 'menu.trace.analysis', '网元跟踪数据', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1076, 1076, 'menu.trace.pcap', '信令抓包', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1077, 1077, 'menu.fault', '监控', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1078, 1078, 'menu.config.backupManageRemark', '备份管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1079, 1079, 'menu.config.softwareManageRemark', '软件管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1078, 1078, 'menu.config.backupManageRemark', '备份管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1079, 1079, 'menu.config.softwareManageRemark', '软件管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1080, 1080, 'menu.ueUser.onlineIMSRemark', 'IMS在线用户菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1081, 1081, 'menu.ueUser.onlineUERemark', 'UE在线信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1082, 1082, 'menu.ueUser.base5GRemark', '5G基站信息菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
@@ -140,20 +140,20 @@ INSERT INTO `sys_dict_data` VALUES (1132, 1132, 'menu.mml.neRemark', '网元操
|
||||
INSERT INTO `sys_dict_data` VALUES (1133, 1133, 'menu.mml.udmRemark', '网元UDM用户数据菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1134, 1134, 'menu.mml.setRemark', 'MML设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1135, 1135, 'menu.mml.omcRemark', 'OMC操作菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1136, 1136, 'menu.config.licenseManage', '许可证管理', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1136, 1136, 'menu.dashboard.sgwcCDR', '漫游数据话单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1137, 1137, 'menu.security', '安全', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1138, 1138, 'menu.system.systemSet', '系统设置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1139, 1139, 'menu.system.systemResource', '系统资源', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1140, 1140, 'menu.config.configNEForm', '参数配置Form', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1141, 1141, 'menu.config.configNETree', '参数配置Tree', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1142, 1142, 'menu.config.configNETreeTable', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1143, 1143, 'menu.config.licenseManageRemark', '许可证管理菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1140, 1140, 'menu.config.configNEForm', '参数配置Form', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1141, 1141, 'menu.config.configNETree', '参数配置Tree', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1142, 1142, 'menu.config.configNETreeTable', '参数配置', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1143, 1143, 'log.operate.title.sgwcCDR', '漫游数据话单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1144, 1144, 'menu.securityRemark', '安全管理目录', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1145, 1145, 'menu.system.systemSetRemark', '系统设置菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1146, 1146, 'menu.system.systemResourceRemark', '系统资源 cpu io network菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1147, 1147, 'menu.config.configNEFormRemark', '参数配置Form菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1148, 1148, 'menu.config.configNETreeRemark', '参数配置Tree菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1149, 1149, 'menu.config.configNETreeTableRemark', '参数配置TreeTable菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1147, 1147, 'menu.config.configNEFormRemark', '参数配置Form菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1148, 1148, 'menu.config.configNETreeRemark', '参数配置Tree菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (1149, 1149, 'menu.config.configNETreeTableRemark', '参数配置TreeTable菜单', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1150, 1150, 'menu.noData', '没有可访问菜单数据!', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1151, 1151, 'menu.errNameExists', '操作菜单【{name}】失败,菜单名称已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (1152, 1152, 'menu.errPathExists', '操作菜单【{name}】失败,菜单路由地址已存在', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
@@ -68,12 +68,12 @@ INSERT INTO `sys_dict_data` VALUES (3060, 3060, 'menu.ueUser.authUDM', 'UDM Auth
|
||||
INSERT INTO `sys_dict_data` VALUES (3061, 3061, 'menu.ueUser.subUDM', 'UDM Subscribers', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3062, 3062, 'menu.ueUser.authUDMRemark', 'UDM Authentication Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3063, 3063, 'menu.ueUser.subUDMRemark', 'UDM Subscriber Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3064, 3064, 'menu.config.neManage', 'NE Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3065, 3065, 'menu.config.configNE', 'Parameter Configuration Original', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT 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 INTO `sys_dict_data` VALUES (3067, 3067, 'menu.config.configNERemark', 'Parameter Configuration Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3068, 3068, 'menu.config.backupManage', 'Backup Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3069, 3069, 'menu.config.softwareManage', 'Software Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3064, 3064, 'menu.config.neManage', 'NE Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3065, 3065, 'menu.config.configNE', 'Parameter Configuration Original', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT 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 INTO `sys_dict_data` VALUES (3067, 3067, 'menu.config.configNERemark', 'Parameter Configuration Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3068, 3068, 'menu.config.backupManage', 'Backup Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3069, 3069, 'menu.config.softwareManage', 'Software Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3070, 3070, 'menu.ueUser.onlineIMS', 'IMS Online Users', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3071, 3071, 'menu.ueUser.onlineUE', 'UE Online Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3072, 3072, 'menu.ueUser.base5G', 'Radio Information', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
@@ -82,8 +82,8 @@ INSERT INTO `sys_dict_data` VALUES (3074, 3074, 'menu.trace.task', 'NE Trace Tas
|
||||
INSERT INTO `sys_dict_data` VALUES (3075, 3075, 'menu.trace.analysis', 'NE Trace Task Data', 'i18n_en', '', '', '1', 'supervisor', 1700000000000, NULL, 0, '');
|
||||
INSERT INTO `sys_dict_data` VALUES (3076, 3076, 'menu.trace.pcap', 'Signaling Capture', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3077, 3077, 'menu.fault', 'Monitor', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3078, 3078, 'menu.config.backupManageRemark', 'Backup Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3079, 3079, 'menu.config.softwareManageRemark', 'Software Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3078, 3078, 'menu.config.backupManageRemark', 'Backup Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3079, 3079, 'menu.config.softwareManageRemark', 'Software Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT 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 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 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);
|
||||
@@ -140,20 +140,20 @@ INSERT INTO `sys_dict_data` VALUES (3132, 3132, 'menu.mml.neRemark', 'Network El
|
||||
INSERT 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 INTO `sys_dict_data` VALUES (3134, 3134, 'menu.mml.setRemark', 'MML Setup Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3135, 3135, 'menu.mml.omcRemark', 'OMC Operation Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3136, 3136, 'menu.config.licenseManage', 'License Management', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3136, 3136, 'menu.dashboard.sgwcCDR', 'Roaming Data CDR', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3137, 3137, 'menu.security', 'Security', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3138, 3138, 'menu.system.systemSet', 'System Settings', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3139, 3139, 'menu.system.systemResource', 'System Resources', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3140, 3140, 'menu.config.configNEForm', 'Parameter Configuration Form', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3141, 3141, 'menu.config.configNETree', 'Parameter Configuration Tree', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3142, 3142, 'menu.config.configNETreeTable', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3143, 3143, 'menu.config.licenseManageRemark', 'License Management Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3140, 3140, 'menu.config.configNEForm', 'Parameter Configuration Form', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3141, 3141, 'menu.config.configNETree', 'Parameter Configuration Tree', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- INSERT INTO `sys_dict_data` VALUES (3142, 3142, 'menu.config.configNETreeTable', 'Parameter Configuration', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3143, 3143, 'log.operate.title.sgwcCDR', 'Roaming Data CDR', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3144, 3144, 'menu.securityRemark', 'Security Management Catalog', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT INTO `sys_dict_data` VALUES (3145, 3145, 'menu.system.systemSetRemark', 'System Settings Menu', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
INSERT 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 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 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 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 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 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 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 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 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 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);
|
||||
|
||||
@@ -129,9 +129,9 @@ INSERT INTO `sys_menu` VALUES (1055, 'menu.common.edit', 116, 5, '#', NULL, '1',
|
||||
INSERT 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 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 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 INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '0', 'M', '1', '0', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark');
|
||||
INSERT INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 100, 'backupManage', 'configManage/backupManage/index', '1', '0', 'M', '1', '0', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark');
|
||||
INSERT INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '0', 'M', '1', '0', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark');
|
||||
-- INSERT INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '0', 'M', '1', '0', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark');
|
||||
-- INSERT INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 100, 'backupManage', 'configManage/backupManage/index', '1', '0', 'M', '1', '0', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark');
|
||||
-- INSERT INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '0', 'M', '1', '0', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark');
|
||||
INSERT 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 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 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');
|
||||
@@ -161,11 +161,11 @@ INSERT INTO `sys_menu` VALUES (2108, 'menu.mml.ne', 2107, 1, 'neOperate', 'mmlMa
|
||||
INSERT 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 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 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 INTO `sys_menu` VALUES (2112, 'menu.config.licenseManage', 4, 5, 'license', 'configManage/license/index', '1', '1', 'M', '1', '0', 'configManage/license/index', 'icon-shang', 'supervisor', 1700000000000, NULL, 0, 'menu.config.licenseManageRemark');
|
||||
INSERT INTO `sys_menu` VALUES (2112, 'menu.dashboard.sgwcCDR', 2140, 12, 'sgwcCDR', 'dashboard/sgwcCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-paixu', 'supervisor', 1723107637982, 'supervisor', 1723107637982, '');
|
||||
INSERT 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 INTO `sys_menu` VALUES (2114, 'menu.system.systemSet', 1, 60, 'setting', 'system/setting/index', '1', '1', 'M', '1', '1', 'system:setting:index', 'icon-piliang', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemSetRemark');
|
||||
INSERT INTO `sys_menu` VALUES (2115, 'menu.system.systemResource', 1, 6, 'monitor', 'monitor/monitor/index', '1', '1', 'M', '1', '1', 'monitor:monitor:info', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemResourceRemark');
|
||||
INSERT INTO `sys_menu` VALUES (2118, 'menu.config.configNETreeTable', 4, 2, 'configNETreeTable', 'configManage/configParamTreeTable/index', '1', '1', 'M', '1', '0', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeTableRemark');
|
||||
-- INSERT INTO `sys_menu` VALUES (2118, 'menu.config.configNETreeTable', 4, 2, 'configNETreeTable', 'configManage/configParamTreeTable/index', '1', '1', 'M', '1', '0', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeTableRemark');
|
||||
INSERT 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 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);
|
||||
INSERT INTO `sys_menu` VALUES (2121, 'menu.system.user.editRole', 100, 8, NULL, NULL, '1', '1', 'B', '1', '1', 'system:user:editRole', '#', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
@@ -1,35 +1,20 @@
|
||||
/*
|
||||
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: 19/01/2024 15:57:12
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cdr_event
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS `cdr_event` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`timestamp` int(11) NULL DEFAULT NULL,
|
||||
`cdr_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`created_at` datetime NULL DEFAULT current_timestamp(),
|
||||
CREATE TABLE IF NOT EXISTS `cdr_event` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`timestamp` int DEFAULT NULL,
|
||||
`cdr_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `id`(`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_基础表结构';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -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: 28/05/2024 10:19:12
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -30,9 +14,7 @@ CREATE TABLE IF NOT EXISTS `cdr_event_ims` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
ALTER TABLE `cdr_event_ims` ADD INDEX IF NOT EXISTS `idx_type_timestamp`(`ne_type`, `timestamp`) USING BTREE;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_IMS';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
20
database/upgrade/upg_cdr_event_sgwc.sql
Normal file
20
database/upgrade/upg_cdr_event_sgwc.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cdr_event_sgwc
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS `cdr_event_sgwc` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`timestamp` int DEFAULT NULL,
|
||||
`cdr_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SGWC';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -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: 28/05/2024 10:19:23
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -30,9 +14,7 @@ CREATE TABLE IF NOT EXISTS `cdr_event_smf` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
ALTER TABLE `cdr_event_smf` ADD INDEX IF NOT EXISTS `idx_type_timestamp`(`ne_type`, `timestamp`) USING BTREE;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SMF';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -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: 28/05/2024 10:19:23
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@@ -30,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `cdr_event_smsc` (
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `id` (`id`) USING BTREE,
|
||||
KEY `idx_type_timestamp` (`ne_type`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
KEY `idx_type_timestamp` (`ne_type`,`rm_uid`,`timestamp`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SMSC';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -81,12 +81,12 @@ REPLACE INTO `sys_dict_data` VALUES (1060, 1060, 'menu.ueUser.authUDM', 'UDM鉴
|
||||
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 (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);
|
||||
@@ -95,8 +95,8 @@ REPLACE INTO `sys_dict_data` VALUES (1074, 1074, 'menu.trace.task', '网元跟
|
||||
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 (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);
|
||||
@@ -147,20 +147,20 @@ REPLACE INTO `sys_dict_data` VALUES (1132, 1132, 'menu.mml.neRemark', '网元操
|
||||
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 (1136, 1136, 'menu.dashboard.sgwcCDR', '漫游数据话单', '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 (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, 'log.operate.title.sgwcCDR', '漫游数据话单', '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 (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);
|
||||
|
||||
@@ -81,10 +81,10 @@ REPLACE INTO `sys_dict_data` VALUES (3060, 3060, 'menu.ueUser.authUDM', 'UDM Aut
|
||||
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 (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);
|
||||
@@ -93,8 +93,8 @@ REPLACE INTO `sys_dict_data` VALUES (3074, 3074, 'menu.trace.task', 'NE Trace Ta
|
||||
REPLACE INTO `sys_dict_data` VALUES (3075, 3075, 'menu.trace.analysis', 'NE Trace Task Data', '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 (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);
|
||||
@@ -145,16 +145,18 @@ REPLACE INTO `sys_dict_data` VALUES (3132, 3132, 'menu.mml.neRemark', 'Network E
|
||||
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 (3136, 3136, 'menu.dashboard.sgwcCDR', 'Roaming Data CDR', '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 (3140, 3140, 'menu.config.configNEForm', 'Parameter Configuration Form', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
-- REPLACE INTO `sys_dict_data` VALUES (3141, 3141, 'menu.config.configNETree', 'Parameter Configuration Tree', '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, 'log.operate.title.sgwcCDR', 'Roaming Data CDR', '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 (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);
|
||||
|
||||
@@ -112,9 +112,9 @@ REPLACE INTO `sys_menu` VALUES (1055, 'menu.common.edit', 116, 5, '#', NULL, '1'
|
||||
REPLACE INTO `sys_menu` VALUES (1056, 'menu.common.export', 116, 6, '#', NULL, '1', '1', 'B', '1', '1', 'monitor:job:export', '#', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE 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');
|
||||
REPLACE 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');
|
||||
REPLACE INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '0', 'M', '1', '0', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark');
|
||||
REPLACE INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 100, 'backupManage', 'configManage/backupManage/index', '1', '0', 'M', '1', '0', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark');
|
||||
REPLACE INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '0', 'M', '1', '0', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark');
|
||||
-- REPLACE INTO `sys_menu` VALUES (2075, 'menu.config.neManage', 4, 1, 'neManage', 'configManage/neManage/index', '1', '0', 'M', '1', '0', 'configManage:neManage:index', 'icon-biaoqing', 'supervisor', 1700000000000, NULL, 0, 'menu.config.neManageRemark');
|
||||
-- REPLACE INTO `sys_menu` VALUES (2078, 'menu.config.backupManage', 4, 100, 'backupManage', 'configManage/backupManage/index', '1', '0', 'M', '1', '0', 'configManage:backupManage:index', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.config.backupManageRemark');
|
||||
-- REPLACE INTO `sys_menu` VALUES (2079, 'menu.config.softwareManage', 4, 4, 'softwareManage', 'configManage/softwareManage/index', '1', '0', 'M', '1', '0', 'configManage:softwareManage:index', 'icon-huidingbu', 'supervisor', 1700000000000, NULL, 0, 'menu.config.softwareManageRemark');
|
||||
REPLACE 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');
|
||||
REPLACE 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');
|
||||
REPLACE 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');
|
||||
@@ -144,11 +144,11 @@ REPLACE INTO `sys_menu` VALUES (2108, 'menu.mml.ne', 2107, 1, 'neOperate', 'mmlM
|
||||
REPLACE 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');
|
||||
REPLACE 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');
|
||||
REPLACE 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');
|
||||
REPLACE INTO `sys_menu` VALUES (2112, 'menu.config.licenseManage', 4, 5, 'license', 'configManage/license/index', '1', '1', 'M', '1', '0', 'configManage/license/index', 'icon-shang', 'supervisor', 1700000000000, NULL, 0, 'menu.config.licenseManageRemark');
|
||||
REPLACE INTO `sys_menu` VALUES (2112, 'menu.dashboard.sgwcCDR', 2140, 12, 'sgwcCDR', 'dashboard/sgwcCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-paixu', 'supervisor', 1723107637982, 'supervisor', 1723107637982, '');
|
||||
REPLACE 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');
|
||||
REPLACE INTO `sys_menu` VALUES (2114, 'menu.system.systemSet', 1, 60, 'setting', 'system/setting/index', '1', '1', 'M', '1', '1', 'system:setting:index', 'icon-piliang', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemSetRemark');
|
||||
REPLACE INTO `sys_menu` VALUES (2115, 'menu.system.systemResource', 1, 6, 'monitor', 'monitor/monitor/index', '1', '1', 'M', '1', '1', 'monitor:monitor:info', 'icon-soutubiao', 'supervisor', 1700000000000, NULL, 0, 'menu.system.systemResourceRemark');
|
||||
REPLACE INTO `sys_menu` VALUES (2118, 'menu.config.configNETreeTable', 4, 2, 'configNETreeTable', 'configManage/configParamTreeTable/index', '1', '1', 'M', '1', '0', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeTableRemark');
|
||||
-- REPLACE INTO `sys_menu` VALUES (2118, 'menu.config.configNETreeTable', 4, 2, 'configNETreeTable', 'configManage/configParamTreeTable/index', '1', '1', 'M', '1', '0', 'configManage:configParam:index', 'icon-wofaqi', 'supervisor', 1700000000000, NULL, 0, 'menu.config.configNETreeTableRemark');
|
||||
REPLACE 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);
|
||||
REPLACE 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);
|
||||
REPLACE INTO `sys_menu` VALUES (2121, 'menu.system.user.editRole', 100, 8, NULL, NULL, '1', '1', 'B', '1', '1', 'system:user:editRole', '#', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
@@ -68,6 +68,8 @@ func PostCDREventFrom(w http.ResponseWriter, r *http.Request) {
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMF_CDR+neInfo.NeId, cdrEvent)
|
||||
case "SMSC":
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMSC_CDR+neInfo.NeId, cdrEvent)
|
||||
case "SGWC":
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_SGWC_CDR+neInfo.NeId, cdrEvent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"be.ems/src/framework/config"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
@@ -162,3 +163,19 @@ func ExecDB(source string, sql string, parameters []any) (int64, error) {
|
||||
}
|
||||
return res.RowsAffected, nil
|
||||
}
|
||||
|
||||
// PageNumSize 分页页码记录数
|
||||
func PageNumSize(pageNum, pageSize any) (int, int) {
|
||||
// 记录起始索引
|
||||
num := parse.Number(pageNum)
|
||||
if num < 1 {
|
||||
num = 1
|
||||
}
|
||||
|
||||
// 显示记录数
|
||||
size := parse.Number(pageSize)
|
||||
if size < 0 {
|
||||
size = 10
|
||||
}
|
||||
return int(num - 1), int(size)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,16 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// QueryMapString 查询参数转换Map
|
||||
func QueryMapString(c *gin.Context) map[string]string {
|
||||
queryValues := c.Request.URL.Query()
|
||||
queryParams := make(map[string]string)
|
||||
for key, values := range queryValues {
|
||||
queryParams[key] = values[0]
|
||||
}
|
||||
return queryParams
|
||||
}
|
||||
|
||||
// QueryMap 查询参数转换Map
|
||||
func QueryMap(c *gin.Context) map[string]any {
|
||||
queryValues := c.Request.URL.Query()
|
||||
|
||||
@@ -12,8 +12,13 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
libGlobal "be.ems/lib/global"
|
||||
)
|
||||
|
||||
// userAgent 自定义 User-Agent
|
||||
var userAgent = fmt.Sprintf("OMC/%s", libGlobal.Version)
|
||||
|
||||
// Get 发送 GET 请求
|
||||
// timeout 超时时间(毫秒)
|
||||
func Get(url string, headers map[string]string, timeout int) ([]byte, error) {
|
||||
@@ -29,6 +34,8 @@ func Get(url string, headers map[string]string, timeout int) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||
for key, value := range headers {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
@@ -60,8 +67,8 @@ func Post(url string, data url.Values, headers map[string]string) ([]byte, error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
|
||||
for key, value := range headers {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
@@ -100,8 +107,8 @@ func PostJSON(url string, data any, headers map[string]string) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||
for key, value := range headers {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
@@ -156,6 +163,7 @@ func PostUploadFile(url string, params map[string]string, file *os.File) ([]byte
|
||||
return nil, fmt.Errorf("failed to create HTTP request: %v", err)
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", writer.FormDataContentType())
|
||||
|
||||
client := &http.Client{}
|
||||
@@ -193,6 +201,8 @@ func PutJSON(url string, data any, headers map[string]string) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||
for key, value := range headers {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
@@ -224,6 +234,8 @@ func Delete(url string, headers map[string]string) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
req.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||
for key, value := range headers {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
|
||||
@@ -10,15 +10,14 @@ import (
|
||||
|
||||
// 实例化控制层 CommontController 结构体
|
||||
var NewCommont = &CommontController{
|
||||
commontService: commonService.NewCommontImpl,
|
||||
commontService: commonService.NewCommont,
|
||||
}
|
||||
|
||||
// 通用请求
|
||||
//
|
||||
// PATH /
|
||||
type CommontController struct {
|
||||
// 通用请求服务
|
||||
commontService commonService.ICommont
|
||||
commontService *commonService.Commont // 通用请求服务
|
||||
}
|
||||
|
||||
// 哈希加密
|
||||
@@ -36,17 +35,12 @@ func (s *CommontController) I18n(c *gin.Context) {
|
||||
|
||||
i18nLang := i18n.TKey(language, "i18n")
|
||||
hello := i18n.TKey(language, "hello")
|
||||
ivs := i18n.TTemplate(language, "errorFields", nil)
|
||||
errorFields := i18n.TTemplate(language, "errorFields", map[string]any{
|
||||
"num": 1000,
|
||||
"hello": "你好",
|
||||
"h2o2": false,
|
||||
"fileName": " ====",
|
||||
errorFields := i18n.TTemplate(language, "dictData.errLabelExists", map[string]any{
|
||||
"name": " ====",
|
||||
})
|
||||
c.JSON(200, map[string]any{
|
||||
"lang": language,
|
||||
"i18nLang": i18nLang,
|
||||
"ivs": ivs,
|
||||
"hello": hello,
|
||||
"errorFields": errorFields,
|
||||
})
|
||||
|
||||
@@ -95,7 +95,7 @@ func (s *FileController) Upload(c *gin.Context) {
|
||||
|
||||
newFileName := upFilePath[strings.LastIndex(upFilePath, "/")+1:]
|
||||
c.JSON(200, result.OkData(map[string]string{
|
||||
"url": "http://" + c.Request.Host + upFilePath,
|
||||
"url": "//" + c.Request.Host + upFilePath,
|
||||
"fileName": upFilePath,
|
||||
"newFileName": newFileName,
|
||||
"originalFileName": formFile.Filename,
|
||||
@@ -160,7 +160,7 @@ func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
|
||||
newFileName := mergeFilePath[strings.LastIndex(mergeFilePath, "/")+1:]
|
||||
c.JSON(200, result.OkData(map[string]string{
|
||||
"url": "http://" + c.Request.Host + mergeFilePath,
|
||||
"url": "//" + c.Request.Host + mergeFilePath,
|
||||
"fileName": mergeFilePath,
|
||||
"newFileName": newFileName,
|
||||
"originalFileName": body.FileName,
|
||||
|
||||
@@ -1,7 +1,81 @@
|
||||
package service
|
||||
|
||||
// 通用请求 服务层接口
|
||||
type ICommont interface {
|
||||
// SystemConfigInfo 系统配置信息
|
||||
SystemConfigInfo() map[string]string
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
// 实例化服务层 Commont 结构体
|
||||
var NewCommont = &Commont{
|
||||
sysUserService: systemService.NewSysUserImpl,
|
||||
sysConfigService: systemService.NewSysConfigImpl,
|
||||
}
|
||||
|
||||
// 通用请求 服务层处理
|
||||
type Commont struct {
|
||||
// 用户信息服务
|
||||
sysUserService systemService.ISysUser
|
||||
// 参数配置服务
|
||||
sysConfigService systemService.ISysConfig
|
||||
}
|
||||
|
||||
// SystemConfigInfo 系统配置信息
|
||||
func (s *Commont) SystemConfigInfo() map[string]string {
|
||||
infoMap := map[string]string{}
|
||||
// 获取打包注入的全局变量信息
|
||||
infoMap["version"] = global.Version
|
||||
infoMap["buildTime"] = global.BuildTime
|
||||
// 系统首次使用标记
|
||||
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["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
|
||||
// 序列号
|
||||
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
|
||||
// 获取LOGO类型
|
||||
logoType := s.sysConfigService.SelectConfigValueByKey("sys.logo.type")
|
||||
infoMap["logoType"] = logoType
|
||||
// 获取LOGO文件
|
||||
filePathIcon := s.sysConfigService.SelectConfigValueByKey("sys.logo.filePathIcon")
|
||||
infoMap["filePathIcon"] = filePathIcon
|
||||
filePathBrand := s.sysConfigService.SelectConfigValueByKey("sys.logo.filePathBrand")
|
||||
infoMap["filePathBrand"] = filePathBrand
|
||||
// 获取系统名称
|
||||
title := s.sysConfigService.SelectConfigValueByKey("sys.title")
|
||||
infoMap["title"] = title
|
||||
// 获取版权声明
|
||||
copyright := s.sysConfigService.SelectConfigValueByKey("sys.copyright")
|
||||
infoMap["copyright"] = copyright
|
||||
// 获取是否开启用户注册功能
|
||||
registerUser := s.sysConfigService.SelectConfigValueByKey("sys.account.registerUser")
|
||||
infoMap["registerUser"] = registerUser
|
||||
// 获取登录界面背景
|
||||
loginBackground := s.sysConfigService.SelectConfigValueByKey("sys.loginBackground")
|
||||
infoMap["loginBackground"] = loginBackground
|
||||
// 系统设置-官网网址
|
||||
officialUrl := s.sysConfigService.SelectConfigValueByKey("sys.officialUrl")
|
||||
infoMap["officialUrl"] = officialUrl
|
||||
// 系统设置-系统使用文档
|
||||
helpDoc := s.sysConfigService.SelectConfigValueByKey("sys.helpDoc")
|
||||
infoMap["helpDoc"] = helpDoc
|
||||
// 国际化切换
|
||||
i18nOpen := s.sysConfigService.SelectConfigValueByKey("sys.i18n.open")
|
||||
infoMap["i18nOpen"] = i18nOpen
|
||||
// 国际化默认语言
|
||||
i18nDefault := s.sysConfigService.SelectConfigValueByKey("sys.i18n.default")
|
||||
infoMap["i18nDefault"] = i18nDefault
|
||||
return infoMap
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
// 实例化服务层 CommontImpl 结构体
|
||||
var NewCommontImpl = &CommontImpl{
|
||||
sysUserService: systemService.NewSysUserImpl,
|
||||
sysConfigService: systemService.NewSysConfigImpl,
|
||||
}
|
||||
|
||||
// 通用请求 服务层处理
|
||||
type CommontImpl struct {
|
||||
// 用户信息服务
|
||||
sysUserService systemService.ISysUser
|
||||
// 参数配置服务
|
||||
sysConfigService systemService.ISysConfig
|
||||
}
|
||||
|
||||
// SystemConfigInfo 系统配置信息
|
||||
func (s *CommontImpl) SystemConfigInfo() map[string]string {
|
||||
infoMap := map[string]string{}
|
||||
// 获取打包注入的全局变量信息
|
||||
infoMap["version"] = global.Version
|
||||
infoMap["buildTime"] = global.BuildTime
|
||||
// 系统首次使用标记
|
||||
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["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
|
||||
// 序列号
|
||||
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
|
||||
// 获取LOGO类型
|
||||
logoType := s.sysConfigService.SelectConfigValueByKey("sys.logo.type")
|
||||
infoMap["logoType"] = logoType
|
||||
// 获取LOGO文件
|
||||
filePathIcon := s.sysConfigService.SelectConfigValueByKey("sys.logo.filePathIcon")
|
||||
infoMap["filePathIcon"] = filePathIcon
|
||||
filePathBrand := s.sysConfigService.SelectConfigValueByKey("sys.logo.filePathBrand")
|
||||
infoMap["filePathBrand"] = filePathBrand
|
||||
// 获取系统名称
|
||||
title := s.sysConfigService.SelectConfigValueByKey("sys.title")
|
||||
infoMap["title"] = title
|
||||
// 获取版权声明
|
||||
copyright := s.sysConfigService.SelectConfigValueByKey("sys.copyright")
|
||||
infoMap["copyright"] = copyright
|
||||
// 获取是否开启用户注册功能
|
||||
registerUser := s.sysConfigService.SelectConfigValueByKey("sys.account.registerUser")
|
||||
infoMap["registerUser"] = registerUser
|
||||
// 获取登录界面背景
|
||||
loginBackground := s.sysConfigService.SelectConfigValueByKey("sys.loginBackground")
|
||||
infoMap["loginBackground"] = loginBackground
|
||||
// 系统设置-官网网址
|
||||
officialUrl := s.sysConfigService.SelectConfigValueByKey("sys.officialUrl")
|
||||
infoMap["officialUrl"] = officialUrl
|
||||
// 系统设置-系统使用文档
|
||||
helpDoc := s.sysConfigService.SelectConfigValueByKey("sys.helpDoc")
|
||||
infoMap["helpDoc"] = helpDoc
|
||||
// 国际化切换
|
||||
i18nOpen := s.sysConfigService.SelectConfigValueByKey("sys.i18n.open")
|
||||
infoMap["i18nOpen"] = i18nOpen
|
||||
// 国际化默认语言
|
||||
i18nDefault := s.sysConfigService.SelectConfigValueByKey("sys.i18n.default")
|
||||
infoMap["i18nDefault"] = i18nDefault
|
||||
return infoMap
|
||||
}
|
||||
@@ -48,8 +48,8 @@ func (s *AlarmController) List(c *gin.Context) {
|
||||
querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
data := s.alarmService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
rows, total := s.alarmService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// 告警删除
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"be.ems/src/framework/vo/result"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
neDataService "be.ems/src/modules/network_data/service"
|
||||
neFetchlink "be.ems/src/modules/network_element/fetch_link"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
sysService "be.ems/src/modules/system/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -206,3 +207,36 @@ func (s *AMFController) UEExport(c *gin.Context) {
|
||||
|
||||
c.FileAttachment(saveFilePath, fileName)
|
||||
}
|
||||
|
||||
// 接入基站信息列表
|
||||
//
|
||||
// GET /nb/list
|
||||
func (s *AMFController) NbInfoList(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
NeId string `form:"neId" binding:"required"`
|
||||
NbId string `form:"nbId"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("AMF", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
return
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
data, err := neFetchlink.AMFNbInfoList(neInfo, map[string]string{
|
||||
"nbId": query.NbId,
|
||||
})
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"be.ems/src/framework/vo/result"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
neDataService "be.ems/src/modules/network_data/service"
|
||||
neFetchlink "be.ems/src/modules/network_element/fetch_link"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
sysService "be.ems/src/modules/system/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -56,8 +57,8 @@ func (s *IMSController) CDRList(c *gin.Context) {
|
||||
querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// CDR会话删除
|
||||
@@ -108,13 +109,12 @@ func (s *IMSController) CDRExport(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
querys.RmUID = neInfo.RmUID
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.CDREventIMS)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("ims_cdr_event_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
@@ -149,16 +149,6 @@ func (s *IMSController) CDRExport(c *gin.Context) {
|
||||
if v, ok := cdrJSON["recordType"]; ok && v != nil {
|
||||
recordType = v.(string)
|
||||
}
|
||||
// 被叫
|
||||
called := ""
|
||||
if v, ok := cdrJSON["calledParty"]; ok && v != nil {
|
||||
called = v.(string)
|
||||
}
|
||||
// 主叫
|
||||
caller := ""
|
||||
if v, ok := cdrJSON["callerParty"]; ok && v != nil {
|
||||
caller = v.(string)
|
||||
}
|
||||
// 呼叫类型
|
||||
callType := "sms"
|
||||
callTypeLable := "SMS"
|
||||
@@ -171,6 +161,16 @@ func (s *IMSController) CDRExport(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 被叫
|
||||
called := ""
|
||||
if v, ok := cdrJSON["calledParty"]; ok && v != nil {
|
||||
called = v.(string)
|
||||
}
|
||||
// 主叫
|
||||
caller := ""
|
||||
if v, ok := cdrJSON["callerParty"]; ok && v != nil {
|
||||
caller = v.(string)
|
||||
}
|
||||
// 时长
|
||||
duration := "-"
|
||||
if v, ok := cdrJSON["callDuration"]; ok && v != nil && callType != "sms" {
|
||||
@@ -190,8 +190,11 @@ func (s *IMSController) CDRExport(c *gin.Context) {
|
||||
// 取时间
|
||||
timeStr := ""
|
||||
if v, ok := cdrJSON["releaseTime"]; ok && v != nil {
|
||||
releaseTime := parse.Number(v)
|
||||
timeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ)
|
||||
if releaseTime := parse.Number(v); releaseTime > 0 {
|
||||
timeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ)
|
||||
} else {
|
||||
timeStr = v.(string)
|
||||
}
|
||||
}
|
||||
|
||||
dataCells = append(dataCells, map[string]any{
|
||||
@@ -215,3 +218,68 @@ func (s *IMSController) CDRExport(c *gin.Context) {
|
||||
|
||||
c.FileAttachment(saveFilePath, fileName)
|
||||
}
|
||||
|
||||
// 在线会话用户数量
|
||||
//
|
||||
// GET /session/num
|
||||
func (s *IMSController) UeSessionNum(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
NeId string `form:"neId" binding:"required"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("IMS", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
return
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
num, err := neFetchlink.IMSUeSessionNum(neInfo)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkData(num))
|
||||
}
|
||||
|
||||
// 在线会话用户列表信息
|
||||
//
|
||||
// GET /session/list
|
||||
func (s *IMSController) UeSessionList(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
NeId string `form:"neId" binding:"required"`
|
||||
IMSI string `form:"imsi"`
|
||||
MSISDN string `form:"msisdn"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("IMS", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
return
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
data, err := neFetchlink.IMSUeSessionList(neInfo, map[string]string{
|
||||
"imsi": query.IMSI,
|
||||
"msisdn": query.MSISDN,
|
||||
})
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"be.ems/src/framework/vo/result"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
neDataService "be.ems/src/modules/network_data/service"
|
||||
neFetchlink "be.ems/src/modules/network_element/fetch_link"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
sysService "be.ems/src/modules/system/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -196,3 +197,36 @@ func (s *MMEController) UEExport(c *gin.Context) {
|
||||
|
||||
c.FileAttachment(saveFilePath, fileName)
|
||||
}
|
||||
|
||||
// 接入基站信息列表
|
||||
//
|
||||
// GET /nb/list
|
||||
func (s *MMEController) NbInfoList(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
NeId string `form:"neId" binding:"required"`
|
||||
NbId string `form:"nbId"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("MME", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
return
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
data, err := neFetchlink.MMENbInfoList(neInfo, map[string]string{
|
||||
"nbId": query.NbId,
|
||||
})
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
292
src/modules/network_data/controller/sgwc.go
Normal file
292
src/modules/network_data/controller/sgwc.go
Normal file
@@ -0,0 +1,292 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"be.ems/src/framework/i18n"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/ctx"
|
||||
"be.ems/src/framework/utils/file"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/vo/result"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
neDataService "be.ems/src/modules/network_data/service"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// 实例化控制层 SGWCController 结构体
|
||||
var NewSGWC = &SGWCController{
|
||||
neInfoService: neService.NewNeInfo,
|
||||
cdrEventService: neDataService.NewCDREventSGWC,
|
||||
udmUserInfoService: neDataService.NewUDMUserInfo,
|
||||
}
|
||||
|
||||
// 网元SGWC
|
||||
//
|
||||
// PATH /SGWC
|
||||
type SGWCController struct {
|
||||
neInfoService *neService.NeInfo // 网元信息服务
|
||||
cdrEventService *neDataService.CDREventSGWC // CDR会话事件服务
|
||||
udmUserInfoService *neDataService.UDMUserInfo // UDM用户信息服务
|
||||
}
|
||||
|
||||
// CDR会话列表
|
||||
//
|
||||
// GET /cdr/list
|
||||
func (s *SGWCController) CDRList(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var querys model.CDREventSGWCQuery
|
||||
if err := c.ShouldBindQuery(&querys); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息 rmUID
|
||||
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
|
||||
}
|
||||
querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// CDR会话删除
|
||||
//
|
||||
// DELETE /cdr/:cdrIds
|
||||
func (s *SGWCController) CDRRemove(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
cdrIds := c.Param("cdrIds")
|
||||
if cdrIds == "" {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
// 处理字符转id数组后去重
|
||||
ids := strings.Split(cdrIds, ",")
|
||||
uniqueIDs := parse.RemoveDuplicates(ids)
|
||||
if len(uniqueIDs) <= 0 {
|
||||
c.JSON(200, result.Err(nil))
|
||||
return
|
||||
}
|
||||
rows, err := s.cdrEventService.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))
|
||||
}
|
||||
|
||||
// CDR会话列表导出
|
||||
//
|
||||
// POST /cdr/export
|
||||
func (s *SGWCController) CDRExport(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 查询结果,根据查询条件结果,单页最大值限制
|
||||
var querys model.CDREventSGWCQuery
|
||||
if err := c.ShouldBindBodyWithJSON(&querys); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
// 限制导出数据集
|
||||
if querys.PageSize > 10000 {
|
||||
querys.PageSize = 10000
|
||||
}
|
||||
// 查询网元信息 rmUID
|
||||
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
|
||||
}
|
||||
querys.RmUID = neInfo.RmUID
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("sgwc_cdr_event_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
// 第一行表头标题
|
||||
headerCells := map[string]string{
|
||||
"A1": "ID",
|
||||
"B1": "NE Name",
|
||||
"C1": "Resource Unique ID",
|
||||
"D1": "Charging ID",
|
||||
"E1": "IMSI",
|
||||
"F1": "MSISDN",
|
||||
"G1": "GPRS Uplink",
|
||||
"H1": "GPRS Downlink",
|
||||
"I1": "Duration",
|
||||
"J1": "Invocation Time",
|
||||
"K1": "PGW Address Used",
|
||||
"L1": "SGW Address",
|
||||
"M1": "RAT Type",
|
||||
"N1": "PDPPDN Type",
|
||||
"O1": "PDPPDN Address",
|
||||
"P1": "Node Address",
|
||||
"Q1": "Node Type",
|
||||
"R1": "Record Access Point Name NI",
|
||||
"S1": "Record Cause For Rec Closing",
|
||||
"T1": "Record Sequence Number",
|
||||
"U1": "Local Record Sequence Number",
|
||||
}
|
||||
// 从第二行开始的数据
|
||||
dataCells := make([]map[string]any, 0)
|
||||
for i, row := range rows {
|
||||
idx := strconv.Itoa(i + 2)
|
||||
// 解析 JSON 字符串为 map
|
||||
var cdrJSON map[string]interface{}
|
||||
err := json.Unmarshal([]byte(row.CDRJSONStr), &cdrJSON)
|
||||
if err != nil {
|
||||
logger.Warnf("CDRExport Error parsing JSON: %s", err.Error())
|
||||
continue
|
||||
}
|
||||
// 计费ID
|
||||
chargingID := ""
|
||||
if v, ok := cdrJSON["chargingID"]; ok && v != nil {
|
||||
chargingID = fmt.Sprint(parse.Number(v))
|
||||
}
|
||||
// IMSI
|
||||
servedIMSI := ""
|
||||
if v, ok := cdrJSON["servedIMSI"]; ok && v != nil {
|
||||
servedIMSI = fmt.Sprint(v)
|
||||
}
|
||||
// MSISDN
|
||||
servedMSISDN := ""
|
||||
if v, ok := cdrJSON["servedMSISDN"]; ok && v != nil {
|
||||
servedMSISDN = fmt.Sprint(v)
|
||||
}
|
||||
// pGWAddressUsed
|
||||
pGWAddressUsed := ""
|
||||
if v, ok := cdrJSON["pGWAddressUsed"]; ok && v != nil {
|
||||
pGWAddressUsed = fmt.Sprint(v)
|
||||
}
|
||||
// sGWAddress
|
||||
sGWAddress := ""
|
||||
if v, ok := cdrJSON["sGWAddress"]; ok && v != nil {
|
||||
sGWAddress = fmt.Sprint(v)
|
||||
}
|
||||
// rATType
|
||||
rATType := ""
|
||||
if v, ok := cdrJSON["rATType"]; ok && v != nil {
|
||||
rATType = fmt.Sprint(v)
|
||||
}
|
||||
// pdpPDNType
|
||||
pdpPDNType := ""
|
||||
if v, ok := cdrJSON["pdpPDNType"]; ok && v != nil {
|
||||
pdpPDNType = fmt.Sprint(v)
|
||||
}
|
||||
// servedPDPPDNAddress
|
||||
servedPDPPDNAddress := ""
|
||||
if v, ok := cdrJSON["servedPDPPDNAddress"]; ok && v != nil {
|
||||
servedPDPPDNAddress = fmt.Sprint(v)
|
||||
}
|
||||
// servedPDPPDNAddress
|
||||
servingNodeAddress := []string{}
|
||||
if v, ok := cdrJSON["servingNodeAddress"]; ok && v != nil {
|
||||
for _, v := range v.([]any) {
|
||||
servingNodeAddress = append(servingNodeAddress, fmt.Sprint(v))
|
||||
}
|
||||
}
|
||||
// servingNodeType
|
||||
servingNodeType := []string{}
|
||||
if v, ok := cdrJSON["servingNodeType"]; ok && v != nil {
|
||||
for _, v := range v.([]any) {
|
||||
if v, ok := v.(map[string]any)["servingNodeType"]; ok && v != nil {
|
||||
servingNodeType = append(servingNodeType, fmt.Sprint(v))
|
||||
}
|
||||
}
|
||||
}
|
||||
// accessPointNameNI
|
||||
accessPointNameNI := ""
|
||||
if v, ok := cdrJSON["accessPointNameNI"]; ok && v != nil {
|
||||
accessPointNameNI = fmt.Sprint(v)
|
||||
}
|
||||
// causeForRecClosing
|
||||
causeForRecClosing := ""
|
||||
if v, ok := cdrJSON["causeForRecClosing"]; ok && v != nil {
|
||||
causeForRecClosing = fmt.Sprint(v)
|
||||
}
|
||||
// recordSequenceNumber
|
||||
recordSequenceNumber := ""
|
||||
if v, ok := cdrJSON["recordSequenceNumber"]; ok && v != nil {
|
||||
recordSequenceNumber = fmt.Sprint(v)
|
||||
}
|
||||
// localRecordSequenceNumber
|
||||
localRecordSequenceNumber := ""
|
||||
if v, ok := cdrJSON["localRecordSequenceNumber"]; ok && v != nil {
|
||||
localRecordSequenceNumber = fmt.Sprint(v)
|
||||
}
|
||||
// 数据量上行链路
|
||||
dataVolumeGPRSUplink := []string{}
|
||||
// 数据量下行链路
|
||||
dataVolumeGPRSDownlink := []string{}
|
||||
if v, ok := cdrJSON["listOfTrafficVolumes"]; ok && v != nil {
|
||||
usageList := v.([]any)
|
||||
if len(usageList) > 0 {
|
||||
for _, used := range usageList {
|
||||
usedUnit := used.(map[string]any)
|
||||
if dup, dupOk := usedUnit["dataVolumeGPRSUplink"]; dupOk {
|
||||
dataVolumeGPRSUplink = append(dataVolumeGPRSUplink, fmt.Sprint(parse.Number(dup)))
|
||||
}
|
||||
if ddown, ddownOk := usedUnit["dataVolumeGPRSDownlink"]; ddownOk {
|
||||
dataVolumeGPRSDownlink = append(dataVolumeGPRSDownlink, fmt.Sprint(parse.Number(ddown)))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 时长
|
||||
duration := "-"
|
||||
if v, ok := cdrJSON["duration"]; ok && v != nil {
|
||||
duration = fmt.Sprint(parse.Number(v))
|
||||
}
|
||||
// 调用时间
|
||||
invocationTimestamp := ""
|
||||
if v, ok := cdrJSON["recordOpeningTime"]; ok && v != nil {
|
||||
invocationTimestamp = v.(string)
|
||||
}
|
||||
|
||||
dataCells = append(dataCells, map[string]any{
|
||||
"A" + idx: row.ID,
|
||||
"B" + idx: row.NeName,
|
||||
"C" + idx: row.RmUID,
|
||||
"D" + idx: chargingID,
|
||||
"E" + idx: servedIMSI,
|
||||
"F" + idx: servedMSISDN,
|
||||
"G" + idx: strings.Join(dataVolumeGPRSUplink, ","),
|
||||
"H" + idx: strings.Join(dataVolumeGPRSDownlink, ","),
|
||||
"I" + idx: duration,
|
||||
"J" + idx: invocationTimestamp,
|
||||
"K" + idx: pGWAddressUsed,
|
||||
"L" + idx: sGWAddress,
|
||||
"M" + idx: rATType,
|
||||
"N" + idx: pdpPDNType,
|
||||
"O" + idx: servedPDPPDNAddress,
|
||||
"P" + idx: strings.Join(servingNodeAddress, ","),
|
||||
"Q" + idx: strings.Join(servingNodeType, ","),
|
||||
"R" + idx: accessPointNameNI,
|
||||
"S" + idx: causeForRecClosing,
|
||||
"T" + idx: recordSequenceNumber,
|
||||
"U" + idx: localRecordSequenceNumber,
|
||||
})
|
||||
}
|
||||
|
||||
// 导出数据表格
|
||||
saveFilePath, err := file.WriteSheet(headerCells, dataCells, fileName, "")
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.FileAttachment(saveFilePath, fileName)
|
||||
}
|
||||
@@ -57,8 +57,8 @@ func (s *SMFController) CDRList(c *gin.Context) {
|
||||
querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// CDR会话删除
|
||||
@@ -109,13 +109,12 @@ func (s *SMFController) CDRExport(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
querys.RmUID = neInfo.RmUID
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.CDREventSMF)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("smf_cdr_event_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
@@ -317,9 +316,39 @@ func (s *SMFController) CDRExport(c *gin.Context) {
|
||||
c.FileAttachment(saveFilePath, fileName)
|
||||
}
|
||||
|
||||
// 在线订阅用户数量
|
||||
//
|
||||
// GET /sub/num
|
||||
func (s *SMFController) SubUserNum(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
NeId string `form:"neId" binding:"required"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("SMF", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
return
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
num, err := neFetchlink.SMFSubNum(neInfo)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkData(num))
|
||||
}
|
||||
|
||||
// 在线订阅用户列表信息
|
||||
//
|
||||
// GET /subscribers
|
||||
// GET /sub/list
|
||||
func (s *SMFController) SubUserList(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var query struct {
|
||||
@@ -334,7 +363,7 @@ func (s *SMFController) SubUserList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 查询网元信息 rmUID
|
||||
// 查询网元信息
|
||||
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("SMF", query.NeId)
|
||||
if neInfo.NeId != query.NeId || neInfo.IP == "" {
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
"be.ems/src/modules/network_data/model"
|
||||
neDataService "be.ems/src/modules/network_data/service"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
sysService "be.ems/src/modules/system/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
@@ -55,8 +56,8 @@ func (s *SMSCController) CDRList(c *gin.Context) {
|
||||
querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// CDR会话删除
|
||||
@@ -107,13 +108,12 @@ func (s *SMSCController) CDRExport(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
querys.RmUID = neInfo.RmUID
|
||||
data := s.cdrEventService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
rows, total := s.cdrEventService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.CDREventSMSC)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("smsc_cdr_event_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
@@ -127,6 +127,8 @@ func (s *SMSCController) CDRExport(c *gin.Context) {
|
||||
"F1": "Result",
|
||||
"G1": "Time",
|
||||
}
|
||||
// 读取字典数据 CDR 原因码
|
||||
dictCDRCauseCode := sysService.NewSysDictData.SelectDictDataByType("cdr_cause_code")
|
||||
// 从第二行开始的数据
|
||||
dataCells := make([]map[string]any, 0)
|
||||
for i, row := range rows {
|
||||
@@ -166,11 +168,24 @@ func (s *SMSCController) CDRExport(c *gin.Context) {
|
||||
callResult = "Success"
|
||||
}
|
||||
}
|
||||
// 结果原因
|
||||
if v, ok := cdrJSON["cause"]; ok && v != nil && callResult == "Fail" {
|
||||
cause := fmt.Sprint(v)
|
||||
for _, v := range dictCDRCauseCode {
|
||||
if cause == v.DictValue {
|
||||
callResult = fmt.Sprintf("%s, %s", callResult, i18n.TKey(language, v.DictLabel))
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
// 取时间
|
||||
timeStr := ""
|
||||
if v, ok := cdrJSON["updateTime"]; ok && v != nil {
|
||||
releaseTime := parse.Number(v)
|
||||
timeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ)
|
||||
if releaseTime := parse.Number(v); releaseTime > 0 {
|
||||
timeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ)
|
||||
} else {
|
||||
timeStr = v.(string)
|
||||
}
|
||||
}
|
||||
|
||||
dataCells = append(dataCells, map[string]any{
|
||||
|
||||
@@ -4,37 +4,37 @@ import "time"
|
||||
|
||||
// Alarm 告警数据对象 alarm
|
||||
type Alarm struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
AlarmSeq string `json:"alarmSeq" gorm:"alarm_seq"`
|
||||
AlarmId string `json:"alarmId" gorm:"alarm_id"`
|
||||
AlarmTitle string `json:"alarmTitle" gorm:"alarm_title"`
|
||||
NeType string `json:"neType" gorm:"ne_type"`
|
||||
NeId string `json:"neId" gorm:"ne_id"`
|
||||
AlarmCode string `json:"alarmCode" gorm:"alarm_code"`
|
||||
EventTime time.Time `json:"eventTime" gorm:"event_time"`
|
||||
AlarmType string `json:"alarmType" gorm:"alarm_type"`
|
||||
OrigSeverity string `json:"origSeverity" gorm:"orig_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)
|
||||
PerceivedSeverity string `json:"perceivedSeverity" gorm:"perceived_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)
|
||||
PvFlag string `json:"pvFlag" gorm:"pv_flag"`
|
||||
NeName string `json:"neName" gorm:"ne_name"`
|
||||
ObjectUid string `json:"objectUid" gorm:"object_uid"`
|
||||
ObjectName string `json:"objectName" gorm:"object_name"`
|
||||
ObjectType string `json:"objectType" gorm:"object_type"`
|
||||
LocationInfo string `json:"locationInfo" gorm:"location_info"`
|
||||
Province string `json:"province" gorm:"province"`
|
||||
AlarmStatus string `json:"alarmStatus" gorm:"alarm_status"` // 0:clear, 1:active
|
||||
SpecificProblem string `json:"specificProblem" gorm:"specific_problem"`
|
||||
SpecificProblemId string `json:"specificProblemId" gorm:"specific_problem_id"`
|
||||
AddInfo string `json:"addInfo" gorm:"add_info"`
|
||||
Counter string `json:"counter" gorm:"counter"`
|
||||
LatestEventTime time.Time `json:"latestEventTime" gorm:"latest_event_time"`
|
||||
AckState string `json:"ackState" gorm:"ack_state"` // 0: Unacked, 1: Acked
|
||||
AckTime time.Time `json:"ackTime" gorm:"ack_time"`
|
||||
AckUser string `json:"ackUser" gorm:"ack_user"`
|
||||
ClearType string `json:"clearType" gorm:"clear_type"` // 0: Unclear, 1: AutoClear, 2: ManualClear
|
||||
ClearTime time.Time `json:"clearTime" gorm:"clear_time"`
|
||||
ClearUser string `json:"clearUser" gorm:"clear_user"`
|
||||
Timestamp time.Time `json:"timestamp" gorm:"timestamp"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
AlarmSeq string `json:"alarmSeq" gorm:"column:alarm_seq"`
|
||||
AlarmId string `json:"alarmId" gorm:"column:alarm_id"`
|
||||
AlarmTitle string `json:"alarmTitle" gorm:"column:alarm_title"`
|
||||
NeType string `json:"neType" gorm:"column:ne_type"`
|
||||
NeId string `json:"neId" gorm:"column:ne_id"`
|
||||
AlarmCode string `json:"alarmCode" gorm:"column:alarm_code"`
|
||||
EventTime time.Time `json:"eventTime" gorm:"column:event_time"`
|
||||
AlarmType string `json:"alarmType" gorm:"column:alarm_type"`
|
||||
OrigSeverity string `json:"origSeverity" gorm:"column:orig_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)
|
||||
PerceivedSeverity string `json:"perceivedSeverity" gorm:"column:perceived_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)
|
||||
PvFlag string `json:"pvFlag" gorm:"column:pv_flag"`
|
||||
NeName string `json:"neName" gorm:"column:ne_name"`
|
||||
ObjectUid string `json:"objectUid" gorm:"column:object_uid"`
|
||||
ObjectName string `json:"objectName" gorm:"column:object_name"`
|
||||
ObjectType string `json:"objectType" gorm:"column:object_type"`
|
||||
LocationInfo string `json:"locationInfo" gorm:"column:location_info"`
|
||||
Province string `json:"province" gorm:"column:province"`
|
||||
AlarmStatus string `json:"alarmStatus" gorm:"column:alarm_status"` // 0:clear, 1:active
|
||||
SpecificProblem string `json:"specificProblem" gorm:"column:specific_problem"`
|
||||
SpecificProblemId string `json:"specificProblemId" gorm:"column:specific_problem_id"`
|
||||
AddInfo string `json:"addInfo" gorm:"column:add_info"`
|
||||
Counter string `json:"counter" gorm:"column:counter"`
|
||||
LatestEventTime time.Time `json:"latestEventTime" gorm:"column:latest_event_time"`
|
||||
AckState string `json:"ackState" gorm:"column:ack_state"` // 0: Unacked, 1: Acked
|
||||
AckTime time.Time `json:"ackTime" gorm:"column:ack_time"`
|
||||
AckUser string `json:"ackUser" gorm:"column:ack_user"`
|
||||
ClearType string `json:"clearType" gorm:"column:clear_type"` // 0: Unclear, 1: AutoClear, 2: ManualClear
|
||||
ClearTime time.Time `json:"clearTime" gorm:"column:clear_time"`
|
||||
ClearUser string `json:"clearUser" gorm:"column:clear_user"`
|
||||
Timestamp time.Time `json:"timestamp" gorm:"column:timestamp"`
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
|
||||
@@ -13,6 +13,11 @@ type CDREventIMS struct {
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*CDREventIMS) TableName() string {
|
||||
return "cdr_event_ims"
|
||||
}
|
||||
|
||||
// CDREventIMSQuery CDR会话对象IMS查询参数结构体
|
||||
type CDREventIMSQuery struct {
|
||||
NeType string `json:"neType" form:"neType" binding:"required"` // 网元类型IMS
|
||||
|
||||
36
src/modules/network_data/model/cdr_event_sgwc.go
Normal file
36
src/modules/network_data/model/cdr_event_sgwc.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// CDREventSGWC CDR会话对象SGWC cdr_event_sgwc
|
||||
type CDREventSGWC struct {
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"column:ne_type"`
|
||||
NeName string `json:"neName" gorm:"column:ne_name"`
|
||||
RmUID string `json:"rmUID" gorm:"column:rm_uid"`
|
||||
Timestamp int64 `json:"timestamp" gorm:"column:timestamp"`
|
||||
CDRJSONStr string `json:"cdrJSON" gorm:"column:cdr_json"`
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
|
||||
|
||||
// ====== 非数据库字段属性 ======
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*CDREventSGWC) TableName() string {
|
||||
return "cdr_event_sgwc"
|
||||
}
|
||||
|
||||
// CDREventSGWCQuery CDR会话对象SGWC查询参数结构体
|
||||
type CDREventSGWCQuery struct {
|
||||
NeType string `json:"neType" form:"neType" binding:"required,oneof=SGWC"` // SGWC
|
||||
NeID string `json:"neId" form:"neId" binding:"required"`
|
||||
RmUID string `json:"rmUID" form:"rmUID"`
|
||||
IMSI string `json:"imsi" form:"imsi"`
|
||||
MSISDN string `json:"msisdn" form:"msisdn"`
|
||||
StartTime string `json:"startTime" form:"startTime"`
|
||||
EndTime string `json:"endTime" form:"endTime"`
|
||||
SortField string `json:"sortField" form:"sortField" binding:"omitempty,oneof=timestamp"` // 排序字段,填写结果字段
|
||||
SortOrder string `json:"sortOrder" form:"sortOrder" binding:"omitempty,oneof=asc desc"` // 排序升降序,asc desc
|
||||
PageNum int64 `json:"pageNum" form:"pageNum" binding:"required"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize" binding:"required"`
|
||||
}
|
||||
@@ -15,6 +15,11 @@ type CDREventSMF struct {
|
||||
// ====== 非数据库字段属性 ======
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*CDREventSMF) TableName() string {
|
||||
return "cdr_event_smf"
|
||||
}
|
||||
|
||||
// CDREventSMFQuery CDR会话对象SMF查询参数结构体
|
||||
type CDREventSMFQuery struct {
|
||||
NeType string `json:"neType" form:"neType" binding:"required"` // SMF
|
||||
|
||||
@@ -13,6 +13,11 @@ type CDREventSMSC struct {
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*CDREventSMSC) TableName() string {
|
||||
return "cdr_event_smsc"
|
||||
}
|
||||
|
||||
// CDREventSMSCQuery CDR会话对象SMSC查询参数结构体
|
||||
type CDREventSMSCQuery struct {
|
||||
NeType string `json:"neType" form:"neType" binding:"required"` // 网元类型SMSC
|
||||
|
||||
@@ -59,6 +59,14 @@ func Setup(router *gin.Engine) {
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.imsCDR", collectlogs.BUSINESS_TYPE_EXPORT)),
|
||||
controller.NewIMS.CDRExport,
|
||||
)
|
||||
imsGroup.GET("/session/num",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewIMS.UeSessionNum,
|
||||
)
|
||||
imsGroup.GET("/session/list",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewIMS.UeSessionList,
|
||||
)
|
||||
}
|
||||
|
||||
// 网元SMSC
|
||||
@@ -97,7 +105,11 @@ func Setup(router *gin.Engine) {
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.smfCDR", collectlogs.BUSINESS_TYPE_EXPORT)),
|
||||
controller.NewSMF.CDRExport,
|
||||
)
|
||||
smfGroup.GET("/subscribers",
|
||||
smfGroup.GET("/sub/num",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewSMF.SubUserNum,
|
||||
)
|
||||
smfGroup.GET("/sub/list",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewSMF.SubUserList,
|
||||
)
|
||||
@@ -120,6 +132,10 @@ func Setup(router *gin.Engine) {
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.amfUE", collectlogs.BUSINESS_TYPE_EXPORT)),
|
||||
controller.NewAMF.UEExport,
|
||||
)
|
||||
amfGroup.GET("/nb/list",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewAMF.NbInfoList,
|
||||
)
|
||||
}
|
||||
|
||||
// 网元UPF
|
||||
@@ -256,5 +272,28 @@ func Setup(router *gin.Engine) {
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.mmeUE", collectlogs.BUSINESS_TYPE_EXPORT)),
|
||||
controller.NewMME.UEExport,
|
||||
)
|
||||
mmeGroup.GET("/nb/list",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewMME.NbInfoList,
|
||||
)
|
||||
}
|
||||
|
||||
// 网元SGWC
|
||||
sgwcGroup := neDataGroup.Group("/sgwc")
|
||||
{
|
||||
sgwcGroup.GET("/cdr/list",
|
||||
middleware.PreAuthorize(nil),
|
||||
controller.NewSGWC.CDRList,
|
||||
)
|
||||
sgwcGroup.DELETE("/cdr/:cdrIds",
|
||||
middleware.PreAuthorize(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.sgwcCDR", collectlogs.BUSINESS_TYPE_DELETE)),
|
||||
controller.NewSGWC.CDRRemove,
|
||||
)
|
||||
sgwcGroup.POST("/cdr/export",
|
||||
middleware.PreAuthorize(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.sgwcCDR", collectlogs.BUSINESS_TYPE_EXPORT)),
|
||||
controller.NewSGWC.CDRExport,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,194 +1,103 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 Alarm 结构体
|
||||
var NewAlarm = &Alarm{
|
||||
selectSql: `select
|
||||
id, alarm_seq, alarm_id, alarm_title, ne_type, ne_id, alarm_code, event_time,
|
||||
alarm_type, orig_severity, perceived_severity, pv_flag, ne_name, object_uid, object_name,
|
||||
object_type, location_info, province, alarm_status, specific_problem, specific_problem_id,
|
||||
add_info, counter, latest_event_time, ack_state, ack_time, ack_user, clear_type,
|
||||
clear_time, clear_user, timestamp
|
||||
from alarm`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"alarm_seq": "AlarmSeq",
|
||||
"alarm_id": "AlarmId",
|
||||
"alarm_title": "AlarmTitle",
|
||||
"ne_type": "NeType",
|
||||
"ne_id": "NeId",
|
||||
"alarm_code": "AlarmCode",
|
||||
"event_time": "EventTime",
|
||||
"alarm_type": "AlarmType",
|
||||
"orig_severity": "OrigSeverity",
|
||||
"perceived_severity": "PerceivedSeverity",
|
||||
"pv_flag": "PvFlag",
|
||||
"ne_name": "NeName",
|
||||
"object_uid": "ObjectUid",
|
||||
"object_name": "ObjectName",
|
||||
"object_type": "ObjectType",
|
||||
"location_info": "LocationInfo",
|
||||
"province": "Province",
|
||||
"alarm_status": "AlarmStatus",
|
||||
"specific_problem": "SpecificProblem",
|
||||
"specific_problem_id": "SpecificProblemId",
|
||||
"add_info": "AddInfo",
|
||||
"counter": "Counter",
|
||||
"latest_event_time": "LatestEventTime",
|
||||
"ack_state": "AckState",
|
||||
"ack_time": "AckTime",
|
||||
"ack_user": "AckUser",
|
||||
"clear_type": "ClearType",
|
||||
"clear_time": "ClearTime",
|
||||
"clear_user": "ClearUser",
|
||||
"timestamp": "Timestamp",
|
||||
},
|
||||
}
|
||||
var NewAlarm = &Alarm{}
|
||||
|
||||
// Alarm 告警 数据层处理
|
||||
type Alarm struct {
|
||||
// 查询视图对象SQL
|
||||
selectSql string
|
||||
// 结果字段与实体映射
|
||||
resultMap map[string]string
|
||||
}
|
||||
type Alarm struct{}
|
||||
|
||||
// convertResultRows 将结果记录转实体结果组
|
||||
func (r *Alarm) convertResultRows(rows []map[string]any) []model.Alarm {
|
||||
arr := make([]model.Alarm, 0)
|
||||
for _, row := range rows {
|
||||
item := model.Alarm{}
|
||||
for key, value := range row {
|
||||
if keyMapper, ok := r.resultMap[key]; ok {
|
||||
repo.SetFieldValue(&item, keyMapper, value)
|
||||
}
|
||||
}
|
||||
arr = append(arr, item)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *Alarm) SelectPage(querys model.AlarmQuery) map[string]any {
|
||||
// SelectByPage 分页查询集合
|
||||
func (r Alarm) SelectByPage(querys model.AlarmQuery) ([]model.Alarm, int64) {
|
||||
tx := datasource.DB("").Model(&model.Alarm{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if querys.NeType != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, querys.NeType)
|
||||
tx = tx.Where("ne_type = ?", querys.NeType)
|
||||
}
|
||||
if querys.RmUID != "" {
|
||||
conditions = append(conditions, "object_uid = ?")
|
||||
params = append(params, querys.RmUID)
|
||||
tx = tx.Where("rm_uid = ?", querys.RmUID)
|
||||
}
|
||||
if querys.StartTime != "" {
|
||||
conditions = append(conditions, "timestamp >= ?")
|
||||
params = append(params, querys.StartTime)
|
||||
startTime := querys.StartTime
|
||||
if len(startTime) == 13 {
|
||||
startTime = startTime[:10]
|
||||
}
|
||||
tx = tx.Where("timestamp >= ?", startTime)
|
||||
}
|
||||
if querys.EndTime != "" {
|
||||
conditions = append(conditions, "timestamp <= ?")
|
||||
params = append(params, querys.EndTime)
|
||||
endTime := querys.EndTime
|
||||
if len(endTime) == 13 {
|
||||
endTime = endTime[:10]
|
||||
}
|
||||
tx = tx.Where("timestamp <= ?", endTime)
|
||||
}
|
||||
if querys.OrigSeverity != "" {
|
||||
eventTypes := strings.Split(querys.OrigSeverity, ",")
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(eventTypes))
|
||||
conditions = append(conditions, fmt.Sprintf("orig_severity in (%s)", placeholder))
|
||||
for _, eventType := range eventTypes {
|
||||
params = append(params, eventType)
|
||||
}
|
||||
tx = tx.Where("orig_severity in (%s)", eventTypes)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
}
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.Alarm{}
|
||||
|
||||
result := map[string]any{
|
||||
"total": 0,
|
||||
"rows": []model.Alarm{},
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 查询数量 长度为0直接返回
|
||||
totalSql := "select count(1) as 'total' from alarm"
|
||||
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
|
||||
if err != nil {
|
||||
logger.Errorf("total err => %v", err)
|
||||
return result
|
||||
}
|
||||
total := parse.Number(totalRows[0]["total"])
|
||||
if total == 0 {
|
||||
return result
|
||||
} else {
|
||||
result["total"] = total
|
||||
}
|
||||
|
||||
// 分页
|
||||
pageNum, pageSize := repo.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
pageSql := " limit ?,? "
|
||||
params = append(params, pageNum*pageSize)
|
||||
params = append(params, pageSize)
|
||||
|
||||
// 排序
|
||||
orderSql := ""
|
||||
if querys.SortField != "" {
|
||||
sortSql := querys.SortField
|
||||
if querys.SortOrder != "" {
|
||||
if querys.SortOrder == "desc" {
|
||||
sortSql += " desc "
|
||||
} else {
|
||||
sortSql += " asc "
|
||||
}
|
||||
sortField := querys.SortField
|
||||
if querys.SortOrder == "desc" {
|
||||
sortField = sortField + " desc"
|
||||
}
|
||||
orderSql = fmt.Sprintf(" order by %s ", sortSql)
|
||||
tx = tx.Order(sortField)
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
querySql := r.selectSql + whereSql + orderSql + pageSql
|
||||
results, err := datasource.RawDB("", querySql, params)
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
result["rows"] = r.convertResultRows(results)
|
||||
return result
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *Alarm) SelectByIds(ids []string) []model.Alarm {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(ids))
|
||||
querySql := r.selectSql + " where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(ids)
|
||||
results, err := datasource.RawDB("", querySql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return []model.Alarm{}
|
||||
rows := []model.Alarm{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
tx := datasource.DB("").Model(&model.Alarm{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *Alarm) DeleteByIds(ids []string) int64 {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(ids))
|
||||
sql := "delete from alarm where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(ids)
|
||||
results, err := datasource.ExecDB("", sql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("delete err => %v", err)
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
return results
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.Alarm{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
@@ -6,184 +6,110 @@ import (
|
||||
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 CDREventIMS 结构体
|
||||
var NewCDREventIMS = &CDREventIMS{
|
||||
selectSql: `select id, ne_type, ne_name, rm_uid, timestamp, cdr_json, created_at from cdr_event_ims`,
|
||||
var NewCDREventIMS = &CDREventIMS{}
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"ne_type": "NeType",
|
||||
"ne_name": "NeName",
|
||||
"rm_uid": "RmUID",
|
||||
"timestamp": "Timestamp",
|
||||
"cdr_json": "CDRJSONStr",
|
||||
"created_at": "CreatedAt",
|
||||
},
|
||||
}
|
||||
// CDREventIMS CDR会话事件 数据层处理
|
||||
type CDREventIMS struct{}
|
||||
|
||||
// CDREventIMS CDR会话事件IMS 数据层处理
|
||||
type CDREventIMS struct {
|
||||
// 查询视图对象SQL
|
||||
selectSql string
|
||||
// 结果字段与实体映射
|
||||
resultMap map[string]string
|
||||
}
|
||||
|
||||
// convertResultRows 将结果记录转实体结果组
|
||||
func (r *CDREventIMS) convertResultRows(rows []map[string]any) []model.CDREventIMS {
|
||||
arr := make([]model.CDREventIMS, 0)
|
||||
for _, row := range rows {
|
||||
item := model.CDREventIMS{}
|
||||
for key, value := range row {
|
||||
if keyMapper, ok := r.resultMap[key]; ok {
|
||||
repo.SetFieldValue(&item, keyMapper, value)
|
||||
}
|
||||
}
|
||||
arr = append(arr, item)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventIMS) SelectPage(querys model.CDREventIMSQuery) map[string]any {
|
||||
// SelectByPage 分页查询集合
|
||||
func (r CDREventIMS) SelectByPage(querys model.CDREventIMSQuery) ([]model.CDREventIMS, int64) {
|
||||
tx := datasource.DB("").Model(&model.CDREventIMS{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if querys.NeType != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, querys.NeType)
|
||||
tx = tx.Where("ne_type = ?", querys.NeType)
|
||||
}
|
||||
if querys.RmUID != "" {
|
||||
conditions = append(conditions, "rm_uid = ?")
|
||||
params = append(params, querys.RmUID)
|
||||
tx = tx.Where("rm_uid = ?", querys.RmUID)
|
||||
}
|
||||
if querys.StartTime != "" {
|
||||
conditions = append(conditions, "timestamp >= ?")
|
||||
if len(querys.StartTime) == 13 {
|
||||
querys.StartTime = querys.StartTime[:10]
|
||||
startTime := querys.StartTime
|
||||
if len(startTime) == 13 {
|
||||
startTime = startTime[:10]
|
||||
}
|
||||
params = append(params, querys.StartTime)
|
||||
tx = tx.Where("timestamp >= ?", startTime)
|
||||
}
|
||||
if querys.EndTime != "" {
|
||||
conditions = append(conditions, "timestamp <= ?")
|
||||
if len(querys.EndTime) == 13 {
|
||||
querys.EndTime = querys.EndTime[:10]
|
||||
endTime := querys.EndTime
|
||||
if len(endTime) == 13 {
|
||||
endTime = endTime[:10]
|
||||
}
|
||||
params = append(params, querys.EndTime)
|
||||
tx = tx.Where("timestamp <= ?", endTime)
|
||||
}
|
||||
if querys.CallerParty != "" {
|
||||
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.callerParty') = ?")
|
||||
params = append(params, querys.CallerParty)
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.callerParty') = ?", querys.CallerParty)
|
||||
}
|
||||
if querys.CalledParty != "" {
|
||||
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.calledParty') = ?")
|
||||
params = append(params, querys.CalledParty)
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.calledParty') = ?", querys.CalledParty)
|
||||
}
|
||||
// MySQL8支持的
|
||||
// if querys.RecordType != "" {
|
||||
// recordTypes := strings.Split(querys.RecordType, ",")
|
||||
// placeholder := repo.KeyPlaceholderByQuery(len(recordTypes))
|
||||
// conditions = append(conditions, fmt.Sprintf("JSON_EXTRACT(cdr_json, '$.recordType') in (%s)", placeholder))
|
||||
// for _, recordType := range recordTypes {
|
||||
// params = append(params, recordType)
|
||||
// }
|
||||
// }
|
||||
// Mariadb不支持json in查询改or
|
||||
|
||||
if querys.RecordType != "" {
|
||||
recordTypes := strings.Split(querys.RecordType, ",")
|
||||
var queryStrArr []string
|
||||
for _, recordType := range recordTypes {
|
||||
queryStrArr = append(queryStrArr, "JSON_EXTRACT(cdr_json, '$.recordType') = ?")
|
||||
params = append(params, recordType)
|
||||
queryStrArr = append(queryStrArr, fmt.Sprintf("JSON_EXTRACT(cdr_json, '$.recordType') = '%s'", recordType))
|
||||
}
|
||||
conditions = append(conditions, fmt.Sprintf("( %s )", strings.Join(queryStrArr, " OR ")))
|
||||
tx = tx.Where(fmt.Sprintf("( %s )", strings.Join(queryStrArr, " OR ")))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
}
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.CDREventIMS{}
|
||||
|
||||
result := map[string]any{
|
||||
"total": 0,
|
||||
"rows": []model.CDREventIMS{},
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 查询数量 长度为0直接返回
|
||||
totalSql := "select count(1) as 'total' from cdr_event_ims"
|
||||
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
|
||||
if err != nil {
|
||||
logger.Errorf("total err => %v", err)
|
||||
return result
|
||||
}
|
||||
total := parse.Number(totalRows[0]["total"])
|
||||
if total == 0 {
|
||||
return result
|
||||
} else {
|
||||
result["total"] = total
|
||||
}
|
||||
|
||||
// 分页
|
||||
pageNum, pageSize := repo.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
pageSql := " limit ?,? "
|
||||
params = append(params, pageNum*pageSize)
|
||||
params = append(params, pageSize)
|
||||
|
||||
// 排序
|
||||
orderSql := ""
|
||||
if querys.SortField != "" {
|
||||
sortSql := querys.SortField
|
||||
if querys.SortOrder != "" {
|
||||
if querys.SortOrder == "desc" {
|
||||
sortSql += " desc "
|
||||
} else {
|
||||
sortSql += " asc "
|
||||
}
|
||||
sortField := querys.SortField
|
||||
if querys.SortOrder == "desc" {
|
||||
sortField = sortField + " desc"
|
||||
}
|
||||
orderSql = fmt.Sprintf(" order by id desc, %s ", sortSql)
|
||||
tx = tx.Order(sortField)
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
querySql := r.selectSql + whereSql + orderSql + pageSql
|
||||
results, err := datasource.RawDB("", querySql, params)
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
result["rows"] = r.convertResultRows(results)
|
||||
return result
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *CDREventIMS) SelectByIds(cdrIds []string) []model.CDREventIMS {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
querySql := r.selectSql + " where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.RawDB("", querySql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return []model.CDREventIMS{}
|
||||
func (r *CDREventIMS) SelectByIds(ids []string) []model.CDREventIMS {
|
||||
rows := []model.CDREventIMS{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
tx := datasource.DB("").Model(&model.CDREventIMS{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *CDREventIMS) DeleteByIds(cdrIds []string) int64 {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
sql := "delete from cdr_event_ims where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.ExecDB("", sql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("delete err => %v", err)
|
||||
func (r *CDREventIMS) DeleteByIds(ids []string) int64 {
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
return results
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.CDREventIMS{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
103
src/modules/network_data/repository/cdr_event_sgwc.go
Normal file
103
src/modules/network_data/repository/cdr_event_sgwc.go
Normal file
@@ -0,0 +1,103 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 CDREventSGWC 结构体
|
||||
var NewCDREventSGWC = &CDREventSGWC{}
|
||||
|
||||
// CDREventSGWC CDR会话事件 数据层处理
|
||||
type CDREventSGWC struct{}
|
||||
|
||||
// SelectByPage 分页查询集合
|
||||
func (r CDREventSGWC) SelectByPage(querys model.CDREventSGWCQuery) ([]model.CDREventSGWC, int64) {
|
||||
tx := datasource.DB("").Model(&model.CDREventSGWC{})
|
||||
// 查询条件拼接
|
||||
if querys.NeType != "" {
|
||||
tx = tx.Where("ne_type = ?", querys.NeType)
|
||||
}
|
||||
if querys.RmUID != "" {
|
||||
tx = tx.Where("rm_uid = ?", querys.RmUID)
|
||||
}
|
||||
if querys.StartTime != "" {
|
||||
startTime := querys.StartTime
|
||||
if len(startTime) == 13 {
|
||||
startTime = startTime[:10]
|
||||
}
|
||||
tx = tx.Where("timestamp >= ?", startTime)
|
||||
}
|
||||
if querys.EndTime != "" {
|
||||
endTime := querys.EndTime
|
||||
if len(endTime) == 13 {
|
||||
endTime = endTime[:10]
|
||||
}
|
||||
tx = tx.Where("timestamp <= ?", endTime)
|
||||
}
|
||||
if querys.IMSI != "" {
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.servedIMSI') = ?", querys.IMSI)
|
||||
}
|
||||
if querys.MSISDN != "" {
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.servedMSISDN') = ?", querys.MSISDN)
|
||||
}
|
||||
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.CDREventSGWC{}
|
||||
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 排序
|
||||
if querys.SortField != "" {
|
||||
sortField := querys.SortField
|
||||
if querys.SortOrder == "desc" {
|
||||
sortField = sortField + " desc"
|
||||
}
|
||||
tx = tx.Order(sortField)
|
||||
}
|
||||
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *CDREventSGWC) SelectByIds(ids []string) []model.CDREventSGWC {
|
||||
rows := []model.CDREventSGWC{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
tx := datasource.DB("").Model(&model.CDREventSGWC{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *CDREventSGWC) DeleteByIds(ids []string) int64 {
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.CDREventSGWC{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
@@ -1,170 +1,103 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 CDREventSMF 结构体
|
||||
var NewCDREventSMF = &CDREventSMF{
|
||||
selectSql: `select id, ne_type, ne_name, rm_uid, timestamp, cdr_json, created_at from cdr_event_smf`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"ne_type": "NeType",
|
||||
"ne_name": "NeName",
|
||||
"rm_uid": "RmUID",
|
||||
"timestamp": "Timestamp",
|
||||
"cdr_json": "CDRJSONStr",
|
||||
"created_at": "CreatedAt",
|
||||
},
|
||||
}
|
||||
var NewCDREventSMF = &CDREventSMF{}
|
||||
|
||||
// CDREventSMF CDR会话事件 数据层处理
|
||||
type CDREventSMF struct {
|
||||
// 查询视图对象SQL
|
||||
selectSql string
|
||||
// 结果字段与实体映射
|
||||
resultMap map[string]string
|
||||
}
|
||||
type CDREventSMF struct{}
|
||||
|
||||
// convertResultRows 将结果记录转实体结果组
|
||||
func (r *CDREventSMF) convertResultRows(rows []map[string]any) []model.CDREventSMF {
|
||||
arr := make([]model.CDREventSMF, 0)
|
||||
for _, row := range rows {
|
||||
item := model.CDREventSMF{}
|
||||
for key, value := range row {
|
||||
if keyMapper, ok := r.resultMap[key]; ok {
|
||||
repo.SetFieldValue(&item, keyMapper, value)
|
||||
}
|
||||
}
|
||||
arr = append(arr, item)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventSMF) SelectPage(querys model.CDREventSMFQuery) map[string]any {
|
||||
// SelectByPage 分页查询集合
|
||||
func (r CDREventSMF) SelectByPage(querys model.CDREventSMFQuery) ([]model.CDREventSMF, int64) {
|
||||
tx := datasource.DB("").Model(&model.CDREventSMF{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if querys.NeType != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, querys.NeType)
|
||||
tx = tx.Where("ne_type = ?", querys.NeType)
|
||||
}
|
||||
if querys.RmUID != "" {
|
||||
conditions = append(conditions, "rm_uid = ?")
|
||||
params = append(params, querys.RmUID)
|
||||
tx = tx.Where("rm_uid = ?", querys.RmUID)
|
||||
}
|
||||
if querys.StartTime != "" {
|
||||
conditions = append(conditions, "timestamp >= ?")
|
||||
if len(querys.StartTime) == 13 {
|
||||
querys.StartTime = querys.StartTime[:10]
|
||||
startTime := querys.StartTime
|
||||
if len(startTime) == 13 {
|
||||
startTime = startTime[:10]
|
||||
}
|
||||
params = append(params, querys.StartTime)
|
||||
tx = tx.Where("timestamp >= ?", startTime)
|
||||
}
|
||||
if querys.EndTime != "" {
|
||||
conditions = append(conditions, "timestamp <= ?")
|
||||
if len(querys.EndTime) == 13 {
|
||||
querys.EndTime = querys.EndTime[:10]
|
||||
endTime := querys.EndTime
|
||||
if len(endTime) == 13 {
|
||||
endTime = endTime[:10]
|
||||
}
|
||||
params = append(params, querys.EndTime)
|
||||
tx = tx.Where("timestamp <= ?", endTime)
|
||||
}
|
||||
if querys.RecordType != "" {
|
||||
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.recordType') = ?")
|
||||
params = append(params, querys.RecordType)
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.recordType') = ?", querys.RecordType)
|
||||
}
|
||||
if querys.SubscriberID != "" {
|
||||
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.subscriberIdentifier.subscriptionIDData') = ?")
|
||||
params = append(params, querys.SubscriberID)
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.subscriberIdentifier.subscriptionIDData') = ?", querys.SubscriberID)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
}
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.CDREventSMF{}
|
||||
|
||||
result := map[string]any{
|
||||
"total": 0,
|
||||
"rows": []model.CDREventSMF{},
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 查询数量 长度为0直接返回
|
||||
totalSql := "select count(1) as 'total' from cdr_event_smf"
|
||||
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
|
||||
if err != nil {
|
||||
logger.Errorf("total err => %v", err)
|
||||
return result
|
||||
}
|
||||
total := parse.Number(totalRows[0]["total"])
|
||||
if total == 0 {
|
||||
return result
|
||||
} else {
|
||||
result["total"] = total
|
||||
}
|
||||
|
||||
// 分页
|
||||
pageNum, pageSize := repo.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
pageSql := " limit ?,? "
|
||||
params = append(params, pageNum*pageSize)
|
||||
params = append(params, pageSize)
|
||||
|
||||
// 排序
|
||||
orderSql := ""
|
||||
if querys.SortField != "" {
|
||||
sortSql := querys.SortField
|
||||
if querys.SortOrder != "" {
|
||||
if querys.SortOrder == "desc" {
|
||||
sortSql += " desc "
|
||||
} else {
|
||||
sortSql += " asc "
|
||||
}
|
||||
sortField := querys.SortField
|
||||
if querys.SortOrder == "desc" {
|
||||
sortField = sortField + " desc"
|
||||
}
|
||||
orderSql = fmt.Sprintf(" order by id desc, %s ", sortSql)
|
||||
tx = tx.Order(sortField)
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
querySql := r.selectSql + whereSql + orderSql + pageSql
|
||||
results, err := datasource.RawDB("", querySql, params)
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
result["rows"] = r.convertResultRows(results)
|
||||
return result
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *CDREventSMF) SelectByIds(cdrIds []string) []model.CDREventSMF {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
querySql := r.selectSql + " where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.RawDB("", querySql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return []model.CDREventSMF{}
|
||||
func (r *CDREventSMF) SelectByIds(ids []string) []model.CDREventSMF {
|
||||
rows := []model.CDREventSMF{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
tx := datasource.DB("").Model(&model.CDREventSMF{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *CDREventSMF) DeleteByIds(cdrIds []string) int64 {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
sql := "delete from cdr_event_smf where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.ExecDB("", sql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("delete err => %v", err)
|
||||
func (r *CDREventSMF) DeleteByIds(ids []string) int64 {
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
return results
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.CDREventSMF{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
@@ -6,176 +6,110 @@ import (
|
||||
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/network_data/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 CDREventSMSC 结构体
|
||||
var NewCDREventSMSC = &CDREventSMSC{
|
||||
selectSql: `select id, ne_type, ne_name, rm_uid, timestamp, cdr_json, created_at from cdr_event_smsc`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"ne_type": "NeType",
|
||||
"ne_name": "NeName",
|
||||
"rm_uid": "RmUID",
|
||||
"timestamp": "Timestamp",
|
||||
"cdr_json": "CDRJSONStr",
|
||||
"created_at": "CreatedAt",
|
||||
},
|
||||
}
|
||||
var NewCDREventSMSC = &CDREventSMSC{}
|
||||
|
||||
// CDREventSMSC CDR会话事件 数据层处理
|
||||
type CDREventSMSC struct {
|
||||
// 查询视图对象SQL
|
||||
selectSql string
|
||||
// 结果字段与实体映射
|
||||
resultMap map[string]string
|
||||
}
|
||||
type CDREventSMSC struct{}
|
||||
|
||||
// convertResultRows 将结果记录转实体结果组
|
||||
func (r *CDREventSMSC) convertResultRows(rows []map[string]any) []model.CDREventSMSC {
|
||||
arr := make([]model.CDREventSMSC, 0)
|
||||
for _, row := range rows {
|
||||
item := model.CDREventSMSC{}
|
||||
for key, value := range row {
|
||||
if keyMapper, ok := r.resultMap[key]; ok {
|
||||
repo.SetFieldValue(&item, keyMapper, value)
|
||||
}
|
||||
}
|
||||
arr = append(arr, item)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventSMSC) SelectPage(querys model.CDREventSMSCQuery) map[string]any {
|
||||
// SelectByPage 分页查询集合
|
||||
func (r CDREventSMSC) SelectByPage(querys model.CDREventSMSCQuery) ([]model.CDREventSMSC, int64) {
|
||||
tx := datasource.DB("").Model(&model.CDREventSMSC{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if querys.NeType != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, querys.NeType)
|
||||
tx = tx.Where("ne_type = ?", querys.NeType)
|
||||
}
|
||||
if querys.RmUID != "" {
|
||||
conditions = append(conditions, "rm_uid = ?")
|
||||
params = append(params, querys.RmUID)
|
||||
tx = tx.Where("rm_uid = ?", querys.RmUID)
|
||||
}
|
||||
if querys.StartTime != "" {
|
||||
conditions = append(conditions, "timestamp >= ?")
|
||||
if len(querys.StartTime) == 13 {
|
||||
querys.StartTime = querys.StartTime[:10]
|
||||
startTime := querys.StartTime
|
||||
if len(startTime) == 13 {
|
||||
startTime = startTime[:10]
|
||||
}
|
||||
params = append(params, querys.StartTime)
|
||||
tx = tx.Where("timestamp >= ?", startTime)
|
||||
}
|
||||
if querys.EndTime != "" {
|
||||
conditions = append(conditions, "timestamp <= ?")
|
||||
if len(querys.EndTime) == 13 {
|
||||
querys.EndTime = querys.EndTime[:10]
|
||||
endTime := querys.EndTime
|
||||
if len(endTime) == 13 {
|
||||
endTime = endTime[:10]
|
||||
}
|
||||
params = append(params, querys.EndTime)
|
||||
tx = tx.Where("timestamp <= ?", endTime)
|
||||
}
|
||||
// MySQL8支持的
|
||||
// if querys.RecordType != "" {
|
||||
// recordTypes := strings.Split(querys.RecordType, ",")
|
||||
// placeholder := repo.KeyPlaceholderByQuery(len(recordTypes))
|
||||
// conditions = append(conditions, fmt.Sprintf("JSON_EXTRACT(cdr_json, '$.recordType') in (%s)", placeholder))
|
||||
// for _, recordType := range recordTypes {
|
||||
// params = append(params, recordType)
|
||||
// }
|
||||
// }
|
||||
// Mariadb不支持json in查询改or
|
||||
if querys.CallerParty != "" {
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.callerParty') = ?", querys.CallerParty)
|
||||
}
|
||||
if querys.CalledParty != "" {
|
||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.calledParty') = ?", querys.CalledParty)
|
||||
}
|
||||
|
||||
if querys.RecordType != "" {
|
||||
recordTypes := strings.Split(querys.RecordType, ",")
|
||||
var queryStrArr []string
|
||||
for _, recordType := range recordTypes {
|
||||
queryStrArr = append(queryStrArr, "JSON_EXTRACT(cdr_json, '$.recordType') = ?")
|
||||
params = append(params, recordType)
|
||||
queryStrArr = append(queryStrArr, fmt.Sprintf("JSON_EXTRACT(cdr_json, '$.recordType') = '%s'", recordType))
|
||||
}
|
||||
conditions = append(conditions, fmt.Sprintf("( %s )", strings.Join(queryStrArr, " OR ")))
|
||||
tx = tx.Where(fmt.Sprintf("( %s )", strings.Join(queryStrArr, " OR ")))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
}
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.CDREventSMSC{}
|
||||
|
||||
result := map[string]any{
|
||||
"total": 0,
|
||||
"rows": []model.CDREventSMSC{},
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 查询数量 长度为0直接返回
|
||||
totalSql := "select count(1) as 'total' from cdr_event_smsc"
|
||||
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
|
||||
if err != nil {
|
||||
logger.Errorf("total err => %v", err)
|
||||
return result
|
||||
}
|
||||
total := parse.Number(totalRows[0]["total"])
|
||||
if total == 0 {
|
||||
return result
|
||||
} else {
|
||||
result["total"] = total
|
||||
}
|
||||
|
||||
// 分页
|
||||
pageNum, pageSize := repo.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
pageSql := " limit ?,? "
|
||||
params = append(params, pageNum*pageSize)
|
||||
params = append(params, pageSize)
|
||||
|
||||
// 排序
|
||||
orderSql := ""
|
||||
if querys.SortField != "" {
|
||||
sortSql := querys.SortField
|
||||
if querys.SortOrder != "" {
|
||||
if querys.SortOrder == "desc" {
|
||||
sortSql += " desc "
|
||||
} else {
|
||||
sortSql += " asc "
|
||||
}
|
||||
sortField := querys.SortField
|
||||
if querys.SortOrder == "desc" {
|
||||
sortField = sortField + " desc"
|
||||
}
|
||||
orderSql = fmt.Sprintf(" order by id desc, %s ", sortSql)
|
||||
tx = tx.Order(sortField)
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
querySql := r.selectSql + whereSql + orderSql + pageSql
|
||||
results, err := datasource.RawDB("", querySql, params)
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(querys.PageNum, querys.PageSize)
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
result["rows"] = r.convertResultRows(results)
|
||||
return result
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *CDREventSMSC) SelectByIds(cdrIds []string) []model.CDREventSMSC {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
querySql := r.selectSql + " where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.RawDB("", querySql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return []model.CDREventSMSC{}
|
||||
func (r *CDREventSMSC) SelectByIds(ids []string) []model.CDREventSMSC {
|
||||
rows := []model.CDREventSMSC{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
tx := datasource.DB("").Model(&model.CDREventSMSC{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *CDREventSMSC) DeleteByIds(cdrIds []string) int64 {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(cdrIds))
|
||||
sql := "delete from cdr_event_smsc where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(cdrIds)
|
||||
results, err := datasource.ExecDB("", sql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("delete err => %v", err)
|
||||
func (r *CDREventSMSC) DeleteByIds(ids []string) int64 {
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
return results
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.CDREventSMSC{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ type Alarm struct {
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *Alarm) SelectPage(querys model.AlarmQuery) map[string]any {
|
||||
return r.alarmRepository.SelectPage(querys)
|
||||
func (r *Alarm) SelectPage(querys model.AlarmQuery) ([]model.Alarm, int64) {
|
||||
return r.alarmRepository.SelectByPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
|
||||
@@ -18,8 +18,8 @@ type CDREventIMS struct {
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventIMS) SelectPage(querys model.CDREventIMSQuery) map[string]any {
|
||||
return r.cdrEventIMSRepository.SelectPage(querys)
|
||||
func (r *CDREventIMS) SelectPage(querys model.CDREventIMSQuery) ([]model.CDREventIMS, int64) {
|
||||
return r.cdrEventIMSRepository.SelectByPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
|
||||
39
src/modules/network_data/service/cdr_event_sgwc.go
Normal file
39
src/modules/network_data/service/cdr_event_sgwc.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"be.ems/src/modules/network_data/model"
|
||||
"be.ems/src/modules/network_data/repository"
|
||||
)
|
||||
|
||||
// 实例化数据层 CDREventSGWC 结构体
|
||||
var NewCDREventSGWC = &CDREventSGWC{
|
||||
cdrEventRepository: repository.NewCDREventSGWC,
|
||||
}
|
||||
|
||||
// CDREventSGWC CDR会话事件SGWC 服务层处理
|
||||
type CDREventSGWC struct {
|
||||
cdrEventRepository *repository.CDREventSGWC // CDR会话事件数据信息
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventSGWC) SelectPage(querys model.CDREventSGWCQuery) ([]model.CDREventSGWC, int64) {
|
||||
return r.cdrEventRepository.SelectByPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *CDREventSGWC) DeleteByIds(cdrIds []string) (int64, error) {
|
||||
// 检查是否存在
|
||||
ids := r.cdrEventRepository.SelectByIds(cdrIds)
|
||||
if len(ids) <= 0 {
|
||||
return 0, fmt.Errorf("not data")
|
||||
}
|
||||
|
||||
if len(ids) == len(cdrIds) {
|
||||
rows := r.cdrEventRepository.DeleteByIds(cdrIds)
|
||||
return rows, nil
|
||||
}
|
||||
// 删除信息失败!
|
||||
return 0, fmt.Errorf("delete fail")
|
||||
}
|
||||
@@ -18,8 +18,8 @@ type CDREventSMF struct {
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventSMF) SelectPage(querys model.CDREventSMFQuery) map[string]any {
|
||||
return r.cdrEventRepository.SelectPage(querys)
|
||||
func (r *CDREventSMF) SelectPage(querys model.CDREventSMFQuery) ([]model.CDREventSMF, int64) {
|
||||
return r.cdrEventRepository.SelectByPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
|
||||
@@ -18,8 +18,8 @@ type CDREventSMSC struct {
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *CDREventSMSC) SelectPage(querys model.CDREventSMSCQuery) map[string]any {
|
||||
return r.cdrEventRepository.SelectPage(querys)
|
||||
func (r *CDREventSMSC) SelectPage(querys model.CDREventSMSCQuery) ([]model.CDREventSMSC, int64) {
|
||||
return r.cdrEventRepository.SelectByPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
|
||||
@@ -34,10 +34,9 @@ type NeConfigController struct {
|
||||
//
|
||||
// GET /list
|
||||
func (s *NeConfigController) List(c *gin.Context) {
|
||||
querys := ctx.QueryMap(c)
|
||||
data := s.neConfigService.SelectPage(querys)
|
||||
|
||||
c.JSON(200, result.Ok(data))
|
||||
querys := ctx.QueryMapString(c)
|
||||
rows, total := s.neConfigService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"total": total, "rows": rows}))
|
||||
}
|
||||
|
||||
// 网元参数配置可用属性值信息
|
||||
@@ -199,16 +198,16 @@ func (s *NeConfigController) DataInfo(c *gin.Context) {
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
return
|
||||
} else {
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigInfo(neInfo, query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.Ok(resData))
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigInfo(neInfo, query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.Ok(resData))
|
||||
}
|
||||
|
||||
// 网元参数配置数据修改
|
||||
@@ -242,15 +241,15 @@ func (s *NeConfigController) DataEdit(c *gin.Context) {
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
return
|
||||
} else {
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigUpdate(neInfo, body.ParamName, body.Loc, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigUpdate(neInfo, body.ParamName, body.Loc, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
}
|
||||
|
||||
// 网元参数配置数据新增(array)
|
||||
|
||||
50
src/modules/network_element/fetch_link/amf.go
Normal file
50
src/modules/network_element/fetch_link/amf.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package fetchlink
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/fetch"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
)
|
||||
|
||||
// AMFNbInfoList AMF基站信息
|
||||
//
|
||||
// 查询参数 {"nbId":"7"}
|
||||
//
|
||||
// 返回结果 []
|
||||
func AMFNbInfoList(neInfo model.NeInfo, data map[string]string) ([]map[string]any, error) {
|
||||
neUrl := fmt.Sprintf("http://%s:%d/api/rest/ueManagement/v1/elementType/amf/objectType/nbInfo", neInfo.IP, neInfo.Port)
|
||||
// 查询参数拼接
|
||||
query := []string{}
|
||||
if v, ok := data["nbId"]; ok && v != "" {
|
||||
query = append(query, fmt.Sprintf("nbId=%s", v))
|
||||
}
|
||||
if len(query) > 0 {
|
||||
neUrl = fmt.Sprintf("%s?%s", neUrl, strings.Join(query, "&"))
|
||||
}
|
||||
|
||||
var resData map[string]any
|
||||
resBytes, err := fetch.Get(neUrl, nil, 60_000)
|
||||
if err != nil {
|
||||
errStr := err.Error()
|
||||
logger.Warnf("AMFNbInfoList Get \"%s\"", neUrl)
|
||||
logger.Errorf("AMFNbInfoList %s", errStr)
|
||||
return nil, fmt.Errorf("NeService AMF API Error")
|
||||
}
|
||||
|
||||
// 序列化结果 {"data":[{"id":"7","name":"NR-SA-GNB","address":"192.168.5.100:60110","ueNum":0}]}
|
||||
err = json.Unmarshal(resBytes, &resData)
|
||||
if err != nil {
|
||||
logger.Errorf("AMFNbInfoList Unmarshal %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
return v.([]map[string]any), nil
|
||||
}
|
||||
return []map[string]any{}, nil
|
||||
}
|
||||
94
src/modules/network_element/fetch_link/ims.go
Normal file
94
src/modules/network_element/fetch_link/ims.go
Normal file
@@ -0,0 +1,94 @@
|
||||
package fetchlink
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/fetch"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
)
|
||||
|
||||
// IMSUeSessionNum IMS会话数量
|
||||
//
|
||||
// 返回结果 0
|
||||
func IMSUeSessionNum(neInfo model.NeInfo) (int64, error) {
|
||||
neUrl := fmt.Sprintf("http://%s:%d/api/rest/ueManagement/v1/elementType/ims/objectType/ueNum", neInfo.IP, neInfo.Port)
|
||||
resBytes, err := fetch.Get(neUrl, nil, 60_000)
|
||||
if err != nil {
|
||||
errStr := err.Error()
|
||||
logger.Warnf("IMSUeSessionNum Get \"%s\"", neUrl)
|
||||
logger.Errorf("IMSUeSessionNum %s", errStr)
|
||||
return 0, fmt.Errorf("NeService IMS API Error")
|
||||
}
|
||||
// 序列化结果 {"data":{"ueNum":0}}
|
||||
var resData map[string]any
|
||||
err = json.Unmarshal(resBytes, &resData)
|
||||
if err != nil {
|
||||
logger.Errorf("IMSUeSessionNum Unmarshal %s", err.Error())
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
var ueNum int64 = 0
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
if num := v.(map[string]any)["ueNum"]; num != nil {
|
||||
ueNum = parse.Number(num)
|
||||
}
|
||||
}
|
||||
return ueNum, nil
|
||||
}
|
||||
|
||||
// IMSUeSessionList IMS会话列表
|
||||
//
|
||||
// 查询参数 {"imsi":"460001230000002","msisdn":"12307551232"}
|
||||
//
|
||||
// 返回结果 []
|
||||
func IMSUeSessionList(neInfo model.NeInfo, data map[string]string) ([]map[string]any, error) {
|
||||
neUrl := fmt.Sprintf("http://%s:%d/api/rest/ueManagement/v1/elementType/ims/objectType/ueInfo", neInfo.IP, neInfo.Port)
|
||||
// 查询参数拼接
|
||||
query := []string{}
|
||||
if v, ok := data["imsi"]; ok && v != "" {
|
||||
query = append(query, fmt.Sprintf("imsi=%s", v))
|
||||
}
|
||||
if v, ok := data["msisdn"]; ok && v != "" {
|
||||
query = append(query, fmt.Sprintf("msisdn=%s", v))
|
||||
}
|
||||
if len(query) > 0 {
|
||||
neUrl = fmt.Sprintf("%s?%s", neUrl, strings.Join(query, "&"))
|
||||
}
|
||||
|
||||
resBytes, err := fetch.Get(neUrl, nil, 60_000)
|
||||
if err != nil {
|
||||
errStr := err.Error()
|
||||
logger.Warnf("IMSUeSessionList Get \"%s\"", neUrl)
|
||||
logger.Errorf("IMSUeSessionList %s", errStr)
|
||||
return nil, fmt.Errorf("NeService IMS API Error")
|
||||
}
|
||||
|
||||
// 序列化结果
|
||||
// { "data":[
|
||||
// {
|
||||
// "activeTime": "2023-11-29 17:04:54",
|
||||
// "barring": 0,
|
||||
// "impu": "sip:12307551232@ims.mnc000.mcc460.3gppnetwork.org",
|
||||
// "imsi": "460001230000002",
|
||||
// "msisdn": "12307551232",
|
||||
// "regState": 1
|
||||
// }
|
||||
// ] }
|
||||
var resData map[string]any
|
||||
err = json.Unmarshal(resBytes, &resData)
|
||||
if err != nil {
|
||||
logger.Errorf("IMSUeSessionList Unmarshal %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
return v.([]map[string]any), nil
|
||||
}
|
||||
return []map[string]any{}, nil
|
||||
}
|
||||
50
src/modules/network_element/fetch_link/mme.go
Normal file
50
src/modules/network_element/fetch_link/mme.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package fetchlink
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/fetch"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
)
|
||||
|
||||
// MMENbInfoList AMF基站信息
|
||||
//
|
||||
// 查询参数 {"nbId":"7"}
|
||||
//
|
||||
// 返回结果 []
|
||||
func MMENbInfoList(neInfo model.NeInfo, data map[string]string) ([]map[string]any, error) {
|
||||
neUrl := fmt.Sprintf("http://%s:%d/api/rest/ueManagement/v1/elementType/mme/objectType/nbInfo", neInfo.IP, neInfo.Port)
|
||||
// 查询参数拼接
|
||||
query := []string{}
|
||||
if v, ok := data["nbId"]; ok && v != "" {
|
||||
query = append(query, fmt.Sprintf("nbId=%s", v))
|
||||
}
|
||||
if len(query) > 0 {
|
||||
neUrl = fmt.Sprintf("%s?%s", neUrl, strings.Join(query, "&"))
|
||||
}
|
||||
|
||||
var resData map[string]any
|
||||
resBytes, err := fetch.Get(neUrl, nil, 60_000)
|
||||
if err != nil {
|
||||
errStr := err.Error()
|
||||
logger.Warnf("MMENbInfoList Get \"%s\"", neUrl)
|
||||
logger.Errorf("MMENbInfoList %s", errStr)
|
||||
return nil, fmt.Errorf("NeService AMF API Error")
|
||||
}
|
||||
|
||||
// 序列化结果 {"data":[{"id":"7","name":"NR-SA-GNB","address":"192.168.5.100:60110","ueNum":0}]}
|
||||
err = json.Unmarshal(resBytes, &resData)
|
||||
if err != nil {
|
||||
logger.Errorf("MMENbInfoList Unmarshal %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
return v.([]map[string]any), nil
|
||||
}
|
||||
return []map[string]any{}, nil
|
||||
}
|
||||
@@ -7,9 +7,40 @@ import (
|
||||
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/fetch"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
)
|
||||
|
||||
// SMFSubNum SMF在线订阅用户数量 只含5G用户数据
|
||||
//
|
||||
// 返回结果 0
|
||||
func SMFSubNum(neInfo model.NeInfo) (int64, error) {
|
||||
neUrl := fmt.Sprintf("http://%s:%d/api/rest/ueManagement/v1/elementType/smf/objectType/ueNum", neInfo.IP, neInfo.Port)
|
||||
resBytes, err := fetch.Get(neUrl, nil, 60_000)
|
||||
if err != nil {
|
||||
errStr := err.Error()
|
||||
logger.Warnf("SMFSubNum Get \"%s\"", neUrl)
|
||||
logger.Errorf("SMFSubNum %s", errStr)
|
||||
return 0, fmt.Errorf("NeService SMF API Error")
|
||||
}
|
||||
// 序列化结果 {"data":{"ueNum":0}}
|
||||
var resData map[string]any
|
||||
err = json.Unmarshal(resBytes, &resData)
|
||||
if err != nil {
|
||||
logger.Errorf("IMSUeSession Unmarshal %s", err.Error())
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
var ueNum int64 = 0
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
if num := v.(map[string]any)["ueNum"]; num != nil {
|
||||
ueNum = parse.Number(num)
|
||||
}
|
||||
}
|
||||
return ueNum, nil
|
||||
}
|
||||
|
||||
// SMFSubInfoList SMF在线订阅用户列表信息
|
||||
//
|
||||
// 查询参数 {"imsi":"360000100000130","msisdn":"8612300000130","upstate":"Inactive","pageNum":"1"}
|
||||
|
||||
@@ -3,14 +3,15 @@ package model
|
||||
// NeConfig 网元_参数配置可用属性值
|
||||
type NeConfig struct {
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" binding:"required" gorm:"ne_type"` // 网元类型
|
||||
ParamName string `json:"paramName" binding:"required" gorm:"param_name"` // 参数名
|
||||
ParamDisplay string `json:"paramDisplay" binding:"required" gorm:"param_display"` // 参数显示名
|
||||
ParamType string `json:"paramType" gorm:"param_type"` // 参数类型 list列表单层 array数组多层
|
||||
ParamJson string `json:"-" gorm:"param_json"` // accesss属性控制:只读read-only/read/ro 读写read-write
|
||||
ParamSort int64 `json:"paramSort" gorm:"param_sort"` // 参数排序
|
||||
ParamPerms string `json:"paramPerms" gorm:"param_perms"` // 操作权限 get只读 put可编辑 delete可删除 post可新增
|
||||
UpdateTime int64 `json:"updateTime" gorm:"update_time"` // 更新时间
|
||||
NeType string `json:"neType" binding:"required" gorm:"column:ne_type"` // 网元类型
|
||||
ParamName string `json:"paramName" binding:"required" gorm:"column:param_name"` // 参数名
|
||||
ParamDisplay string `json:"paramDisplay" binding:"required" gorm:"column:param_display"` // 参数显示名
|
||||
ParamType string `json:"paramType" gorm:"column:param_type"` // 参数类型 list列表单层 array数组多层
|
||||
ParamJson string `json:"-" gorm:"column:param_json"` // accesss属性控制:只读read-only/read/ro 读写read-write
|
||||
ParamSort int64 `json:"paramSort" gorm:"column:param_sort"` // 参数排序
|
||||
ParamPerms string `json:"paramPerms" gorm:"column:param_perms"` // 操作权限 get只读 put可编辑 delete可删除 post可新增
|
||||
Visible string `json:"visible" gorm:"column:visible"` // 可见性 默认public 单独网元self
|
||||
UpdateTime int64 `json:"updateTime" gorm:"column:update_time"` // 更新时间
|
||||
|
||||
// ====== 非数据库字段属性 ======
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ func saveData(params []map[string]string) {
|
||||
})
|
||||
// 遍历插入
|
||||
for _, v := range params {
|
||||
// 排序
|
||||
paramSort := v["paramSort"]
|
||||
if len(paramSort) == 0 || paramSort == "" {
|
||||
paramSort = "0"
|
||||
@@ -101,6 +102,12 @@ func saveData(params []map[string]string) {
|
||||
sort = 0
|
||||
}
|
||||
|
||||
// 可见性 默认public
|
||||
visible := v["visible"]
|
||||
if len(visible) == 0 || visible == "" {
|
||||
visible = "public"
|
||||
}
|
||||
|
||||
neConfig := model.NeConfig{
|
||||
NeType: v["neType"],
|
||||
ParamName: v["paramName"],
|
||||
@@ -108,6 +115,7 @@ func saveData(params []map[string]string) {
|
||||
ParamType: v["paramType"],
|
||||
ParamJson: v["paramJson"],
|
||||
ParamPerms: v["paramPerms"],
|
||||
Visible: visible,
|
||||
ParamSort: sort,
|
||||
}
|
||||
neConfig.ID = saveDB(neConfig)
|
||||
@@ -215,6 +223,8 @@ func parseParamConfig(data map[string]any) ([]map[string]string, error) {
|
||||
itemMap["paramDisplay"] = iiv.(string)
|
||||
case "sort":
|
||||
itemMap["paramSort"] = fmt.Sprint(iiv)
|
||||
case "visible":
|
||||
itemMap["visible"] = fmt.Sprint(iiv)
|
||||
case "perms", "method":
|
||||
itemMap["paramPerms"] = iiv.(string)
|
||||
case "list", "array": // 参数类型为数组
|
||||
|
||||
@@ -1,259 +1,125 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 NeConfig 结构体
|
||||
var NewNeConfig = &NeConfig{
|
||||
selectSql: `select id, ne_type, param_name, param_display, param_type, param_json, param_sort, param_perms, update_time from ne_config`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"ne_type": "NeType",
|
||||
"param_name": "ParamName",
|
||||
"param_display": "ParamDisplay",
|
||||
"param_type": "ParamType",
|
||||
"param_json": "ParamJson",
|
||||
"param_sort": "ParamSort",
|
||||
"param_perms": "ParamPerms",
|
||||
"update_time": "UpdateTime",
|
||||
},
|
||||
}
|
||||
var NewNeConfig = &NeConfig{}
|
||||
|
||||
// NeConfig 网元参数配置可用属性值 数据层处理
|
||||
type NeConfig struct {
|
||||
// 查询视图对象SQL
|
||||
selectSql string
|
||||
// 结果字段与实体映射
|
||||
resultMap map[string]string
|
||||
}
|
||||
type NeConfig struct{}
|
||||
|
||||
// convertResultRows 将结果记录转实体结果组
|
||||
func (r *NeConfig) convertResultRows(rows []map[string]any) []model.NeConfig {
|
||||
arr := make([]model.NeConfig, 0)
|
||||
for _, row := range rows {
|
||||
item := model.NeConfig{}
|
||||
for key, value := range row {
|
||||
if keyMapper, ok := r.resultMap[key]; ok {
|
||||
repo.SetFieldValue(&item, keyMapper, value)
|
||||
}
|
||||
}
|
||||
arr = append(arr, item)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询字典类型
|
||||
func (r *NeConfig) SelectPage(query map[string]any) map[string]any {
|
||||
// SelectByPage 分页查询集合
|
||||
func (r NeConfig) SelectByPage(query map[string]string) ([]model.NeConfig, int64) {
|
||||
tx := datasource.DB("").Model(&model.NeConfig{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if v, ok := query["neType"]; ok && v != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, v)
|
||||
tx = tx.Where("ne_type = ?", v)
|
||||
}
|
||||
if v, ok := query["paramName"]; ok && v != "" {
|
||||
conditions = append(conditions, "param_name = ?")
|
||||
params = append(params, v)
|
||||
tx = tx.Where("param_name = ?", v)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
// 查询结果
|
||||
var total int64 = 0
|
||||
rows := []model.NeConfig{}
|
||||
|
||||
// 查询数量为0直接返回
|
||||
if err := tx.Count(&total).Error; err != nil || total <= 0 {
|
||||
return rows, total
|
||||
}
|
||||
|
||||
result := map[string]any{
|
||||
"total": 0,
|
||||
"rows": []model.NeHost{},
|
||||
}
|
||||
|
||||
// 查询数量 长度为0直接返回
|
||||
totalSql := "select count(id) as 'total' from ne_config"
|
||||
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
|
||||
// 查询数据分页
|
||||
pageNum, pageSize := datasource.PageNumSize(query["pageNum"], query["pageSize"])
|
||||
tx = tx.Limit(pageSize).Offset(pageSize * pageNum)
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
logger.Errorf("total err => %v", err)
|
||||
return result
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
total := parse.Number(totalRows[0]["total"])
|
||||
if total == 0 {
|
||||
return result
|
||||
} else {
|
||||
result["total"] = total
|
||||
}
|
||||
|
||||
// 分页
|
||||
pageNum, pageSize := repo.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 {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return result
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
result["rows"] = r.convertResultRows(results)
|
||||
return result
|
||||
return rows, total
|
||||
}
|
||||
|
||||
// SelectList 根据实体查询
|
||||
func (r *NeConfig) SelectList(param model.NeConfig) []model.NeConfig {
|
||||
tx := datasource.DB("").Model(&model.NeConfig{})
|
||||
// 查询条件拼接
|
||||
var conditions []string
|
||||
var params []any
|
||||
if param.NeType != "" {
|
||||
conditions = append(conditions, "ne_type = ?")
|
||||
params = append(params, param.NeType)
|
||||
tx = tx.Where("ne_type = ?", param.NeType)
|
||||
}
|
||||
if param.ParamName != "" {
|
||||
conditions = append(conditions, "param_name = ?")
|
||||
params = append(params, param.ParamName)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
if len(conditions) > 0 {
|
||||
whereSql += " where " + strings.Join(conditions, " and ")
|
||||
tx = tx.Where("param_name = ?", param.ParamName)
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
querySql := r.selectSql + whereSql + " order by param_sort asc "
|
||||
results, err := datasource.RawDB("", querySql, params)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
}
|
||||
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
}
|
||||
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *NeConfig) SelectByIds(ids []string) []model.NeConfig {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(ids))
|
||||
querySql := r.selectSql + " where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(ids)
|
||||
results, err := datasource.RawDB("", querySql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("query err => %v", err)
|
||||
return []model.NeConfig{}
|
||||
}
|
||||
// 转换实体
|
||||
return r.convertResultRows(results)
|
||||
}
|
||||
|
||||
// Insert 新增信息
|
||||
func (r *NeConfig) Insert(param model.NeConfig) string {
|
||||
// 参数拼接
|
||||
params := make(map[string]any)
|
||||
if param.NeType != "" {
|
||||
params["ne_type"] = param.NeType
|
||||
}
|
||||
if param.ParamName != "" {
|
||||
params["param_name"] = param.ParamName
|
||||
}
|
||||
if param.ParamDisplay != "" {
|
||||
params["param_display"] = param.ParamDisplay
|
||||
}
|
||||
if param.ParamType != "" {
|
||||
params["param_type"] = param.ParamType
|
||||
}
|
||||
if param.ParamJson != "" {
|
||||
params["param_json"] = param.ParamJson
|
||||
}
|
||||
params["param_sort"] = param.ParamSort
|
||||
if param.ParamPerms != "" {
|
||||
params["param_perms"] = param.ParamPerms
|
||||
}
|
||||
params["update_time"] = time.Now().UnixMilli()
|
||||
|
||||
// 构建执行语句
|
||||
keys, placeholder, values := repo.KeyPlaceholderValueByInsert(params)
|
||||
sql := "insert into ne_config (" + strings.Join(keys, ",") + ")values(" + placeholder + ")"
|
||||
|
||||
db := datasource.DefaultDB()
|
||||
// 开启事务
|
||||
tx := db.Begin()
|
||||
// 执行插入
|
||||
err := tx.Exec(sql, values...).Error
|
||||
if err != nil {
|
||||
logger.Errorf("insert row : %v", err.Error())
|
||||
tx.Rollback()
|
||||
return ""
|
||||
}
|
||||
// 获取生成的自增 ID
|
||||
var insertedID string
|
||||
err = tx.Raw("select last_insert_id()").Row().Scan(&insertedID)
|
||||
if err != nil {
|
||||
logger.Errorf("insert last id : %v", err.Error())
|
||||
tx.Rollback()
|
||||
return ""
|
||||
}
|
||||
// 提交事务
|
||||
tx.Commit()
|
||||
return insertedID
|
||||
}
|
||||
|
||||
// Update 修改信息
|
||||
func (r *NeConfig) Update(param model.NeConfig) int64 {
|
||||
// 参数拼接
|
||||
params := make(map[string]any)
|
||||
if param.NeType != "" {
|
||||
params["ne_type"] = param.NeType
|
||||
}
|
||||
if param.ParamName != "" {
|
||||
params["param_name"] = param.ParamName
|
||||
}
|
||||
if param.ParamDisplay != "" {
|
||||
params["param_display"] = param.ParamDisplay
|
||||
}
|
||||
if param.ParamType != "" {
|
||||
params["param_type"] = param.ParamType
|
||||
}
|
||||
if param.ParamJson != "" {
|
||||
params["param_json"] = param.ParamJson
|
||||
}
|
||||
params["param_sort"] = param.ParamSort
|
||||
if param.ParamPerms != "" {
|
||||
params["param_perms"] = param.ParamPerms
|
||||
}
|
||||
params["update_time"] = time.Now().UnixMilli()
|
||||
|
||||
// 构建执行语句
|
||||
keys, values := repo.KeyValueByUpdate(params)
|
||||
sql := "update ne_config set " + strings.Join(keys, ",") + " where id = ?"
|
||||
|
||||
// 执行更新
|
||||
values = append(values, param.ID)
|
||||
rows, err := datasource.ExecDB("", sql, values)
|
||||
if err != nil {
|
||||
logger.Errorf("update row : %v", err.Error())
|
||||
return 0
|
||||
rows := []model.NeConfig{}
|
||||
if err := tx.Order("param_sort asc").Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *NeConfig) DeleteByIds(ids []string) int64 {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(ids))
|
||||
sql := "delete from ne_config where id in (" + placeholder + ")"
|
||||
parameters := repo.ConvertIdsSlice(ids)
|
||||
results, err := datasource.ExecDB("", sql, parameters)
|
||||
if err != nil {
|
||||
logger.Errorf("delete err => %v", err)
|
||||
// SelectByIds 通过ID查询
|
||||
func (r *NeConfig) SelectByIds(ids []string) []model.NeConfig {
|
||||
rows := []model.NeConfig{}
|
||||
if len(ids) <= 0 {
|
||||
return rows
|
||||
}
|
||||
tx := datasource.DB("").Model(&model.NeConfig{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id in ?", ids)
|
||||
// 查询数据
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows
|
||||
}
|
||||
return rows
|
||||
}
|
||||
|
||||
// Insert 新增信息
|
||||
func (r *NeConfig) Insert(param model.NeConfig) string {
|
||||
param.UpdateTime = time.Now().UnixMilli()
|
||||
// 执行插入
|
||||
if err := datasource.DB("").Create(¶m).Error; err != nil {
|
||||
logger.Errorf("insert err => %v", err.Error())
|
||||
return ""
|
||||
}
|
||||
return param.ID
|
||||
}
|
||||
|
||||
// Update 修改信息
|
||||
func (r *NeConfig) Update(param model.NeConfig) int64 {
|
||||
if param.ID == "" {
|
||||
return 0
|
||||
}
|
||||
return results
|
||||
param.UpdateTime = time.Now().UnixMilli()
|
||||
tx := datasource.DB("").Model(&model.NeConfig{})
|
||||
// 构建查询条件
|
||||
tx = tx.Where("id = ?", param.ID)
|
||||
tx = tx.Omit("id")
|
||||
// 执行更新
|
||||
if err := tx.Updates(param).Error; err != nil {
|
||||
logger.Errorf("update err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *NeConfig) DeleteByIds(ids []string) int64 {
|
||||
if len(ids) <= 0 {
|
||||
return 0
|
||||
}
|
||||
tx := datasource.DB("").Where("id in ?", ids)
|
||||
if err := tx.Delete(&model.NeConfig{}).Error; err != nil {
|
||||
logger.Errorf("delete err => %v", err.Error())
|
||||
return 0
|
||||
}
|
||||
return tx.RowsAffected
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ var neListSort = []string{
|
||||
"CBC",
|
||||
"CHF",
|
||||
"HLR",
|
||||
"SGWC",
|
||||
}
|
||||
|
||||
// 实例化数据层 NeInfo 结构体
|
||||
|
||||
@@ -115,8 +115,8 @@ func (r *NeConfig) SelectNeConfigByNeTypeAndParamName(neType, paramName string)
|
||||
}
|
||||
|
||||
// SelectNeHostPage 分页查询列表数据
|
||||
func (r *NeConfig) SelectPage(query map[string]any) map[string]any {
|
||||
return r.neConfigRepository.SelectPage(query)
|
||||
func (r *NeConfig) SelectPage(query map[string]string) ([]model.NeConfig, int64) {
|
||||
return r.neConfigRepository.SelectByPage(query)
|
||||
}
|
||||
|
||||
// SelectConfigList 查询列表
|
||||
|
||||
@@ -28,10 +28,10 @@ func GetCDRConnectByIMS(requestID string, data any) ([]byte, error) {
|
||||
}
|
||||
query.RmUID = neInfo.RmUID
|
||||
|
||||
dataMap := neDataService.NewCDREventIMS.SelectPage(query)
|
||||
rows, total := neDataService.NewCDREventIMS.SelectPage(query)
|
||||
resultByte, err := json.Marshal(result.Ok(map[string]any{
|
||||
"requestId": requestID,
|
||||
"data": dataMap,
|
||||
"data": map[string]any{"rows": rows, "total": total},
|
||||
}))
|
||||
return resultByte, err
|
||||
}
|
||||
@@ -53,10 +53,10 @@ func GetCDRConnectBySMF(requestID string, data any) ([]byte, error) {
|
||||
}
|
||||
query.RmUID = neInfo.RmUID
|
||||
|
||||
dataMap := neDataService.NewCDREventSMF.SelectPage(query)
|
||||
rows, total := neDataService.NewCDREventSMF.SelectPage(query)
|
||||
resultByte, err := json.Marshal(result.Ok(map[string]any{
|
||||
"requestId": requestID,
|
||||
"data": dataMap,
|
||||
"data": map[string]any{"rows": rows, "total": total},
|
||||
}))
|
||||
return resultByte, err
|
||||
}
|
||||
@@ -78,10 +78,10 @@ func GetCDRConnectBySMSC(requestID string, data any) ([]byte, error) {
|
||||
}
|
||||
query.RmUID = neInfo.RmUID
|
||||
|
||||
dataMap := neDataService.NewCDREventSMSC.SelectPage(query)
|
||||
rows, total := neDataService.NewCDREventSMSC.SelectPage(query)
|
||||
resultByte, err := json.Marshal(result.Ok(map[string]any{
|
||||
"requestId": requestID,
|
||||
"data": dataMap,
|
||||
"data": map[string]any{"rows": rows, "total": total},
|
||||
}))
|
||||
return resultByte, err
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ const (
|
||||
GROUP_SMF_CDR = "1006_"
|
||||
// 组号-SMSC_CDR会话事件 1007_neId
|
||||
GROUP_SMSC_CDR = "1007_"
|
||||
// 组号-SGWC_CDR会话事件 1008_neId
|
||||
GROUP_SGWC_CDR = "1008_"
|
||||
// 组号-AMF_UE会话事件
|
||||
GROUP_AMF_UE = "1010"
|
||||
// 组号-MME_UE会话事件 1011_neId
|
||||
|
||||
Reference in New Issue
Block a user