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
bd010df8
Commit
bd010df8
authored
Feb 14, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取历史消息增加msgId范围入参
parent
e41cb659
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
core/src/main/java/com/wecloud/im/param/ImHistoryMessagePageParam.java
+10
-0
core/src/main/resources/mapper/ImMessageMapper.xml
+7
-0
No files found.
core/src/main/java/com/wecloud/im/param/ImHistoryMessagePageParam.java
View file @
bd010df8
...
@@ -24,4 +24,14 @@ public class ImHistoryMessagePageParam extends BasePageOrderParam {
...
@@ -24,4 +24,14 @@ public class ImHistoryMessagePageParam extends BasePageOrderParam {
@ApiModelProperty
(
"会话id"
)
@ApiModelProperty
(
"会话id"
)
private
Long
conversationId
;
private
Long
conversationId
;
/**
* 消息id最小值
*/
private
Long
msgIdStart
;
/**
* 消息id最大值
*/
private
Long
msgIdEnd
;
}
}
core/src/main/resources/mapper/ImMessageMapper.xml
View file @
bd010df8
...
@@ -70,6 +70,13 @@
...
@@ -70,6 +70,13 @@
FROM `im_message`
FROM `im_message`
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
WHERE fk_conversation_id = #{param.conversationId}
WHERE fk_conversation_id = #{param.conversationId}
<if
test=
"msgIdStart != null"
>
AND im_message.id > #{msgIdStart}
</if>
<if
test=
"msgIdEnd != null"
>
AND im_message.id
<![CDATA[ < ]]>
#{msgIdEnd}
</if>
ORDER BY `im_message`.`create_time` DESC
ORDER BY `im_message`.`create_time` DESC
</select>
</select>
<select
id=
"getReceivedLastMsgByConversationId"
resultType=
"com.wecloud.im.vo.OfflineMsgDto"
>
<select
id=
"getReceivedLastMsgByConversationId"
resultType=
"com.wecloud.im.vo.OfflineMsgDto"
>
...
...
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