This commit is contained in:
王炜翔 2024-11-12 16:29:22 +08:00
parent b0c779d759
commit 8ba69aa37e

View File

@ -246,7 +246,14 @@ namespace asg_form.Controllers
} }
//return Ok("用户不存在"); //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")] [Route("api/v1/admin/FindTasks")]
@ -286,7 +293,7 @@ namespace asg_form.Controllers
t.status == "3" ? 1 : t.status == "3" ? 1 :
t.status == "2" ? 0 : t.status == "2" ? 0 :
10) 10)
.ThenBy(n => n.priority == "5" ? 5 : .ThenByDescending(n => n.priority == "5" ? 5 :
n.priority == "4" ? 4 : n.priority == "4" ? 4 :
n.priority == "3" ? 3 : n.priority == "3" ? 3 :
n.priority == "2" ? 2 : n.priority == "2" ? 2 :