fix(接口测试): 修复接口测试导入报错的缺陷
This commit is contained in:
parent
b26c85d198
commit
53802e892b
|
@ -671,19 +671,16 @@ public class ApiDefinitionImportUtilService {
|
|||
lastSize = traverseList.size();
|
||||
List<BaseTreeNode> notMatchedList = new ArrayList<>();
|
||||
for (BaseTreeNode treeNode : traverseList) {
|
||||
if (StringUtils.equalsIgnoreCase(treeNode.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
if (!baseTreeNodeMap.containsKey(treeNode.getParentId()) && !StringUtils.equalsIgnoreCase(treeNode.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
notMatchedList.add(treeNode);
|
||||
continue;
|
||||
}
|
||||
BaseTreeNode node = new BaseTreeNode(treeNode.getId(), treeNode.getName(), treeNode.getType(), treeNode.getParentId());
|
||||
node.setPath(StringUtils.join("/", node.getName()));
|
||||
baseTreeNodeList.add(node);
|
||||
node.genModulePath(baseTreeNodeMap.get(treeNode.getParentId()));
|
||||
baseTreeNodeMap.put(treeNode.getId(), node);
|
||||
} else {
|
||||
if (baseTreeNodeMap.containsKey(treeNode.getParentId())) {
|
||||
BaseTreeNode node = new BaseTreeNode(treeNode.getId(), treeNode.getName(), treeNode.getType(), treeNode.getParentId());
|
||||
node.setPath(StringUtils.join(baseTreeNodeMap.get(treeNode.getParentId()).getPath(), "/", node.getName()));
|
||||
|
||||
baseTreeNodeList.add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
traverseList = notMatchedList;
|
||||
}
|
||||
return baseTreeNodeList;
|
||||
|
|
Loading…
Reference in New Issue