Commit bd010df8 by Future

获取历史消息增加msgId范围入参

parent e41cb659
...@@ -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;
} }
...@@ -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">
......
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