fix: UDM用户删除引用表错误
This commit is contained in:
@@ -187,6 +187,9 @@ func NeInfoByUDM(neId string) (*dborm.NeInfo, error) {
|
||||
log.Error("dborm.XormGetNeInfo is failed:", err)
|
||||
return nil, err
|
||||
}
|
||||
if neInfo.Ip == "" {
|
||||
return nil, fmt.Errorf("ne_info not IP")
|
||||
}
|
||||
return neInfo, nil
|
||||
}
|
||||
|
||||
@@ -963,7 +966,7 @@ func (s *UdmUserApi) UdmSubUserRemoves(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// 命令ok时
|
||||
if strings.Contains(data, "ok") {
|
||||
s.authUser.Deletes(neId, imsi, num)
|
||||
s.subUser.Deletes(neId, imsi, num)
|
||||
}
|
||||
ctx.JSON(w, 200, result.OkData(data))
|
||||
}
|
||||
@@ -1041,7 +1044,7 @@ func (s *UdmUserApi) UdmSubUserImport(w http.ResponseWriter, r *http.Request) {
|
||||
// 命令ok时
|
||||
if strings.Contains(data, "ok") {
|
||||
data := file.ReadCSVFile(filePath)
|
||||
s.authUser.InsertCSV(neId, data)
|
||||
s.subUser.InsertCSV(neId, data)
|
||||
}
|
||||
// ctx.JSON(w, 200, result.OkData(data))
|
||||
ctx.FileAttachment(w, r, filePath, fileName)
|
||||
|
||||
Reference in New Issue
Block a user