fix(工作台): 待办计划列表排序未生效
--bug=1049452 --user=宋昌昌 【工作台】待办-测试计划列表-创建时间-点击排序未生效 https://www.tapd.cn/55049933/s/1616331
This commit is contained in:
parent
eeb21b425d
commit
66551a3b4f
|
@ -27,6 +27,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -64,7 +65,9 @@ public class ToDoController {
|
||||||
@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"));
|
if (MapUtils.isEmpty(request.getSort())) {
|
||||||
|
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);
|
||||||
|
|
Loading…
Reference in New Issue