...
|
...
|
@@ -43,9 +43,6 @@ func (srv TaskService) CreateTaskByProject(transactionContext application.Transa |
|
|
taskRepo := factory.CreateTaskRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
// taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
cnt, _, err := taskRepo.Find(map[string]interface{}{
|
|
|
"name": param.Name,
|
|
|
"leaderId": strconv.Itoa(param.LeaderId),
|
...
|
...
|
@@ -106,10 +103,6 @@ func (srv TaskService) CreateTaskByProject(transactionContext application.Transa |
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "创建任务失败:"+err.Error())
|
|
|
}
|
|
|
newTaskStage := []*domain.TaskStage{}
|
|
|
// err = taskStageRepo.Save(newTaskStage)
|
|
|
// if err != nil {
|
|
|
// return application.ThrowError(application.INTERNAL_SERVER_ERROR, "创建任务失败:"+err.Error())
|
|
|
// }
|
|
|
//记录待执行的里程碑
|
|
|
newTask.SetCurrentStage(newTaskStage)
|
|
|
err = taskRepo.Save(&newTask)
|
...
|
...
|
|