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);