fix: UDM数据来源通过网元主机的Redis客户端进行连接

This commit is contained in:
TsMask
2024-10-16 16:41:57 +08:00
parent 717ee894bd
commit 87836c7adc
7 changed files with 83 additions and 35 deletions

View File

@@ -46,7 +46,6 @@ func (s *UDMAuthController) ResetData(c *gin.Context) {
return
}
neId = ""
data := s.udmAuthService.ResetData(neId)
c.JSON(200, result.OkData(data))
}
@@ -56,7 +55,6 @@ func (s *UDMAuthController) ResetData(c *gin.Context) {
// GET /list
func (s *UDMAuthController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
querys["neId"] = ""
data := s.udmAuthService.SelectPage(querys)
c.JSON(200, result.Ok(data))
}
@@ -100,7 +98,6 @@ func (s *UDMAuthController) Info(c *gin.Context) {
return
}
neId = ""
// 解析返回的数据
u := s.udmAuthService.ParseInfo(imsi, neId, data)
s.udmAuthService.Insert(neId, u)
@@ -150,7 +147,6 @@ func (s *UDMAuthController) Add(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
s.udmAuthService.Insert(neId, body)
}
c.JSON(200, result.OkData(data))
@@ -200,8 +196,7 @@ func (s *UDMAuthController) Adds(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
go s.udmAuthService.LoadData(neId, body.IMSI, num)
s.udmAuthService.LoadData(neId, body.IMSI, num)
}
c.JSON(200, result.OkData(data))
}
@@ -249,7 +244,6 @@ func (s *UDMAuthController) Edit(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
s.udmAuthService.Insert(neId, body)
}
c.JSON(200, result.OkData(data))
@@ -300,7 +294,6 @@ func (s *UDMAuthController) Remove(c *gin.Context) {
}
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
s.udmAuthService.Delete(imsi, neId)
}
resultData[imsi] = data
@@ -346,8 +339,7 @@ func (s *UDMAuthController) Removes(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
go s.udmAuthService.LoadData(neId, imsi, num)
s.udmAuthService.LoadData(neId, imsi, num)
}
c.JSON(200, result.OkData(data))
}