From 0d06dbdb0678e65f0f991e7d18dd6b08a1b1f75b Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 13 Jun 2024 14:46:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=B1=9E=E6=80=A7=E4=BB=A5=E5=8F=8A=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E7=99=BB=E9=99=86=E9=85=8D=E7=BD=AE=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=9F=9F=E5=90=8D=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/src/main/resources/i18n/plan_en_US.properties | 2 +- .../plan/dto/TestPlanCollectionMinderEditDTO.java | 2 +- .../plan/service/TestPlanCollectionMinderService.java | 8 ++++---- .../TestPlanCollectionMinderControllerTests.java | 4 ++-- frontend/src/views/login/components/tabQrCode.vue | 10 ++++++++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/backend/framework/sdk/src/main/resources/i18n/plan_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/plan_en_US.properties index ed357002fd..1a1174bc77 100644 --- a/backend/framework/sdk/src/main/resources/i18n/plan_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/plan_en_US.properties @@ -126,6 +126,6 @@ test_plan.mind.test_plan=Test plan test_plan.mind.serial=Serial test_plan.mind.parallel=Parallel test_plan.mind.strip=Strip -test_plan.mind.case_count=Count +test_plan.mind.case_count=Case count test_plan.mind.environment=Environment test_plan.mind.test_resource_pool=Resource pool \ No newline at end of file diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionMinderEditDTO.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionMinderEditDTO.java index f3d14a4a82..32017194a5 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionMinderEditDTO.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionMinderEditDTO.java @@ -35,7 +35,7 @@ public class TestPlanCollectionMinderEditDTO implements Serializable { @Schema(description = "测试集类型(功能:FUNCTIONAL/接口用例:API/场景:SCENARIO)", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{test_plan_collection_minder_edit.collection_type.not_blank}") - private String collectionType; + private String type; @Schema(description = "是否继承", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{test_plan_collection.extended.not_blank}") diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanCollectionMinderService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanCollectionMinderService.java index dd336b0888..c36bad9951 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanCollectionMinderService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanCollectionMinderService.java @@ -302,8 +302,8 @@ public class TestPlanCollectionMinderService { BeanUtils.copyBean(testPlanCollection, testPlanCollectionMinderEditDTO); testPlanCollection.setId(testPlanCollectionMinderEditDTO.getId()); testPlanCollection.setTestPlanId(request.getPlanId()); - testPlanCollection.setType(testPlanCollectionMinderEditDTO.getCollectionType()); - TestPlanCollection parent = parentMap.get(testPlanCollectionMinderEditDTO.getCollectionType()).get(0); + testPlanCollection.setType(testPlanCollectionMinderEditDTO.getType()); + TestPlanCollection parent = parentMap.get(testPlanCollectionMinderEditDTO.getType()).get(0); if (StringUtils.equalsIgnoreCase(parent.getId(), testPlanCollectionMinderEditDTO.getId())) { testPlanCollection.setParentId(parent.getParentId()); } else { @@ -322,8 +322,8 @@ public class TestPlanCollectionMinderService { BeanUtils.copyBean(testPlanCollection, testPlanCollectionMinderEditDTO); testPlanCollection.setId(IDGenerator.nextStr()); testPlanCollection.setTestPlanId(request.getPlanId()); - testPlanCollection.setType(testPlanCollectionMinderEditDTO.getCollectionType()); - TestPlanCollection parent = parentMap.get(testPlanCollectionMinderEditDTO.getCollectionType()).get(0); + testPlanCollection.setType(testPlanCollectionMinderEditDTO.getType()); + TestPlanCollection parent = parentMap.get(testPlanCollectionMinderEditDTO.getType()).get(0); testPlanCollection.setParentId(parent.getId()); testPlanCollection.setCreateUser(userId); testPlanCollection.setCreateTime(System.currentTimeMillis()); diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanCollectionMinderControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanCollectionMinderControllerTests.java index 54a6164ff1..1a94c6f37c 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanCollectionMinderControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanCollectionMinderControllerTests.java @@ -63,7 +63,7 @@ public class TestPlanCollectionMinderControllerTests extends BaseTest { testPlanCollectionMinderEditDTO.setName("更新名称"); testPlanCollectionMinderEditDTO.setNum(500L); testPlanCollectionMinderEditDTO.setExecuteMethod("PARALLEL"); - testPlanCollectionMinderEditDTO.setCollectionType("API"); + testPlanCollectionMinderEditDTO.setType("API"); testPlanCollectionMinderEditDTO.setExtended(false); testPlanCollectionMinderEditDTO.setGrouped(false); testPlanCollectionMinderEditDTO.setEnvironmentId("gyq_123"); @@ -91,7 +91,7 @@ public class TestPlanCollectionMinderControllerTests extends BaseTest { testPlanCollectionMinderEditDTO.setName("新建名称"); testPlanCollectionMinderEditDTO.setNum(500L); testPlanCollectionMinderEditDTO.setExecuteMethod("PARALLEL"); - testPlanCollectionMinderEditDTO.setCollectionType("API"); + testPlanCollectionMinderEditDTO.setType("API"); testPlanCollectionMinderEditDTO.setExtended(false); testPlanCollectionMinderEditDTO.setGrouped(false); testPlanCollectionMinderEditDTO.setEnvironmentId("gyq_123"); diff --git a/frontend/src/views/login/components/tabQrCode.vue b/frontend/src/views/login/components/tabQrCode.vue index c4e5c92c39..903eb385a2 100644 --- a/frontend/src/views/login/components/tabQrCode.vue +++ b/frontend/src/views/login/components/tabQrCode.vue @@ -1,6 +1,12 @@