正在显示
1 个修改的文件
包含
33 行增加
和
33 行删除
| @@ -662,41 +662,41 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -662,41 +662,41 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
| 662 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 662 | return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 663 | } | 663 | } |
| 664 | 664 | ||
| 665 | - // if len(assessList) == 0 || taskRecordId == 0 { | ||
| 666 | - // result := map[string]interface{}{ | ||
| 667 | - // "have": false, | ||
| 668 | - // "cycleId": strconv.Itoa(cycleId), | ||
| 669 | - // "beginDay": today, | ||
| 670 | - // "taskRecordId": strconv.Itoa(taskRecordId), | ||
| 671 | - // "userId": strconv.Itoa(executorId), | ||
| 672 | - // } | ||
| 673 | - // return result, nil | ||
| 674 | - // } | 665 | + if len(assessList) == 0 || taskRecordId == 0 { |
| 666 | + result := map[string]interface{}{ | ||
| 667 | + "have": false, | ||
| 668 | + "cycleId": strconv.Itoa(cycleId), | ||
| 669 | + "beginDay": today, | ||
| 670 | + "taskRecordId": strconv.Itoa(taskRecordId), | ||
| 671 | + "userId": strconv.Itoa(executorId), | ||
| 672 | + } | ||
| 673 | + return result, nil | ||
| 674 | + } | ||
| 675 | 675 | ||
| 676 | - // if assessList[0].Executor.UserId != param.UserId { | ||
| 677 | - // result := map[string]interface{}{ | ||
| 678 | - // "have": false, | ||
| 679 | - // "cycleId": strconv.Itoa(cycleId), | ||
| 680 | - // "beginDay": today, | ||
| 681 | - // "taskRecordId": strconv.Itoa(taskRecordId), | ||
| 682 | - // "userId": strconv.Itoa(executorId), | ||
| 683 | - // } | ||
| 684 | - // return result, nil | ||
| 685 | - // } | 676 | + if assessList[0].Executor.UserId != param.UserId { |
| 686 | result := map[string]interface{}{ | 677 | result := map[string]interface{}{ |
| 687 | - "have": true, | 678 | + "have": false, |
| 688 | "cycleId": strconv.Itoa(cycleId), | 679 | "cycleId": strconv.Itoa(cycleId), |
| 689 | "beginDay": today, | 680 | "beginDay": today, |
| 690 | "taskRecordId": strconv.Itoa(taskRecordId), | 681 | "taskRecordId": strconv.Itoa(taskRecordId), |
| 691 | "userId": strconv.Itoa(executorId), | 682 | "userId": strconv.Itoa(executorId), |
| 692 | } | 683 | } |
| 693 | - result = map[string]interface{}{ | 684 | + return result, nil |
| 685 | + } | ||
| 686 | + result := map[string]interface{}{ | ||
| 694 | "have": true, | 687 | "have": true, |
| 695 | - "cycleId": "1669227421016002560", | ||
| 696 | - "beginDay": "2023-06-28", | ||
| 697 | - "taskRecordId": "1673722975515316224", | ||
| 698 | - "userId": "3422174102828544", | 688 | + "cycleId": strconv.Itoa(cycleId), |
| 689 | + "beginDay": today, | ||
| 690 | + "taskRecordId": strconv.Itoa(taskRecordId), | ||
| 691 | + "userId": strconv.Itoa(executorId), | ||
| 699 | } | 692 | } |
| 693 | + // result = map[string]interface{}{ | ||
| 694 | + // "have": true, | ||
| 695 | + // "cycleId": "1669227421016002560", | ||
| 696 | + // "beginDay": "2023-06-28", | ||
| 697 | + // "taskRecordId": "1673722975515316224", | ||
| 698 | + // "userId": "3422174102828544", | ||
| 699 | + // } | ||
| 700 | return result, nil | 700 | return result, nil |
| 701 | } | 701 | } |
| 702 | 702 | ||
| @@ -1116,13 +1116,13 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1116,13 +1116,13 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
| 1116 | "taskRecordId": strconv.Itoa(taskRecordId), | 1116 | "taskRecordId": strconv.Itoa(taskRecordId), |
| 1117 | "userId": strconv.Itoa(executorId), | 1117 | "userId": strconv.Itoa(executorId), |
| 1118 | } | 1118 | } |
| 1119 | - result = map[string]interface{}{ | ||
| 1120 | - "have": true, | ||
| 1121 | - "cycleId": "1669227421016002560", | ||
| 1122 | - "beginDay": "2023-06-28", | ||
| 1123 | - "taskRecordId": "1673722975515316224", | ||
| 1124 | - "userId": "3422174102828544", | ||
| 1125 | - } | 1119 | + // result = map[string]interface{}{ |
| 1120 | + // "have": true, | ||
| 1121 | + // "cycleId": "1669227421016002560", | ||
| 1122 | + // "beginDay": "2023-06-28", | ||
| 1123 | + // "taskRecordId": "1673722975515316224", | ||
| 1124 | + // "userId": "3422174102828544", | ||
| 1125 | + // } | ||
| 1126 | return result, nil | 1126 | return result, nil |
| 1127 | } | 1127 | } |
| 1128 | 1128 |
-
请 注册 或 登录 后发表评论