zhangherong
2025-04-02 5ba069a84b332b22e628393f54e45bead79d7c15
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/utils/TreeBuilder.java
@@ -91,11 +91,11 @@
            });
        }
        // 6. 循环检测
        if (sorted.size() != nodes.size()) {
            handleSortingFailure(nodes, sorted, nodeMap);
            return Collections.emptyList();
        }
//        // 6. 循环检测
//        if (sorted.size() != nodes.size()) {
//            handleSortingFailure(nodes, sorted, nodeMap);
//            return Collections.emptyList();
//        }
        return sorted;
    }
@@ -110,7 +110,8 @@
                    node.getParentId(),
                    node.getName(),
                    node.getCode(),
                    node.getType()
                    node.getType(),
                    node.getCreateTime()
            );
            treeMap.put(newNode.getId(), newNode);
        });