From 56f78b42c83c8a7507a258de588bfcc9d6425cff Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Wed, 4 Dec 2024 13:52:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=82=B9=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...estPlanReportDetailCollectionResponse.java | 6 ++ .../ExtTestPlanReportApiCaseMapper.java | 2 +- .../mapper/ExtTestPlanReportApiCaseMapper.xml | 8 ++ .../ExtTestPlanReportApiScenarioMapper.java | 2 +- .../ExtTestPlanReportApiScenarioMapper.xml | 8 ++ ...ExtTestPlanReportFunctionalCaseMapper.java | 2 +- .../ExtTestPlanReportFunctionalCaseMapper.xml | 8 ++ .../plan/service/TestPlanReportService.java | 83 ++++++++++++++----- 8 files changed, 97 insertions(+), 22 deletions(-) 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 + +