feat: UDM鉴权导出格式修改,权限控制

This commit is contained in:
TsMask
2025-09-23 10:48:41 +08:00
parent 1ab2d97756
commit d60bb0d3d4
3 changed files with 18 additions and 4 deletions

View File

@@ -204,6 +204,7 @@ INSERT INTO `sys_menu` VALUES (1128, 'Execute', 2108, 2, '', '', '1', '1', 'B',
INSERT INTO `sys_menu` VALUES (1129, 'Reset', 2109, 1, '', '', '1', '1', 'B', '1', '1', 'mmlManage:udmOperate:reset', '#', 'bluearcus', 1756903248527, '', 0, '');
INSERT INTO `sys_menu` VALUES (1130, 'Execute', 2109, 2, '', '', '1', '1', 'B', '1', '1', 'mmlManage:udmOperate:execute', '#', 'bluearcus', 1756903248527, '', 0, '');
INSERT INTO `sys_menu` VALUES (1131, 'Display User Online Infomation', 2132, 10, '', '', '1', '1', 'B', '1', '1', 'dashboard:overview:onlineInfo', '#', 'bluearcus', 1757062839936, '', 0, '');
INSERT INTO `sys_menu` VALUES (1132, 'menu.common.export', 2009, 5, '', '', '1', '1', 'B', '1', '1', 'neUser:auth:export', '#', 'bluearcus', 1756438214960, 'bluearcus', 1756456767639, '');
INSERT INTO `sys_menu` VALUES (2009, 'menu.ueUser.authUDM', 2075, 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', 2075, 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 (2011, 'menu.ueUser.voipUDM', 2075, 3, 'voip', 'neUser/voip/index', '1', '1', 'M', '1', '1', 'neUser:voip:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.voipUDMRemark');

View File

@@ -187,6 +187,7 @@ REPLACE INTO `sys_menu` VALUES (1128, 'Execute', 2108, 2, '', '', '1', '1', 'B',
REPLACE INTO `sys_menu` VALUES (1129, 'Reset', 2109, 1, '', '', '1', '1', 'B', '1', '1', 'mmlManage:udmOperate:reset', '#', 'bluearcus', 1756903248527, '', 0, '');
REPLACE INTO `sys_menu` VALUES (1130, 'Execute', 2109, 2, '', '', '1', '1', 'B', '1', '1', 'mmlManage:udmOperate:execute', '#', 'bluearcus', 1756903248527, '', 0, '');
REPLACE INTO `sys_menu` VALUES (1131, 'Display User Online Infomation', 2132, 10, '', '', '1', '1', 'B', '1', '1', 'dashboard:overview:onlineInfo', '#', 'bluearcus', 1757062839936, '', 0, '');
REPLACE INTO `sys_menu` VALUES (1132, 'menu.common.export', 2009, 5, '', '', '1', '1', 'B', '1', '1', 'neUser:auth:export', '#', 'bluearcus', 1756438214960, 'bluearcus', 1756456767639, '');
REPLACE INTO `sys_menu` VALUES (2009, 'menu.ueUser.authUDM', 2075, 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', 2075, 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 (2011, 'menu.ueUser.voipUDM', 2075, 3, 'voip', 'neUser/voip/index', '1', '1', 'M', '1', '1', 'neUser:voip:index', 'icon-xiangmuchengyuan', 'supervisor', 1700000000000, NULL, 0, 'menu.ueUser.voipUDMRemark');

View File

@@ -485,15 +485,21 @@ func (s *UDMAuthController) Export(c *gin.Context) {
filePath := filepath.Join(file.ParseUploadFileDir(uploadsubpath.EXPORT), fileName)
if fileType == "csv" {
// 转换数据
// 转换数据 imsi,ki,algo,amf,opc,create_time
data := [][]string{}
data = append(data, []string{"imsi", "ki", "algo", "amf", "opc"})
data = append(data, []string{"imsi", "ki", "algo", "amf", "opc", "create_time"})
for _, v := range rows {
opc := v.Opc
if opc == "-" {
opc = ""
}
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc})
createTime := ""
if v.CreateTime == 0 {
createTime = time.Now().Format(time.RFC3339)
} else {
createTime = time.UnixMilli(v.CreateTime).Format(time.RFC3339)
}
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc, createTime})
}
// 输出到文件
err := file.WriterFileCSV(data, filePath)
@@ -511,7 +517,13 @@ func (s *UDMAuthController) Export(c *gin.Context) {
if opc == "-" {
opc = ""
}
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc})
createTime := ""
if v.CreateTime == 0 {
createTime = time.Now().Format(time.RFC3339)
} else {
createTime = time.UnixMilli(v.CreateTime).Format(time.RFC3339)
}
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc, createTime})
}
// 输出到文件