fix: udm用户异步导入
This commit is contained in:
@@ -591,12 +591,12 @@ func (s *UdmUserApi) UdmAuthUserImport(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
||||
data := file.ReadCSVFile(localPath)
|
||||
neId = "-"
|
||||
s.authUser.InsertCSV(neId, data)
|
||||
go s.authUser.InsertCSV(neId, data)
|
||||
}
|
||||
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
||||
data := file.ReadTxtFile(localPath)
|
||||
neId = "-"
|
||||
s.authUser.InsertTxt(neId, data)
|
||||
go s.authUser.InsertTxt(neId, data)
|
||||
}
|
||||
}
|
||||
ctx.JSON(w, 200, result.OkData(data))
|
||||
@@ -1180,12 +1180,12 @@ func (s *UdmUserApi) UdmSubUserImport(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
||||
data := file.ReadCSVFile(localPath)
|
||||
neId = "-"
|
||||
s.subUser.InsertCSV(neId, data)
|
||||
go s.subUser.InsertCSV(neId, data)
|
||||
}
|
||||
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
||||
data := file.ReadTxtFile(localPath)
|
||||
neId = "-"
|
||||
s.subUser.InsertTxt(neId, data)
|
||||
go s.subUser.InsertTxt(neId, data)
|
||||
}
|
||||
}
|
||||
ctx.JSON(w, 200, result.OkData(data))
|
||||
|
||||
Reference in New Issue
Block a user