From acd767b47a4f78e905a3cbe89a4c82ffe88d73d9 Mon Sep 17 00:00:00 2001 From: hotcoffie <35990065+hotcoffie@users.noreply.github.com> Date: 星期四, 21 四月 2022 10:04:50 +0800 Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java index de98fdc..affce9d 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java @@ -25,7 +25,7 @@ private final Map<String, Object> parentIdMap = Maps.newHashMap(); public ForestNodeManager(List<T> nodes) { - nodeMap = Maps.uniqueIndex(nodes, INode::getId); + nodeMap = Maps.uniqueIndex(nodes, INode::getChannelId); } /** @@ -58,7 +58,7 @@ public List<T> getRoot() { List<T> roots = new ArrayList<>(); nodeMap.forEach((key, node) -> { - if (node.getParentId() == null || parentIdMap.containsKey(node.getId())) { + if (node.getParentId() == null || parentIdMap.containsKey(node.getChannelId())) { roots.add(node); } }); -- Gitblit v1.8.0