From 70831ef161d46b173c1f259b5e5d5cd399debc32 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 19 Dec 2022 18:02:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=85=A5=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4,=E5=85=B3=E9=97=AD=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=8C=E8=A6=86=E7=9B=96=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=87=8D=E5=A4=8D=E6=95=B0=E6=8D=AE=E8=A6=81?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E8=87=AA=E5=B7=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020875--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001020875 --- .../service/definition/ApiDefinitionImportUtilService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java index 46ef0ced30..f9aac4a518 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiDefinitionImportUtilService.java @@ -663,7 +663,7 @@ public class ApiDefinitionImportUtilService { } if (apiDefinition.getLatest()) { for (ApiDefinitionWithBLOBs apiDefinitionWithBLOBs : repeatList) { - if (apiDefinitionWithBLOBs.getLatest()) { + if (apiDefinitionWithBLOBs.getLatest() && !apiDefinition.getId().equalsIgnoreCase(apiDefinitionWithBLOBs.getId())) { apiDefinitionWithBLOBs.setLatest(false); } batchMapper.updateByPrimaryKey(apiDefinitionWithBLOBs);