refactor(测试计划): 优化计划报告导出内容分页查询

This commit is contained in:
song-cc-rock 2024-09-11 11:28:12 +08:00 committed by Craftsman
parent 359bfa96f4
commit 516f2127d2
1 changed files with 4 additions and 0 deletions

View File

@ -148,6 +148,7 @@ public class TestPlanReportController {
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num, tprb.id desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num, tprb.id desc");
if (!request.getStartPager()) { if (!request.getStartPager()) {
page.close(); page.close();
page.setOrderBy("tprb.bug_num, tprb.id desc");
} }
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailBugs(request)); return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailBugs(request));
} }
@ -161,6 +162,7 @@ public class TestPlanReportController {
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.pos desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.pos desc");
if (!request.getStartPager()) { if (!request.getStartPager()) {
page.close(); page.close();
page.setOrderBy("tprfc.pos desc");
} }
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.FUNCTIONAL)); return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.FUNCTIONAL));
} }
@ -181,6 +183,7 @@ public class TestPlanReportController {
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.pos desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.pos desc");
if (!request.getStartPager()) { if (!request.getStartPager()) {
page.close(); page.close();
page.setOrderBy("tprac.pos desc");
} }
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_CASE)); return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_CASE));
} }
@ -194,6 +197,7 @@ public class TestPlanReportController {
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.pos desc"); StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.pos desc");
if (!request.getStartPager()) { if (!request.getStartPager()) {
page.close(); page.close();
page.setOrderBy("tpras.pos desc");
} }
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_SCENARIO)); return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_SCENARIO));
} }