...
|
...
|
@@ -205,7 +205,7 @@ func compareStage(u *domain.UserAuth, id int, srcStage []*domain.TaskStage, newS |
|
|
}
|
|
|
if it.PlanCompletedAt != v.PlanCompletedAt {
|
|
|
logOpt := createdLogOpt(u, taskId)
|
|
|
logOpt.OptField = "修改了里程碑" + it.Name + "计划完成时间"
|
|
|
logOpt.OptField = "修改了里程碑" + it.Name + "的计划完成时间"
|
|
|
if it.PlanCompletedAt == 0 {
|
|
|
logOpt.OptValue = "未设置时间"
|
|
|
} else {
|
...
|
...
|
@@ -230,15 +230,24 @@ func getUserMap(ids []int) (map[int]*domain.User, error) { |
|
|
if len(ids) == 0 {
|
|
|
return userMap, nil
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
|
|
|
transactionContext, err := factory.StartTransaction()
|
|
|
if err != nil {
|
|
|
return userMap, err
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
_, users, err := userRepo.Find(map[string]interface{}{"ids": ids, "limit": len(ids)})
|
|
|
if err != nil {
|
|
|
return userMap, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
for i := range users {
|
|
|
user := users[i]
|
|
|
userMap[int(user.Id)] = user
|
...
|
...
|
|