正在显示
1 个修改的文件
包含
21 行增加
和
0 行删除
| @@ -666,11 +666,21 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -666,11 +666,21 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
| 666 | if err := transactionContext.CommitTransaction(); err != nil { | 666 | if err := transactionContext.CommitTransaction(); err != nil { |
| 667 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 667 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 668 | } | 668 | } |
| 669 | + if assessList[0].Executor.UserId != param.UserId { | ||
| 670 | + result := map[string]interface{}{ | ||
| 671 | + "have": false, | ||
| 672 | + "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
| 673 | + "beginDay": today, | ||
| 674 | + "taskRecordId": recordList[0].Id, | ||
| 675 | + } | ||
| 676 | + return result, nil | ||
| 677 | + } | ||
| 669 | result := map[string]interface{}{ | 678 | result := map[string]interface{}{ |
| 670 | "have": true, | 679 | "have": true, |
| 671 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | 680 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), |
| 672 | "beginDay": today, | 681 | "beginDay": today, |
| 673 | "taskRecordId": recordList[0].Id, | 682 | "taskRecordId": recordList[0].Id, |
| 683 | + "userId": assessList[0].Executor.UserId, | ||
| 674 | } | 684 | } |
| 675 | return result, nil | 685 | return result, nil |
| 676 | } | 686 | } |
| @@ -1053,14 +1063,25 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1053,14 +1063,25 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
| 1053 | } | 1063 | } |
| 1054 | return result, nil | 1064 | return result, nil |
| 1055 | } | 1065 | } |
| 1066 | + | ||
| 1056 | if err := transactionContext.CommitTransaction(); err != nil { | 1067 | if err := transactionContext.CommitTransaction(); err != nil { |
| 1057 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1068 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 1058 | } | 1069 | } |
| 1070 | + if assessList[0].Executor.UserId != param.UserId { | ||
| 1071 | + result := map[string]interface{}{ | ||
| 1072 | + "have": false, | ||
| 1073 | + "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
| 1074 | + "beginDay": today, | ||
| 1075 | + "taskRecordId": recordList[0].Id, | ||
| 1076 | + } | ||
| 1077 | + return result, nil | ||
| 1078 | + } | ||
| 1059 | result := map[string]interface{}{ | 1079 | result := map[string]interface{}{ |
| 1060 | "have": true, | 1080 | "have": true, |
| 1061 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | 1081 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), |
| 1062 | "beginDay": today, | 1082 | "beginDay": today, |
| 1063 | "taskRecordId": recordList[0].Id, | 1083 | "taskRecordId": recordList[0].Id, |
| 1084 | + "userId": assessList[0].Executor.UserId, | ||
| 1064 | } | 1085 | } |
| 1065 | return result, nil | 1086 | return result, nil |
| 1066 | } | 1087 | } |
-
请 注册 或 登录 后发表评论