作者 tangxvhui

优化调整

@@ -910,10 +910,14 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction @@ -910,10 +910,14 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction
910 "transactionContext": transactionContext, 910 "transactionContext": transactionContext,
911 }) 911 })
912 for _, val := range param { 912 for _, val := range param {
913 - taskData, err := taskRepo.FindOne(map[string]interface{}{"id": val.TaskId}) 913 + _, taskDataList, err := taskRepo.Find(map[string]interface{}{"id": val.TaskId})
914 if err != nil { 914 if err != nil {
915 return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error()) 915 return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error())
916 } 916 }
  917 + if len(taskDataList) == 0 {
  918 + continue
  919 + }
  920 + taskData := taskDataList[0]
917 _, stageList, err := taskStageRepo.Find(map[string]interface{}{"taskId": val.TaskId}) 921 _, stageList, err := taskStageRepo.Find(map[string]interface{}{"taskId": val.TaskId})
918 if err != nil { 922 if err != nil {
919 return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error()) 923 return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())