From b13a5ba5194c836c606400b086e5d8bc15522479 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 18 Nov 2024 17:53:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E8=AE=A1=E5=88=92=E5=88=97=E8=A1=A8=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048965 --user=宋昌昌 【工作台】待办-测试计划列表-应该按照创建时间倒序显示 https://www.tapd.cn/55049933/s/1611532 --- .../io/metersphere/dashboard/controller/ToDoController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java index 7a3d8bb0ee..d9acd02ec1 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java @@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; +import java.util.Map; /** * @author song-cc-rock @@ -62,6 +63,8 @@ public class ToDoController { @Operation(summary = "我的待办-测试计划-列表分页查询") @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") public Pager> planPage(@Validated @RequestBody TestPlanTableRequest request) { + // 默认按照创建时间倒序 + request.setSort(Map.of("createTime", "desc")); request.setMyTodo(true); request.setMyTodoUserId(SessionUtils.getUserId()); return testPlanManagementService.page(request);