部门判空
This commit is contained in:
1 parent
621e078031
commit
3c06ff7643
1 file changed
+3
+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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user