From a498986752dbcac6fddc82330b268bb8497de73d Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Sun, 29 Sep 2024 18:52:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95=E9=9B=86=E8=84=91?= =?UTF-8?q?=E5=9B=BE=E5=85=B3=E8=81=94=E7=94=A8=E4=BE=8B=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/request/TestPlanCaseMinderRequest.java | 3 +++ .../ExtTestPlanFunctionalCaseMapper.java | 2 +- .../mapper/ExtTestPlanFunctionalCaseMapper.xml | 18 +++++++++++++----- .../TestPlanFunctionalCaseMinderService.java | 6 +++--- .../TestPlanCaseControllerTests.java | 1 + 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanCaseMinderRequest.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanCaseMinderRequest.java index e93e86e040..0c82c007dd 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanCaseMinderRequest.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/TestPlanCaseMinderRequest.java @@ -19,4 +19,7 @@ public class TestPlanCaseMinderRequest extends BasePlanCaseBatchRequest { @Schema(description = "脑图选中的项目id集合") private List minderProjectIds; + + @Schema(description = "脑图选中的测试集id集合") + private List minderCollectionIds; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.java index 191a780b2d..a2690de29f 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.java @@ -77,7 +77,7 @@ public interface ExtTestPlanFunctionalCaseMapper { List selectDistinctExecResultByTestPlanIds(@Param("testPlanIds") List testPlanIds); - Collection selectIdsByProjectIds(@Param("request") TestPlanCaseMinderRequest request); + Collection selectIdsByProjectIdsOrCollectionIds(@Param("request") TestPlanCaseMinderRequest request); List selectProjectByModuleIds(@Param("moduleIds") List moduleIds); diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml index 2d03309a08..a7e262d2c0 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml @@ -672,7 +672,7 @@ - SELECT test_plan_functional_case.id FROM @@ -682,10 +682,18 @@ test_plan_functional_case.test_plan_id = #{request.testPlanId} AND functional_case.deleted = false - and functional_case.project_id in - - #{projectId} - + + and functional_case.project_id in + + #{projectId} + + + + and test_plan_functional_case.test_plan_collection_id IN + + #{collectionId} + +