type=null 判断
This commit is contained in:
@@ -724,7 +724,7 @@ public class ComSchTreeService implements IComSchTreeService {
|
||||
|
||||
for (BoaGroup node : treeList) {
|
||||
// 如果当前节点type等于stopType,保留该节点但清空子节点
|
||||
if (node.getType() == stopType) {
|
||||
if (Objects.equals(node.getType(), stopType)) {
|
||||
// 保留该节点,但移除所有子节点(停止递归)
|
||||
node.setChildren(null); // 或者 node.setChildren(new ArrayList<>());
|
||||
result.add(node);
|
||||
|
||||
Reference in New Issue
Block a user