...
|
...
|
@@ -278,13 +278,14 @@ func (srv SyncDataUserService) importUser(param *command.ImportUserCommand) erro |
|
|
editUserIds = append(editUserIds, param.EditUsers[i].Id)
|
|
|
editUserMap[param.EditUsers[i].Id] = param.EditUsers[i]
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
if len(editUserIds) > 0 {
|
|
|
_, editUserList, err := userRepo.Find(map[string]interface{}{
|
|
|
"ids": editUserIds,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
for i := range editUserList {
|
|
|
mVal, ok := editUserMap[editUserList[i].Id]
|
|
|
if !ok {
|
...
|
...
|
@@ -303,9 +304,11 @@ func (srv SyncDataUserService) importUser(param *command.ImportUserCommand) erro |
|
|
return err
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var (
|
|
|
tempUser domain.User
|
|
|
)
|
|
|
if len(param.AddUsers) > 0 {
|
|
|
for i := range param.AddUsers {
|
|
|
tempUser = domain.User{
|
|
|
Id: param.AddUsers[i].Id,
|
...
|
...
|
@@ -325,6 +328,7 @@ func (srv SyncDataUserService) importUser(param *command.ImportUserCommand) erro |
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
|