From 18f09585d5e1fa83e4167654ca02b3a6565b4b4c Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 21 Oct 2024 17:31:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E7=AE=A1=E7=90=86=E4=B8=AD?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E6=A0=87=E7=AD=BE=E6=8A=A5=E9=94=99=E9=99=90?= =?UTF-8?q?=E5=88=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047706 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047706 --- .../api/service/definition/ApiDefinitionMockService.java | 4 ---- .../api/service/definition/ApiTestCaseService.java | 3 --- .../metersphere/api/service/scenario/ApiScenarioService.java | 3 --- 3 files changed, 10 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionMockService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionMockService.java index a2d4bc6e86..06dd905501 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionMockService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionMockService.java @@ -426,11 +426,7 @@ public class ApiDefinitionMockService { private void batchUpdateTags(ApiDefinitionMockExample example, ApiDefinitionMock updateMock, ApiMockBatchEditRequest request, List ids, ApiDefinitionMockMapper mapper) { - if (CollectionUtils.isEmpty(request.getTags())) { - throw new MSException(Translator.get("tags_is_null")); - } if (request.isAppend()) { - List tagsByIds = extApiDefinitionMockMapper.getTagsByIds(ids); Map mockMap = extApiDefinitionMockMapper.getTagsByIds(ids) .stream() .collect(Collectors.toMap(ApiDefinitionMock::getId, Function.identity())); diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseService.java index b98a9a6585..d95f0d913f 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseService.java @@ -518,9 +518,6 @@ public class ApiTestCaseService extends MoveNodeService { private void batchUpdateTags(ApiTestCaseExample example, ApiTestCase updateCase, ApiCaseBatchEditRequest request, List ids, ApiTestCaseMapper mapper) { - if (CollectionUtils.isEmpty(request.getTags())) { - throw new MSException(Translator.get("tags_is_null")); - } if (request.isAppend()) { Map caseMap = extApiTestCaseMapper.getTagsByIds(ids, false) .stream() diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java index d453d84fe8..d00e646503 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java @@ -312,9 +312,6 @@ public class ApiScenarioService extends MoveNodeService { private void batchUpdateTags(ApiScenarioExample example, ApiScenario updateScenario, ApiScenarioBatchEditRequest request, List ids, ApiScenarioMapper mapper) { - if (CollectionUtils.isEmpty(request.getTags())) { - throw new MSException(Translator.get("tags_is_null")); - } if (request.isAppend()) { Map scenarioMap = extApiScenarioMapper.getTagsByIds(ids, false) .stream()