Commit 9a0d154a by 徐高华

非空判断

parent d4cefdec
...@@ -128,11 +128,13 @@ public class GroupChatApiServiceImpl implements GroupChatApiService { ...@@ -128,11 +128,13 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
.map(dto -> dto.getStaffId()).collect(Collectors.toSet()); .map(dto -> dto.getStaffId()).collect(Collectors.toSet());
} }
List<String> staffIdList = new ArrayList<>(staffIdSet); List<String> staffIdList = new ArrayList<>(staffIdSet);
List<TabHaobanStaff> staffList = this.staffService.listNoStatusByStaffIds(wxEnterpriseId, staffIdList);
Map<String, TabHaobanStaff> map = new HashMap<>(); Map<String, TabHaobanStaff> map = new HashMap<>();
if(CollectionUtils.isNotEmpty(staffIdList)) {
List<TabHaobanStaff> staffList = this.staffService.listNoStatusByStaffIds(wxEnterpriseId, staffIdList);
if (CollectionUtils.isNotEmpty(staffList)) { if (CollectionUtils.isNotEmpty(staffList)) {
map = staffList.stream().collect(Collectors.toMap(TabHaobanStaff::getStaffId, o -> o, (k1, k2) -> k2)); map = staffList.stream().collect(Collectors.toMap(TabHaobanStaff::getStaffId, o -> o, (k1, k2) -> k2));
} }
}
return map; return map;
} }
......
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