Commit 03557328 by Future

添加消息链

parent 344d2d5e
...@@ -193,10 +193,14 @@ public class NormalChatAction { ...@@ -193,10 +193,14 @@ public class NormalChatAction {
Boolean sendSuccess = sendMsgForOnline(member.getFkClientId(), imMessageOnlineSend); Boolean sendSuccess = sendMsgForOnline(member.getFkClientId(), imMessageOnlineSend);
if (isPush && !sendSuccess && !member.getDoNotDisturb()) { if (isPush && !sendSuccess && !member.getDoNotDisturb()) {
// 异步推送系统通知消息 5分钟内推一次消息 try {
PushDTO pushDTO = mqSender.buildPushDto(push, member.getFkClientId(), member.getClientId(), imApplication); // 异步推送系统通知消息 5分钟内推一次消息
if (pushDTO != null) { PushDTO pushDTO = mqSender.buildPushDto(push, member.getFkClientId(), member.getClientId(), imApplication);
mqSender.orderSend(MqConstant.Topic.IM_ORDER_MSG_TOPIC, MqConstant.Tag.IM_ORDER_MSG_TAG, pushDTO); if (pushDTO != null) {
mqSender.orderSend(MqConstant.Topic.IM_ORDER_MSG_TOPIC, MqConstant.Tag.IM_ORDER_MSG_TAG, pushDTO);
}
} catch (Exception e) {
log.info("发送系统消息失败异常 ", e);
} }
} }
} }
......
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<select id="countBeAt" resultType="com.wecloud.im.vo.ConversationCountVo"> <select id="countBeAt" resultType="com.wecloud.im.vo.ConversationCountVo">
SELECT im_inbox.fk_conversation_id conversationId, COUNT(*) as count SELECT im_inbox.fk_conversation_id conversationId, COUNT(*) as count
FROM im_inbox INNER JOIN im_message ON im_inbox.fk_msg_id = im_message.id FROM im_inbox INNER JOIN im_message_new ON im_inbox.fk_msg_id = im_message_new.id
WHERE receiver = #{fkClientId} WHERE receiver = #{fkClientId}
AND receiver_msg_status = 0 AND receiver_msg_status = 0
AND ( AND (
FIND_IN_SET( #{clientId}, im_message.`at` ) > 0 FIND_IN_SET( #{clientId}, im_message_new.`at` ) > 0
OR FIND_IN_SET( '-1', im_message.`at` ) > 0 OR FIND_IN_SET( '-1', im_message_new.`at` ) > 0
) )
GROUP BY im_inbox.fk_conversation_id GROUP BY im_inbox.fk_conversation_id
</select> </select>
......
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
msg.`at`, msg.`at`,
msg.send_status, msg.send_status,
msg.fk_conversation_id as conversationId, msg.fk_conversation_id as conversationId,
(SELECT COUNT(a.id) FROM im_message a WHERE a.fk_conversation_id = msg.fk_conversation_id and a.id > #{lastestMsg.lastestReadMsgId}) (SELECT COUNT(a.id) FROM im_message_new a WHERE a.fk_conversation_id = msg.fk_conversation_id and a.id > #{lastestMsg.lastestReadMsgId})
AS not_read_count, AS not_read_count,
(SELECT COUNT(b.id) FROM im_message b WHERE b.fk_conversation_id = msg.fk_conversation_id and b.id >= msg.id) (SELECT COUNT(b.id) FROM im_message_new b WHERE b.fk_conversation_id = msg.fk_conversation_id and b.id >= msg.id)
AS not_receiver_count AS not_receiver_count
from im_message msg INNER JOIN `im_client` client ON client.id = msg.sender from im_message_new msg INNER JOIN `im_client` client ON client.id = msg.sender
where where
(and msg.is_delete = 1 and msg.fk_conversation_id = #{lastestMsg.conversationId} and msg.id > #{lastestMsg.lastestReceiveMsgId} ) (and msg.is_delete = 1 and msg.fk_conversation_id = #{lastestMsg.conversationId} and msg.id > #{lastestMsg.lastestReceiveMsgId} )
</foreach> </foreach>
......
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