From cc13993abc18e6f5a5546f692adf78ae6641b118 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 30 Mar 2021 18:41:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A8=A1=E5=9D=97=E6=A0=A1=E9=AA=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/service/ApiAutomationService.java | 2 +- .../io/metersphere/api/service/ApiDefinitionService.java | 6 +++--- .../java/io/metersphere/track/service/TestCaseService.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 9f969416cb..33626513da 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -241,7 +241,7 @@ public class ApiAutomationService { } else { scenario.setUserId(request.getUserId()); } - if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath()) || "default-module".equals(request.getApiScenarioModuleId())) { + if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || "default-module".equals(request.getApiScenarioModuleId())) { ApiScenarioModuleExample example = new ApiScenarioModuleExample(); example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块"); List modules = apiScenarioModuleMapper.selectByExample(example); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 435846891b..0e70693f40 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -264,7 +264,7 @@ public class ApiDefinitionService { test.setEnvironmentId(request.getEnvironmentId()); test.setUserId(request.getUserId()); test.setTags(request.getTags()); - if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { + if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); @@ -297,7 +297,7 @@ public class ApiDefinitionService { test.setStatus(APITestStatus.Underway.name()); test.setModulePath(request.getModulePath()); test.setModuleId(request.getModuleId()); - if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { + if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); @@ -616,7 +616,7 @@ public class ApiDefinitionService { } for (int i = 0; i < data.size(); i++) { ApiDefinitionWithBLOBs item = data.get(i); - if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath()) || "default-module".equals(item.getModuleId())) { + if (StringUtils.isEmpty(item.getModuleId()) || "default-module".equals(item.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index d4f7a9cf12..636c425aaf 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -93,7 +93,7 @@ public class TestCaseService { TestCaseTestMapper testCaseTestMapper; private void setNode(TestCaseWithBLOBs testCase){ - if (StringUtils.isEmpty(testCase.getNodeId()) || StringUtils.isEmpty(testCase.getNodePath()) || "default-module".equals(testCase.getNodeId())) { + if (StringUtils.isEmpty(testCase.getNodeId()) || "default-module".equals(testCase.getNodeId())) { TestCaseNodeExample example = new TestCaseNodeExample(); example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块"); List nodes = testCaseNodeMapper.selectByExample(example);