作者 陈志颖

fix:增加返回任务素币奖励范围

@@ -29,6 +29,10 @@ type TaskDto struct { @@ -29,6 +29,10 @@ type TaskDto struct {
29 TaskNature *domain.TaskNature `json:"taskNature"` 29 TaskNature *domain.TaskNature `json:"taskNature"`
30 // 奖励素币 30 // 奖励素币
31 SuMoney float64 `json:"suMoney"` 31 SuMoney float64 `json:"suMoney"`
  32 + // 最小奖励素币
  33 + MinSuMoney float64 `json:"minSuMoney"`
  34 + // 最大奖励素币
  35 + MaxSuMoney float64 `json:"maxSuMoney"`
32 // 验收标准 36 // 验收标准
33 AcceptanceStandard string `json:"acceptanceStandard"` 37 AcceptanceStandard string `json:"acceptanceStandard"`
34 // 任务描述 38 // 任务描述
@@ -999,8 +999,11 @@ func (taskService *TaskService) GetTask(getTaskQuery *query.GetTaskQuery) (inter @@ -999,8 +999,11 @@ func (taskService *TaskService) GetTask(getTaskQuery *query.GetTaskQuery) (inter
999 if err := transactionContext.CommitTransaction(); err != nil { 999 if err := transactionContext.CommitTransaction(); err != nil {
1000 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 1000 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
1001 } 1001 }
1002 - // TODO 返回任务素币奖励范围  
1003 - 1002 + // 返回任务素币奖励范围
  1003 + if taskDto.TaskStatus != 5 && taskDto.MinSuMoney == 0 && taskDto.MaxSuMoney == 0 {
  1004 + taskDto.MinSuMoney = 0
  1005 + taskDto.MaxSuMoney = taskDto.SuMoney
  1006 + }
1004 return taskDto, nil 1007 return taskDto, nil
1005 } 1008 }
1006 } 1009 }