From a5065b7cb4db7cea35a98957911cdeb4cd547b1c Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Fri, 7 Jun 2024 10:01:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=85=B3=E8=81=94api&=E5=85=B3=E8=81=94apiCa?= =?UTF-8?q?se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/constants/AssociateCaseType.java | 6 +- .../BaseCollectionAssociateRequest.java | 10 +-- .../plan/mapper/ExtTestPlanApiCaseMapper.xml | 2 +- .../plan/service/TestPlanApiCaseService.java | 77 +++++++++++++++++-- .../service/TestPlanApiScenarioService.java | 11 +-- .../plan/service/TestPlanBugService.java | 2 +- .../TestPlanFunctionalCaseService.java | 11 +-- .../plan/service/TestPlanResourceService.java | 5 +- .../TestPlanApiCaseControllerTests.java | 33 ++++++++ 9 files changed, 125 insertions(+), 32 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/constants/AssociateCaseType.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/constants/AssociateCaseType.java index 7e8a185eb4..7f2b3f6c19 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/constants/AssociateCaseType.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/constants/AssociateCaseType.java @@ -2,9 +2,13 @@ package io.metersphere.plan.constants; public class AssociateCaseType { /** - * 接口用例 + * 接口 */ public static final String API = "API"; + /** + * 接口用例 + */ + public static final String API_CASE = "API_CASE"; /** * 场景用例 */ diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/BaseCollectionAssociateRequest.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/BaseCollectionAssociateRequest.java index 50e5ee7fa9..c3175fddc1 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/BaseCollectionAssociateRequest.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/request/BaseCollectionAssociateRequest.java @@ -8,12 +8,10 @@ import java.util.List; @Data public class BaseCollectionAssociateRequest { - @Schema(description = "测试集ID") - private String collectionId; + @Schema(description = "测试集ID") + private String collectionId; - @Schema(description = "关联的用例ID集合") - private List ids; + @Schema(description = "关联的用例ID集合") + private List ids; - @Schema(description = "测试集类型") - private String type; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml index 9ecd35d1eb..9f1cd3d948 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml @@ -21,7 +21,7 @@