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

@@ -45,7 +45,6 @@ func (s *UDMSubController) ResetData(c *gin.Context) {
return
}
neId = ""
data := s.udmSubService.ResetData(neId)
c.JSON(200, result.OkData(data))
}
@@ -55,7 +54,6 @@ func (s *UDMSubController) ResetData(c *gin.Context) {
// GET /list
func (s *UDMSubController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
querys["neId"] = ""
data := s.udmSubService.SelectPage(querys)
c.JSON(200, result.Ok(data))
}
@@ -99,7 +97,6 @@ func (s *UDMSubController) Info(c *gin.Context) {
return
}
neId = ""
// 解析返回的数据
u := s.udmSubService.ParseInfo(imsi, neId, data)
s.udmSubService.Insert(neId, u)
@@ -149,7 +146,6 @@ func (s *UDMSubController) Add(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
body.NeId = neId
s.udmSubService.Insert(neId, body)
}
@@ -204,8 +200,7 @@ func (s *UDMSubController) Adds(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
go s.udmSubService.LoadData(neId, body.IMSI, num, body.Remark)
s.udmSubService.LoadData(neId, body.IMSI, num, body.Remark)
}
c.JSON(200, result.OkData(data))
}
@@ -253,7 +248,6 @@ func (s *UDMSubController) Edit(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
body.NeId = neId
s.udmSubService.Insert(neId, body)
}
@@ -305,7 +299,6 @@ func (s *UDMSubController) Remove(c *gin.Context) {
}
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
s.udmSubService.Delete(neId, imsi)
}
resultData[imsi] = data
@@ -351,9 +344,7 @@ func (s *UDMSubController) Removes(c *gin.Context) {
// 命令ok时
if strings.Contains(data, "ok") {
neId = ""
go s.udmSubService.LoadData(neId, imsi, num, "-(Deleted)-")
s.udmSubService.LoadData(neId, imsi, num, "-(Deleted)-")
}
c.JSON(200, result.OkData(data))
}