...
|
...
|
@@ -94,42 +94,42 @@ type TaskStatus interface { |
|
|
type UnReleasedStatus struct{}
|
|
|
|
|
|
func (status *UnReleasedStatus) Update(task *Task, data map[string]interface{}) error {
|
|
|
if taskName, ok := data["taskName"]; ok && taskName != "" {
|
|
|
if taskName, ok := data["taskName"]; ok {
|
|
|
task.TaskName = taskName.(string)
|
|
|
}
|
|
|
if referenceResourceType, ok := data["referenceResourceType"]; ok && referenceResourceType != 0 {
|
|
|
if referenceResourceType, ok := data["referenceResourceType"]; ok {
|
|
|
task.ReferenceResource.ReferenceResourceType = referenceResourceType.(int)
|
|
|
}
|
|
|
if referenceResourceItems, ok := data["referenceResourceItems"]; ok && len(referenceResourceItems.([]*ReferenceResourceItem)) != 0 {
|
|
|
if referenceResourceItems, ok := data["referenceResourceItems"]; ok {
|
|
|
task.ReferenceResource.ReferenceResourceItems = referenceResourceItems.([]*ReferenceResourceItem)
|
|
|
}
|
|
|
if customerValue, ok := data["customerValue"]; ok && len(customerValue.([]string)) != 0 {
|
|
|
if customerValue, ok := data["customerValue"]; ok {
|
|
|
task.CustomerValue = customerValue.([]string)
|
|
|
}
|
|
|
if taskNature, ok := data["taskNature"]; ok && taskNature != "" {
|
|
|
if taskNature, ok := data["taskNature"]; ok {
|
|
|
task.TaskNature = taskNature.(string)
|
|
|
}
|
|
|
if suMoney, ok := data["suMoney"]; ok && suMoney.(float64) != float64(0) {
|
|
|
if suMoney, ok := data["suMoney"]; ok {
|
|
|
task.SuMoney = suMoney.(float64)
|
|
|
}
|
|
|
if task.TaskType == TASK_TYPE_BID {
|
|
|
if bidStartTime, ok := data["bidStartTime"]; ok && !bidStartTime.(time.Time).IsZero() {
|
|
|
if bidStartTime, ok := data["bidStartTime"]; ok {
|
|
|
task.BidInfo.BidStartTime = bidStartTime.(time.Time)
|
|
|
}
|
|
|
if bidEndTime, ok := data["bidEndTime"]; ok && !bidEndTime.(time.Time).IsZero() {
|
|
|
if bidEndTime, ok := data["bidEndTime"]; ok {
|
|
|
task.BidInfo.BidEndTime = bidEndTime.(time.Time)
|
|
|
}
|
|
|
}
|
|
|
if acceptanceStandard, ok := data["acceptanceStandard"]; ok && acceptanceStandard != "" {
|
|
|
if acceptanceStandard, ok := data["acceptanceStandard"]; ok {
|
|
|
task.AcceptanceStandard = acceptanceStandard.(string)
|
|
|
}
|
|
|
if taskDescription, ok := data["taskDescription"]; ok && taskDescription != "" {
|
|
|
if taskDescription, ok := data["taskDescription"]; ok {
|
|
|
task.TaskDescription = taskDescription.(string)
|
|
|
}
|
|
|
if taskPictureUrls, ok := data["taskPictureUrls"]; ok && len(taskPictureUrls.([]string)) != 0 {
|
|
|
if taskPictureUrls, ok := data["taskPictureUrls"]; ok {
|
|
|
task.TaskPictureUrls = taskPictureUrls.([]string)
|
|
|
}
|
|
|
if isRewardTake, ok := data["isRewardTake"]; ok && isRewardTake != false {
|
|
|
if isRewardTake, ok := data["isRewardTake"]; ok {
|
|
|
task.IsRewardTake = isRewardTake.(bool)
|
|
|
}
|
|
|
return nil
|
...
|
...
|
|