From 6fcd3fde872dbc93190d62efda1292584180a45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Thu, 30 Aug 2018 15:16:11 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=89=B9=E6=80=A7=E3=80=82lambda=20=E8=A1=A8=E8=BE=BE=E5=BC=8F?= =?UTF-8?q?=20=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pigx/admin/service/impl/SysUserServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }