fix(接口测试): 修复接口导入报错问题

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-07-15 12:53:34 +08:00 committed by xiaomeinvG
parent 0813e6f659
commit 598703aa32
1 changed files with 8 additions and 6 deletions

View File

@ -1365,6 +1365,7 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
int finalI = i;
//在选择的模块下建模块查看选择的模块下有没有同名的模块
List<ApiModule> moduleList = pidChildrenMap.get(parentModule.getId());
if (moduleList != null && !moduleList.isEmpty()) {
List<ApiModule> collect1 = moduleList.stream().filter(t -> t.getName().equals(tagTree[finalI])).collect(Collectors.toList());
if (collect1.isEmpty()) {
return createModule(tagTree, i, parentModule, moduleMap, pidChildrenMap, idPathMap);
@ -1373,6 +1374,7 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
parentModule = collect1.get(0);
}
}
}
return returnModule;
}