✨ 添加新特性。lambda 表达式 重构

This commit is contained in:
冷冷 committed 2018-08-30 15:16:11 +08:00
1 parent fe9283ddc2
commit 6fcd3fde87
1 file changed
+1 -3
@@ -237,9 +237,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
deptRelation.setAncestor(deptId);
List<SysDeptRelation> deptRelationList = sysDeptRelationService.selectList(new EntityWrapper<>(deptRelation));
List<Integer> deptIds = new ArrayList<>();
for (SysDeptRelation sysDeptRelation : deptRelationList) {
deptIds.add(sysDeptRelation.getDescendant());
}
deptRelationList.forEach(sysDeptRelation -> deptIds.add(sysDeptRelation.getDescendant()));
return deptIds;
}