|
|
@@ -503,10 +503,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
private R handleRoom(FsUserCourseVideoAddKfUParam param,FsUser user) {
|
|
|
//查询客户列表
|
|
|
List<QwExternalContact> contacts = qwExternalContactMapper.selectQwExternalContactListVOByfsUserId(user.getUserId());
|
|
|
- log.info("查出来的企微客户数量:"+contacts.size());
|
|
|
- if (!contacts.isEmpty()){
|
|
|
+ List<QwExternalContact> nonNullContacts = contacts.stream()
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ log.info("查出来的企微客户数量:"+nonNullContacts.size());
|
|
|
+ if (!nonNullContacts.isEmpty()){
|
|
|
//找出对应销售匹配的客户
|
|
|
- QwExternalContact matchedContact = contacts.stream()
|
|
|
+ QwExternalContact matchedContact = nonNullContacts.stream()
|
|
|
.filter(contact -> contact.getQwUserId().equals(Long.parseLong(param.getQwUserId())))
|
|
|
.findFirst()
|
|
|
.orElse(null);
|
|
|
@@ -523,7 +526,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
}
|
|
|
return R.error(567,"群聊通用链接").put("qwExternalId", matchedContact.getId());
|
|
|
}else {
|
|
|
- QwExternalContact contact = contacts.get(0);
|
|
|
+ QwExternalContact contact = nonNullContacts.get(0);
|
|
|
log.info("匹配到的第一个企微用户:"+contact.getUserId());
|
|
|
log.info("企微id:"+contact.getId());
|
|
|
log.info("用户:"+param.getVideoId());
|