fix(工作台): 待办计划列表按照创建时间倒序

--bug=1048965 --user=宋昌昌 【工作台】待办-测试计划列表-应该按照创建时间倒序显示 https://www.tapd.cn/55049933/s/1611532
This commit is contained in:
song-cc-rock 2024-11-18 17:53:38 +08:00 committed by Craftsman
parent bfc36b71d1
commit b13a5ba519
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author song-cc-rock * @author song-cc-rock
@ -62,6 +63,8 @@ public class ToDoController {
@Operation(summary = "我的待办-测试计划-列表分页查询") @Operation(summary = "我的待办-测试计划-列表分页查询")
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
public Pager<List<TestPlanResponse>> planPage(@Validated @RequestBody TestPlanTableRequest request) { public Pager<List<TestPlanResponse>> planPage(@Validated @RequestBody TestPlanTableRequest request) {
// 默认按照创建时间倒序
request.setSort(Map.of("createTime", "desc"));
request.setMyTodo(true); request.setMyTodo(true);
request.setMyTodoUserId(SessionUtils.getUserId()); request.setMyTodoUserId(SessionUtils.getUserId());
return testPlanManagementService.page(request); return testPlanManagementService.page(request);