Commit 4545a249 authored by 钱坤's avatar 钱坤

修复example空列表问题

parent 969bbbb2
...@@ -362,12 +362,18 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan ...@@ -362,12 +362,18 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
} }
private List<PersonnelInfo> getPersonnelInfos(List<String> ids) { private List<PersonnelInfo> getPersonnelInfos(List<String> ids) {
if (CollectionUtils.isEmpty(ids)) {
return new ArrayList<>();
}
PersonnelInfoExample example1 = new PersonnelInfoExample(); PersonnelInfoExample example1 = new PersonnelInfoExample();
example1.createCriteria().andIdIn(ids); example1.createCriteria().andIdIn(ids);
return this.personnelInfoMapper.selectByExample(example1); return this.personnelInfoMapper.selectByExample(example1);
} }
private Map<String, PersonnelInfo> getPersonnelInfoMap(List<String> ids) { private Map<String, PersonnelInfo> getPersonnelInfoMap(List<String> ids) {
if (CollectionUtils.isEmpty(ids)) {
return new HashMap<>();
}
List<PersonnelInfo> personnelInfos = getPersonnelInfos(ids); List<PersonnelInfo> personnelInfos = getPersonnelInfos(ids);
return personnelInfos.stream().collect(Collectors.toMap(PersonnelInfo::getId, s -> s)); return personnelInfos.stream().collect(Collectors.toMap(PersonnelInfo::getId, s -> s));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment