feat(接口测试): 报告明细列表测试点顺序不一致问题
--bug=1046956 --user=宋昌昌 【测试计划】报告-报告详情-用例/接口/场景明细-开启测试点-顺序显示与测试规划内不一致 https://www.tapd.cn/55049933/s/1596639
This commit is contained in:
parent
5a88c4efd7
commit
18fe38f877
|
@ -14,4 +14,6 @@ public class TestPlanReportDetailCollectionResponse {
|
|||
private Long count;
|
||||
@Schema(description = "计划名称")
|
||||
private String planName;
|
||||
@Schema(description = "位置")
|
||||
private Long pos;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</select>
|
||||
|
||||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tprac.id) as count
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, tpc.pos as pos, count(tprac.id) as count
|
||||
from test_plan_report_api_case tprac
|
||||
right join test_plan_collection tpc on tprac.test_plan_collection_id = tpc.id and tpc.type = 'API'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</select>
|
||||
|
||||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tpras.id) as count
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, tpc.pos as pos, count(tpras.id) as count
|
||||
from test_plan_report_api_scenario tpras
|
||||
right join test_plan_collection tpc on tpras.test_plan_collection_id = tpc.id and tpc.type = 'SCENARIO'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</select>
|
||||
|
||||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tprfc.id) as count
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, tpc.pos as pos, count(tprfc.id) as count
|
||||
from test_plan_report_function_case tprfc
|
||||
right join test_plan_collection tpc on tprfc.test_plan_collection_id = tpc.id and tpc.type = 'FUNCTIONAL'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
|
|
|
@ -1290,6 +1290,7 @@ public class TestPlanReportService {
|
|||
case CollectionQueryType.SCENARIO -> collections = extTestPlanReportApiScenarioMapper.listCollection(request);
|
||||
default -> collections = new ArrayList<>();
|
||||
}
|
||||
collections.sort(Comparator.comparing(TestPlanReportDetailCollectionResponse::getPos));
|
||||
return collections;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue