Procházet zdrojové kódy

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

冷冷 před 7 roky
rodič
revize
6fcd3fde87

+ 1 - 3
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<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;
 	}