Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
03557328
Commit
03557328
authored
Oct 19, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加消息链
parent
344d2d5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
+8
-4
core/src/main/resources/mapper/ImInboxMapper.xml
+3
-3
core/src/main/resources/mapper/ImMsgReadLastestMapper.xml
+3
-3
No files found.
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
View file @
03557328
...
@@ -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
);
}
}
}
}
}
}
...
...
core/src/main/resources/mapper/ImInboxMapper.xml
View file @
03557328
...
@@ -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>
...
...
core/src/main/resources/mapper/ImMsgReadLastestMapper.xml
View file @
03557328
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment