From 63d7aadf070e3472a4296ec5dc898e9746238290 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 23 Nov 2021 11:00:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=85=A5MS?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=A0=87=E7=AD=BE=E6=9C=AA=E8=A2=AB=E8=A6=86?= =?UTF-8?q?=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/service/ApiDefinitionService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ac04400a5a..3e9b296d62 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -692,7 +692,9 @@ public class ApiDefinitionService { apiDefinition.setOriginalState(sameRequest.get(0).getOriginalState()); apiDefinition.setCaseStatus(sameRequest.get(0).getCaseStatus()); apiDefinition.setNum(sameRequest.get(0).getNum()); //id 不变 - apiDefinition.setTags(sameRequest.get(0).getTags()); //tag 不变 + if (!StringUtils.equalsIgnoreCase(apiTestImportRequest.getPlatform(), ApiImportPlatform.Metersphere.name())) { + apiDefinition.setTags(sameRequest.get(0).getTags()); // 其他格式 tag 不变,MS 格式替换 + } if (StringUtils.equalsIgnoreCase(apiDefinition.getProtocol(), RequestType.HTTP)) { //如果存在则修改 apiDefinition.setId(sameRequest.get(0).getId());