fix(测试计划): 修复关联用例展示顺序排序为降序

--bug=1042781 --user=王孝刚 【测试计划】已开启可重复用例关联-计划详情-功能/接口/场景用例列表-反复关联同一用例-应该按照降序在顶部显示 https://www.tapd.cn/55049933/s/1533610
This commit is contained in:
wxg0103 2024-06-21 14:47:18 +08:00 committed by Craftsman
parent 6561ca6ee7
commit 890f04c040
3 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ public class TestPlanApiCaseController {
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
public Pager<List<TestPlanApiCasePageResponse>> page(@Validated @RequestBody TestPlanApiCaseRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "t.pos asc");
StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "t.pos desc");
return PageUtils.setPageInfo(page, testPlanApiCaseService.hasRelateApiCaseList(request, false));
}

View File

@ -56,7 +56,7 @@ public class TestPlanApiScenarioController {
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
public Pager<List<TestPlanApiScenarioPageResponse>> page(@Validated @RequestBody TestPlanApiScenarioRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "test_plan_api_scenario.pos asc");
StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "test_plan_api_scenario.pos desc");
return PageUtils.setPageInfo(page, testPlanApiScenarioService.hasRelateApiScenarioList(request, false));
}

View File

@ -66,7 +66,7 @@ public class TestPlanFunctionalCaseController {
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
public Pager<List<TestPlanCasePageResponse>> page(@Validated @RequestBody TestPlanCaseRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString("id", "functional_case")) ? request.getSortString("id", "functional_case") : "test_plan_functional_case.pos asc");
StringUtils.isNotBlank(request.getSortString("id", "functional_case")) ? request.getSortString("id", "functional_case") : "test_plan_functional_case.pos desc");
return PageUtils.setPageInfo(page, testPlanFunctionalCaseService.getFunctionalCasePage(request, false));
}