fix(接口测试):解决接口导入覆盖版本不置新要区分url是否重复问题
--bug=1025126 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001025126
This commit is contained in:
parent
ef9c6f56de
commit
9f36aca65d
|
@ -241,8 +241,13 @@ public class ApiDefinitionImportUtilService {
|
|||
//这里把数据库里与该接口相同的所有接口筛选出来包括不同的版本
|
||||
//如果 sameRefIds 与 toUpdates 相同,就用 toUpdates 代替 sameRefIds,因为toUpdates 可能会修改模块路径
|
||||
if (CollectionUtils.isNotEmpty(repeatList)) {
|
||||
sameRefIds = repeatList.stream().filter(t -> t.getRefId().equals(item.getRefId()) && t.getModuleId().equals(item.getModuleId())).collect(Collectors.toList());
|
||||
if (urlRepeat) {
|
||||
sameRefIds = repeatList.stream().filter(t -> t.getRefId().equals(item.getRefId()) && t.getModuleId().equals(item.getModuleId())).collect(Collectors.toList());
|
||||
} else {
|
||||
sameRefIds = repeatList.stream().filter(t -> t.getRefId().equals(item.getRefId())).collect(Collectors.toList());
|
||||
}
|
||||
List<String> repeatIds = sameRefIds.stream().map(ApiDefinition::getId).toList();
|
||||
|
||||
List<ApiDefinitionWithBLOBs> toUpdates = toUpdateList.stream().filter(t -> t.getRefId().equals(item.getRefId())).collect(Collectors.toList());
|
||||
List<String> toUpDateIds = toUpdates.stream().map(ApiDefinition::getId).toList();
|
||||
List<String> reduce1 = repeatIds.stream().filter(t -> !toUpDateIds.contains(t)).collect(Collectors.toList());
|
||||
|
|
Loading…
Reference in New Issue