|
|
@@ -12,6 +12,7 @@ import cn.tr.module.mobile.enums.MsgRoleType;
|
|
|
import cn.tr.module.mobile.po.ImGroupUserPO;
|
|
|
import cn.tr.module.mobile.repository.ImGroupUserRepository;
|
|
|
import cn.tr.module.mobile.utils.UserUtils;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import net.x52im.mobileimsdk.server.network.MBObserver;
|
|
|
import net.x52im.mobileimsdk.server.processor.OnlineProcessor;
|
|
|
@@ -134,8 +135,11 @@ public class ImMsgReceivedServiceImpl implements IImMsgReceivedService {
|
|
|
groupUserPO.setTenantId(msg.getTenantId());
|
|
|
groupUserRepository.insert(groupUserPO);
|
|
|
}else {
|
|
|
- groupUserPO.setUnreadCount(groupUserPO.getUnreadCount()+1);
|
|
|
- groupUserRepository.updateById(groupUserPO);
|
|
|
+ groupUserRepository.update(null,
|
|
|
+ new LambdaUpdateWrapper<ImGroupUserPO>()
|
|
|
+ .eq(ImGroupUserPO::getGroupId, groupUserPO.getGroupId())
|
|
|
+ .eq(ImGroupUserPO::getUserId, groupUserPO.getUserId())
|
|
|
+ .set(ImGroupUserPO::getUnreadCount, groupUserPO.getUnreadCount()+1));
|
|
|
}
|
|
|
}
|
|
|
}
|