|
|
|
@ -2,7 +2,7 @@ package com.bx.implatform.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.text.CharSequenceUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
@ -73,7 +73,7 @@ public class GroupMessageServiceImpl extends ServiceImpl<GroupMessageMapper, Gro |
|
|
|
msg.setSendTime(new Date()); |
|
|
|
msg.setSendNickName(member.getAliasName()); |
|
|
|
if (CollUtil.isNotEmpty(dto.getAtUserIds())) { |
|
|
|
msg.setAtUserIds(CharSequenceUtil.join(",", dto.getAtUserIds())); |
|
|
|
msg.setAtUserIds(StrUtil.join(",", dto.getAtUserIds())); |
|
|
|
} |
|
|
|
this.save(msg); |
|
|
|
// 群发
|
|
|
|
@ -207,7 +207,7 @@ public class GroupMessageServiceImpl extends ServiceImpl<GroupMessageMapper, Gro |
|
|
|
sendMessage.setSendResult(true); |
|
|
|
imClient.sendGroupMessage(sendMessage); |
|
|
|
// 记录已读消息位置
|
|
|
|
String key = CharSequenceUtil.join(":", RedisKey.IM_GROUP_READED_POSITION, groupId, session.getUserId()); |
|
|
|
String key = StrUtil.join(":", RedisKey.IM_GROUP_READED_POSITION, groupId, session.getUserId()); |
|
|
|
redisTemplate.opsForValue().set(key, message.getId()); |
|
|
|
|
|
|
|
} |
|
|
|
|