Commit 9e77e176 by guojx

Merge remote-tracking branch 'origin/feature/五月需求迭代' into feature/五月需求迭代

parents bc6d8bd5 b391d149
......@@ -186,7 +186,8 @@ public class StaffApiServiceImpl implements StaffApiService {
List<String> relationIdList = this.staffClerkRelationService.listRelationsStaffId(staffIdList);
//已关联的成员需要查询关联的品牌名称
List<TabHaobanWxEnterpriseRelated> list = wxEnterpriseRelatedService.getByWxEnterpriseId(wxEnterpriseId);
Map<String, String> map = list.stream().collect(Collectors.toMap(TabHaobanWxEnterpriseRelated::getEnterpriseId, TabHaobanWxEnterpriseRelated::getEnterpriseName));
//解决空指针异常问题
Map<String, Object> map = list.stream().collect(Collectors.toMap(TabHaobanWxEnterpriseRelated::getEnterpriseId, a->Optional.ofNullable(a.getEnterpriseName())));
List<StaffClerkRelationDTO> relationDTOList = staffClerkRelationService.listByWxEnterpriseIdAndStaffId(wxEnterpriseId, staffIdList);
staffDTOList.forEach(one -> {
if(relationIdList.contains(one.getStaffId())){
......@@ -195,7 +196,7 @@ public class StaffApiServiceImpl implements StaffApiService {
List<String> enterpriseNameList = new ArrayList<>(8);
for (StaffClerkRelationDTO dto : relationDTOList){
if (dto.getStaffId().equals(one.getStaffId())){
enterpriseNameList.add(map.get(dto.getEnterpriseId()));
enterpriseNameList.add(String.valueOf(map.get(dto.getEnterpriseId())));
}
}
if (CollUtil.isNotEmpty(enterpriseNameList)){
......
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