|
@@ -635,6 +635,16 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
|
|
|
List<ImUserWrapper.ImUserFriend> userFriends = JSON.parseArray(JSON.toJSONString(records),
|
|
|
ImUserWrapper.ImUserFriend.class);
|
|
|
|
|
|
+ // 获取好友ID,查询注销的人,过滤
|
|
|
+ if (CollectionUtils.isNotEmpty(userFriends)) {
|
|
|
+ List<Long> userIds = userFriends.stream().map(ImUserWrapper.ImUserFriend::getFriendId).collect(Collectors.toList());
|
|
|
+ List<com.yonge.cooleshow.biz.dal.entity.SysUser> sysUsers = sysUserMapper.selectBatchIds(userIds);
|
|
|
+ List<Long> delUserIds = sysUsers.stream().filter(o -> o.getDelFlag() == 1).map(o -> o.getId()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(delUserIds)) {
|
|
|
+ userFriends = userFriends.stream().filter(o -> !delUserIds.contains(o.getFriendId())).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for (ImUserWrapper.ImUserFriend item : userFriends) {
|
|
|
if (item.getFriendType() == null) {
|
|
|
continue;
|