From 2f2218a2a944ce6c9012116f7ac0f56c939dc693 Mon Sep 17 00:00:00 2001 From: stylefeng Date: Sat, 7 Sep 2024 20:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.3.0=E3=80=91=E3=80=90rule=E3=80=91?= =?UTF-8?q?=E5=AE=8C=E5=96=84default=E6=A0=91=E6=8E=92=E5=BA=8F=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kernel/rule/tree/factory/DefaultTreeBuildFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/tree/factory/DefaultTreeBuildFactory.java b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/tree/factory/DefaultTreeBuildFactory.java index 070caa3da..71f15ec65 100644 --- a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/tree/factory/DefaultTreeBuildFactory.java +++ b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/tree/factory/DefaultTreeBuildFactory.java @@ -38,7 +38,7 @@ import java.util.List; * @since 2018/7/25 下午5:59 */ @Data -public class DefaultTreeBuildFactory implements AbstractTreeBuildFactory { +public class DefaultTreeBuildFactory> implements AbstractTreeBuildFactory { /** * 顶级节点的父节点id(默认-1) @@ -79,14 +79,14 @@ public class DefaultTreeBuildFactory implements Abst * @param node 被查询节点的id * @param childNodeLists 被查询节点的子节点集合 */ - private void buildChildNodes(List totalNodes, T node, List childNodeLists) { + protected void buildChildNodes(List totalNodes, T node, List childNodeLists) { if (totalNodes == null || node == null) { return; } List nodeSubLists = getSubChildsLevelOne(totalNodes, node); - if (nodeSubLists.size() == 0) { + if (nodeSubLists.isEmpty()) { } else { for (T nodeSubList : nodeSubLists) { @@ -105,7 +105,7 @@ public class DefaultTreeBuildFactory implements Abst * @param node 被查询节点的model * @author fengshuonan */ - private List getSubChildsLevelOne(List list, T node) { + protected List getSubChildsLevelOne(List list, T node) { List nodeList = new ArrayList<>(); for (T nodeItem : list) { if (nodeItem.getNodeParentId().equals(node.getNodeId())) {