Merge branch 'feature/REQ-1507' of axzsource.com:universal/infrastructure/backend/msg-center-plat into dev

This commit is contained in:
luofu 2023-11-09 14:48:55 +08:00
commit cf8e9a5cfc

View File

@ -97,9 +97,8 @@ public class MessageGroupTreeNodeCacheServiceImpl implements MessageGroupTreeNod
LinkedList<GroupTreeNodeDTO> queue = new LinkedList<>(root.getNodeChildren()); LinkedList<GroupTreeNodeDTO> queue = new LinkedList<>(root.getNodeChildren());
while (!queue.isEmpty()) { while (!queue.isEmpty()) {
GroupTreeNodeDTO node = queue.pop(); GroupTreeNodeDTO node = queue.pop();
Optional<GroupTreeNodeDTO> childOp = node.getChild(treeNodeCode); if (Objects.equals(node.getNodeCode(), treeNodeCode)) {
if (childOp.isPresent()) { return node;
return childOp.get();
} }
queue.addAll(node.getNodeChildren()); queue.addAll(node.getNodeChildren());
} }