Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_backend
This commit is contained in:
@@ -89,6 +89,11 @@ func (s *UDMAuthController) Info(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(data) == 0 {
|
||||
c.JSON(200, result.ErrMsg("No Auth Data"))
|
||||
return
|
||||
}
|
||||
|
||||
// 查询数据库是否存在并存入
|
||||
neId = ""
|
||||
var userInfo model.UDMAuth
|
||||
|
||||
@@ -90,6 +90,11 @@ func (s *UDMSubController) Info(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(data) == 0 {
|
||||
c.JSON(200, result.ErrMsg("No Subs Data"))
|
||||
return
|
||||
}
|
||||
|
||||
// 解析返回的数据
|
||||
cnType, _ := strconv.ParseInt(data["CNType"][:4], 0, 64)
|
||||
rat, _ := strconv.ParseInt(data["RAT"][:4], 0, 64)
|
||||
|
||||
@@ -62,12 +62,8 @@ func (r *UDMAuthImpl) authDataByRedis(imsi, neID string) []model.UDMAuth {
|
||||
|
||||
// Save UDM鉴权用户-获取redis全部保存数据库
|
||||
func (r *UDMAuthImpl) Save(neID string) int64 {
|
||||
var num int64 = 0
|
||||
authArr := r.authDataByRedis("*", neID)
|
||||
// 有数据才清空
|
||||
if len(authArr) == 0 {
|
||||
return num
|
||||
}
|
||||
// 数据清空后添加
|
||||
go r.udmAuthRepository.ClearAndInsert(neID, authArr)
|
||||
return int64(len(authArr))
|
||||
}
|
||||
|
||||
@@ -78,12 +78,8 @@ func (r *UDMSubImpl) subDataByRedis(imsi, neID string) []model.UDMSub {
|
||||
|
||||
// Save UDM签约用户-获取redis全部保存数据库
|
||||
func (r *UDMSubImpl) Save(neID string) int64 {
|
||||
var num int64 = 0
|
||||
subArr := r.subDataByRedis("*", neID)
|
||||
// 有数据才清空
|
||||
if len(subArr) == 0 {
|
||||
return num
|
||||
}
|
||||
// 数据清空后添加
|
||||
go r.udmSubRepository.ClearAndInsert(neID, subArr)
|
||||
return int64(len(subArr))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user