fix: UDM签约修改字段补充

This commit is contained in:
TsMask
2023-09-19 10:06:21 +08:00
parent bc50f10c24
commit 702dc63fd2
2 changed files with 51 additions and 2 deletions

View File

@@ -322,7 +322,30 @@ func (r *RepoUdmSubUser) Update(neID string, authUser model.UdmSubUser) int64 {
if authUser.EpsDat != "" && authUser.EpsDat != user.EpsDat {
user.EpsDat = authUser.EpsDat
}
user.StaticIp = authUser.StaticIp
if authUser.EpsFlag != "" && authUser.EpsFlag != user.EpsFlag {
user.EpsFlag = authUser.EpsFlag
}
if authUser.EpsOdb != "" && authUser.EpsDat != user.EpsDat {
user.EpsOdb = authUser.EpsOdb
}
if authUser.HplmnOdb != "" && authUser.HplmnOdb != user.HplmnOdb {
user.HplmnOdb = authUser.HplmnOdb
}
if authUser.Epstpl != "" && authUser.Epstpl != user.Epstpl {
user.Epstpl = authUser.Epstpl
}
if authUser.Ard != "" && authUser.Ard != user.Ard {
user.Ard = authUser.Ard
}
if authUser.ContextId != "" && authUser.ContextId != user.ContextId {
user.ContextId = authUser.ContextId
}
if authUser.ApnContext != "" && authUser.ApnContext != user.ApnContext {
user.ApnContext = authUser.ApnContext
}
if authUser.StaticIp != "" && authUser.StaticIp != user.StaticIp {
user.StaticIp = authUser.StaticIp
}
results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", user.Imsi, user.NeID).Update(user)
if err != nil {