|
|
@@ -37,6 +37,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept>
|
|
|
LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
|
lqw.eq(SysDept::getDelFlag, 0);
|
|
|
lqw.likeRight(SysDept::getId, deptId);
|
|
|
+ lqw.orderByDesc(SysDept::getOrderNum);
|
|
|
List<SysDept> sysDeptList = list(lqw);
|
|
|
Map<String, List<SysDept>> map = sysDeptList.stream().collect(Collectors.groupingBy(SysDept::getParentId));
|
|
|
sysDeptList.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
|