//从系统菜单 加载所有子菜单
public List<MenuQo> selectMenuListbutton( MenuQo menuQo) {
menuQo.setId(0L);
List<MenuQo> menuQoList = baseMapper.selectMenuButtonList(menuQo);
//排序
Collections.sort(menuQoList);
for (MenuQo menuQo1 : menuQoList){
getNodeTreeButton(menuQo1);
}
return menuQoList;
}
public void getNodeTreeButton(MenuQo menuQo){
//查询
List<MenuQo> childList = baseMapper.selectMenuButtonList(menuQo);
//排序
Collections.sort(childList);
//循环
for(MenuQo menuQo1 : childList){
menuQo.getChildList().add(menuQo1);
getNodeTreeButton(menuQo1);
}
}