diff --git a/asg_form/Controllers/AssignmentController.cs b/asg_form/Controllers/AssignmentController.cs index 8371a3d..5896860 100644 --- a/asg_form/Controllers/AssignmentController.cs +++ b/asg_form/Controllers/AssignmentController.cs @@ -246,7 +246,14 @@ namespace asg_form.Controllers } //return Ok("用户不存在"); - return query.OrderByDescending(a => a.userId).ToList(); + return query.OrderByDescending(a => a.userId) + .ThenByDescending(n => n.priority == "5" ? 5 : + n.priority == "4" ? 4 : + n.priority == "3" ? 3 : + n.priority == "2" ? 2 : + n.priority == "1" ? 1 : + n.priority == "0" ? 0 : + 10).ToList(); } [Route("api/v1/admin/FindTasks")] @@ -286,7 +293,7 @@ namespace asg_form.Controllers t.status == "3" ? 1 : t.status == "2" ? 0 : 10) - .ThenBy(n => n.priority == "5" ? 5 : + .ThenByDescending(n => n.priority == "5" ? 5 : n.priority == "4" ? 4 : n.priority == "3" ? 3 : n.priority == "2" ? 2 :