fix(测试计划): 分享的报告开启测试点后明细列表顺序不一致
--bug=1050473 --user=宋昌昌 【测试计划】报告-分享的报告-开启了测试点-测试点顺序与报告处不一致 https://www.tapd.cn/55049933/s/1631499
This commit is contained in:
parent
fb4614f11f
commit
cb3bcb38bd
|
@ -98,7 +98,11 @@ public class TestPlanReportShareController {
|
|||
ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId());
|
||||
testPlanReportShareService.validateExpired(shareInfo);
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num, tprb.id desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprb.bug_num desc");
|
||||
if (!request.getStartPager()) {
|
||||
page.close();
|
||||
page.setOrderBy("tprb.bug_num desc");
|
||||
}
|
||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailBugs(request));
|
||||
}
|
||||
|
||||
|
@ -112,6 +116,13 @@ public class TestPlanReportShareController {
|
|||
sort = StringUtils.replace(sort, "request_time", "request_duration");
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(sort) ? sort : "tprfc.pos desc");
|
||||
if (!request.getStartPager()) {
|
||||
// 不分页仅排序 {测试集升序, 用例位次倒序}
|
||||
page.setPageSize(0);
|
||||
page.setPageSizeZero(true);
|
||||
page.setOrderBy("tpc.pos, tpc.name, tprfc.pos desc");
|
||||
page.setOrderByOnly(true);
|
||||
}
|
||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, null, AssociateCaseType.FUNCTIONAL));
|
||||
}
|
||||
|
||||
|
@ -125,6 +136,13 @@ public class TestPlanReportShareController {
|
|||
sort = StringUtils.replace(sort, "request_time", "request_duration");
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(sort) ? sort : "tprac.pos desc");
|
||||
if (!request.getStartPager()) {
|
||||
// 不分页仅排序 {测试集升序, 用例位次倒序}
|
||||
page.setPageSize(0);
|
||||
page.setPageSizeZero(true);
|
||||
page.setOrderBy("tpc.pos, tpc.name, tprac.pos desc");
|
||||
page.setOrderByOnly(true);
|
||||
}
|
||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, null, AssociateCaseType.API_CASE));
|
||||
}
|
||||
|
||||
|
@ -138,6 +156,13 @@ public class TestPlanReportShareController {
|
|||
sort = StringUtils.replace(sort, "request_time", "request_duration");
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(sort) ? sort : "tpras.pos desc");
|
||||
if (!request.getStartPager()) {
|
||||
// 不分页仅排序 {测试集升序, 用例位次倒序}
|
||||
page.setPageSize(0);
|
||||
page.setPageSizeZero(true);
|
||||
page.setOrderBy("tpc.pos, tpc.name, tpras.pos desc");
|
||||
page.setOrderByOnly(true);
|
||||
}
|
||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, null, AssociateCaseType.API_SCENARIO));
|
||||
}
|
||||
|
||||
|
@ -148,6 +173,9 @@ public class TestPlanReportShareController {
|
|||
testPlanReportShareService.validateExpired(shareInfo);
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpr.create_time desc");
|
||||
if (!request.getStartPager()) {
|
||||
page.close();
|
||||
}
|
||||
return PageUtils.setPageInfo(page, testPlanReportService.planReportList(request));
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
|
||||
<sql id="queryByTableRequest">
|
||||
<if test="request.myTodo">
|
||||
<!-- 待办: 查询创建人为我的所有的计划 -->
|
||||
<!-- 待办参数: 查询创建人为我的所有的独立计划或子计划(doneExcludeIds: 通过率达到阈值需排除) -->
|
||||
and t.type = 'TEST_PLAN'
|
||||
and t.create_user = #{request.myTodoUserId}
|
||||
<if test="request.doneExcludeIds != null and request.doneExcludeIds.size() > 0">
|
||||
|
|
Loading…
Reference in New Issue