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