From 1083dd32f55b05930529b4401276dff064efc84b Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 22 Dec 2022 11:54:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=A4=8D=E5=AF=BC=E5=85=A5=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A8=A1=E5=9D=97=E4=BA=A7=E7=94=9F=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021143--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021143 --- .../definition/ApiDefinitionImportUtilService.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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 db1f66375a..d09f7b46ec 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 @@ -24,7 +24,6 @@ import io.metersphere.service.BaseProjectApplicationService; import io.metersphere.service.MockConfigService; import io.metersphere.service.ServiceUtils; import io.metersphere.service.ext.ExtApiScheduleService; -import io.metersphere.xpack.api.service.ApiDefinitionSyncService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -322,16 +321,11 @@ public class ApiDefinitionImportUtilService { if (fullCoverage) { removeHttpChooseModuleRepeat(optionData, chooseModulePath); // optionData = singleOptionData; - optionMap = optionData.stream().collect(Collectors.toMap(t -> t.getName().concat(t.getMethod()).concat(t.getPath()).concat(chooseModulePath), api -> api)); - } else { - getChooseModuleUrlRepeatOptionMap(optionData, optionMap, chooseModulePath); + // optionMap = optionData.stream().collect(Collectors.toMap(t -> t.getName().concat(t.getMethod()).concat(t.getPath()).concat(chooseModulePath), api -> api)); } - repeatDataMap = repeatApiDefinitionWithBLOBs.stream().filter(t -> t.getModuleId().equals(chooseModule.getId())).collect(Collectors.groupingBy(t -> t.getName().concat(t.getMethod()).concat(t.getPath()).concat(t.getModulePath()))); - } else { - //否则在整个系统中过滤 - getUrlRepeatOptionMap(optionData, optionMap); - repeatDataMap = repeatApiDefinitionWithBLOBs.stream().collect(Collectors.groupingBy(t -> t.getName().concat(t.getMethod()).concat(t.getPath()).concat(t.getModulePath()))); } + getUrlRepeatOptionMap(optionData, optionMap); + repeatDataMap = repeatApiDefinitionWithBLOBs.stream().collect(Collectors.groupingBy(t -> t.getName().concat(t.getMethod()).concat(t.getPath()).concat(t.getModulePath()))); Map> oldCaseMap = new HashMap<>(); //重复接口的case if (CollectionUtils.isNotEmpty(repeatApiDefinitionWithBLOBs)) {