diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysUserServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysUserServiceImpl.java index 5bbacedff..f53652adf 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysUserServiceImpl.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysUserServiceImpl.java @@ -237,9 +237,7 @@ public class SysUserServiceImpl extends ServiceImpl impl deptRelation.setAncestor(deptId); List deptRelationList = sysDeptRelationService.selectList(new EntityWrapper<>(deptRelation)); List deptIds = new ArrayList<>(); - for (SysDeptRelation sysDeptRelation : deptRelationList) { - deptIds.add(sysDeptRelation.getDescendant()); - } + deptRelationList.forEach(sysDeptRelation -> deptIds.add(sysDeptRelation.getDescendant())); return deptIds; }