diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java index 1b2bbec044..8dc52fdf8c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java @@ -76,9 +76,9 @@ public class DeptServiceImpl implements DeptService { // 第二步:构建缓存 ImmutableMap.Builder builder = ImmutableMap.builder(); ImmutableMultimap.Builder parentBuilder = ImmutableMultimap.builder(); - depts.forEach(sysRoleDO -> { - builder.put(sysRoleDO.getId(), sysRoleDO); - parentBuilder.put(sysRoleDO.getParentId(), sysRoleDO); + depts.forEach(deptDO -> { + builder.put(deptDO.getId(), deptDO); + parentBuilder.put(deptDO.getParentId(), deptDO); }); deptCache = builder.build(); parentDeptCache = parentBuilder.build();