Commit b8a1ccd4 by jinxin

所属商户去重

parent e42d79f7
......@@ -189,14 +189,18 @@ public class StaffApiServiceImpl implements StaffApiService {
staffDTOList.forEach(one -> {
if(relationIdList.contains(one.getStaffId())){
one.setRelationFlag(1);
//查询导购关联关系表,找到对应的
//查询导购关联关系表,找到对应的商户名称
List<String> enterpriseNameList = new ArrayList<>(8);
relationDTOList.forEach(a->{
if (a.getStaffId().equals(one.getStaffId())){
enterpriseNameList.add(map.get(a.getEnterpriseId()));
for (StaffClerkRelationDTO dto : relationDTOList){
if (dto.getStaffId().equals(one.getStaffId())){
enterpriseNameList.add(map.get(dto.getEnterpriseId()));
}
});
one.setEnterpriseNameList(enterpriseNameList);
}
if (CollUtil.isNotEmpty(enterpriseNameList)){
//对商户名称去重
enterpriseNameList = enterpriseNameList.stream().distinct().collect(Collectors.toList());
one.setEnterpriseNameList(enterpriseNameList);
}
}else {
one.setRelationFlag(0);
}
......
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