|
@@ -68,9 +68,11 @@ public class DragTableBtnServiceImpl implements IDragTableBtnService
|
|
|
}
|
|
|
List<DragTableBtn> childNodes = dragTableBtnMapper.selectChildNodeById(ids);
|
|
|
//递归处理树结构
|
|
|
- return rootNodes.stream().peek(
|
|
|
- root -> root.setChildren(getChildrenList(root, childNodes))
|
|
|
- ).collect(Collectors.toList());
|
|
|
+ for (DragTableBtn root : rootNodes) {
|
|
|
+ List<DragTableBtn> children = getChildrenList(root, childNodes);
|
|
|
+ root.setChildren(children);
|
|
|
+ }
|
|
|
+ return rootNodes;
|
|
|
}
|
|
|
|
|
|
private List<DragTableBtn> getChildrenList(DragTableBtn root, List<DragTableBtn> childNodes) {
|