作者 linmadan

修复排序bug

@@ -586,11 +586,11 @@ func (taskService *TaskService) UpdateTask(updateTaskCommand *command.UpdateTask @@ -586,11 +586,11 @@ func (taskService *TaskService) UpdateTask(updateTaskCommand *command.UpdateTask
586 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 586 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
587 } else { 587 } else {
588 if count > 1 { 588 if count > 1 {
589 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "问题资源已经被引用,创建任务失败") 589 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "问题资源已经被引用,编辑任务失败")
590 } 590 }
591 if count == 1 { 591 if count == 1 {
592 if tasks[0].TaskId != task.TaskId { 592 if tasks[0].TaskId != task.TaskId {
593 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "问题资源已经被引用,创建任务失败") 593 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "问题资源已经被引用,编辑任务失败")
594 } 594 }
595 } 595 }
596 } 596 }
@@ -195,7 +195,7 @@ func (repository *TaskRepository) Find(queryOptions map[string]interface{}) (int @@ -195,7 +195,7 @@ func (repository *TaskRepository) Find(queryOptions map[string]interface{}) (int
195 } else if sortByReleaseTime, ok := queryOptions["sortByReleaseTime"]; ok && (sortByReleaseTime == "ASC" || sortByReleaseTime == "DESC") { 195 } else if sortByReleaseTime, ok := queryOptions["sortByReleaseTime"]; ok && (sortByReleaseTime == "ASC" || sortByReleaseTime == "DESC") {
196 query = query.Order(fmt.Sprintf("task.release_time %s", sortByReleaseTime.(string))) 196 query = query.Order(fmt.Sprintf("task.release_time %s", sortByReleaseTime.(string)))
197 } else if sortByReceiveTime, ok := queryOptions["sortByReceiveTime"]; ok && (sortByReceiveTime == "ASC" || sortByReceiveTime == "DESC") { 197 } else if sortByReceiveTime, ok := queryOptions["sortByReceiveTime"]; ok && (sortByReceiveTime == "ASC" || sortByReceiveTime == "DESC") {
198 - query = query.Order(fmt.Sprintf("task.release_time %s", sortByReleaseTime.(string))) 198 + query = query.Order(fmt.Sprintf("task.receive_time %s", sortByReceiveTime.(string)))
199 } else if sortByCompleteTime, ok := queryOptions["sortByCompleteTime"]; ok && (sortByCompleteTime == "ASC" || sortByCompleteTime == "DESC") { 199 } else if sortByCompleteTime, ok := queryOptions["sortByCompleteTime"]; ok && (sortByCompleteTime == "ASC" || sortByCompleteTime == "DESC") {
200 query = query.Order(fmt.Sprintf("task.complete_time %s", sortByCompleteTime.(string))) 200 query = query.Order(fmt.Sprintf("task.complete_time %s", sortByCompleteTime.(string)))
201 } else if sortByAcceptanceTime, ok := queryOptions["sortByAcceptanceTime"]; ok && (sortByAcceptanceTime == "ASC" || sortByAcceptanceTime == "DESC") { 201 } else if sortByAcceptanceTime, ok := queryOptions["sortByAcceptanceTime"]; ok && (sortByAcceptanceTime == "ASC" || sortByAcceptanceTime == "DESC") {