diff --git a/features/udm_user/service/service_udm_auth_user.go b/features/udm_user/service/service_udm_auth_user.go index 0a90db94..5cd1e9cd 100644 --- a/features/udm_user/service/service_udm_auth_user.go +++ b/features/udm_user/service/service_udm_auth_user.go @@ -99,6 +99,10 @@ func (r *ServiceUdmAuthUser) InsertCSV(neID string, data []map[string]string) in if s, ok := v["opc"]; ok { authUser.Opc = s } + + if authUser.Imsi == "" { + continue + } arr = append(arr, authUser) } return r.repoAuthUser.Inserts(arr) @@ -121,6 +125,10 @@ func (r *ServiceUdmAuthUser) InsertTxt(neID string, data [][]string) int64 { if len(v) == 5 { authUser.Opc = v[4] } + + if authUser.Imsi == "" { + continue + } arr = append(arr, authUser) } diff --git a/features/udm_user/service/service_udm_sub_user.go b/features/udm_user/service/service_udm_sub_user.go index 3bd72ca2..f5bb673d 100644 --- a/features/udm_user/service/service_udm_sub_user.go +++ b/features/udm_user/service/service_udm_sub_user.go @@ -149,6 +149,10 @@ func (r *ServiceUdmSubUser) InsertCSV(neID string, data []map[string]string) int subUser.StaticIp = arr[8] } } + + if subUser.Imsi == "" { + continue + } arr = append(arr, subUser) } return r.repoSunUser.Inserts(arr) @@ -184,6 +188,10 @@ func (r *ServiceUdmSubUser) InsertTxt(neID string, data [][]string) int64 { subUser.StaticIp = v[18] subUser.EpsDat = strings.Join(v[10:], ",") } + + if subUser.Imsi == "" { + continue + } arr = append(arr, subUser) } return r.repoSunUser.Inserts(arr)