mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-09-03 06:35:25 +08:00
fix(crud): 修复createRootNodePredicate逻辑错误
This commit is contained in:
@@ -270,14 +270,11 @@ public interface ReactiveTreeSortEntityService<E extends TreeSortSupportEntity<K
|
||||
|
||||
default Predicate<E> createRootNodePredicate(TreeSupportEntity.TreeHelper<E, K> helper) {
|
||||
return node -> {
|
||||
if (isRootNode(node)) {
|
||||
return true;
|
||||
}
|
||||
//有父节点,但是父节点不存在
|
||||
if (!ObjectUtils.isEmpty(node.getParentId())) {
|
||||
return helper.getNode(node.getParentId()) == null;
|
||||
}
|
||||
return false;
|
||||
return isRootNode(node);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user