部门判空

This commit is contained in:
zjf committed 2026-06-06 08:01:08 +08:00
1 parent 621e078031
commit 3c06ff7643
1 file changed
+3
@@ -550,6 +550,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
@Override
public Map<Long, SysDept> getDeptListByDeptIds(List<Long> deptIds) {
if (CollUtil.isEmpty(deptIds)) {
return Collections.emptyMap();
}
List<SysDept> sysDepts = baseMapper.selectList(Wrappers.<SysDept>lambdaQuery().in(SysDept::getDeptId, deptIds));
return sysDepts.stream().collect(Collectors.toMap(SysDept::getDeptId, sysDept -> sysDept));
}