diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailCollectionResponse.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailCollectionResponse.java index cc788a3dba..cd16b7d00d 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailCollectionResponse.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailCollectionResponse.java @@ -1,8 +1,11 @@ package io.metersphere.plan.dto.response; +import io.metersphere.plan.dto.ReportDetailCasePageDTO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + @Data public class TestPlanReportDetailCollectionResponse { @@ -16,4 +19,7 @@ public class TestPlanReportDetailCollectionResponse { private String planName; @Schema(description = "位置") private Long pos; + + @Schema(description = "用例数据") + List reportDetailCaseList; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java index 4e060e16d0..ad240e78d6 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java @@ -40,7 +40,7 @@ public interface ExtTestPlanReportApiCaseMapper { * @param request 请求参数 * @return 关联的用例集合 */ - List list(@Param("request") TestPlanReportDetailPageRequest request); + List list(@Param("request") TestPlanReportDetailPageRequest request, @Param("sort") String sort); /** * 分页查询报告关联的测试集(接口) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml index 06b15dec8b..081b1f4bfc 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml @@ -54,6 +54,14 @@ and tprac.test_plan_collection_id = #{request.collectionId} + + + order by ${sort} + + + order by tprac.pos desc + +