加注释
This commit is contained in:
@@ -12,11 +12,18 @@ import java.util.List;
|
||||
public interface ChatRecordsMapper {
|
||||
/**
|
||||
* 插入聊天记录
|
||||
* @param chatRecords 聊天记录
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(ChatRecords chatRecords);
|
||||
|
||||
/**
|
||||
* 根据用户ID和接收方用户ID查询聊天记录
|
||||
* 根据时间游标查询聊天记录
|
||||
* @param currentUserId 当前用户ID
|
||||
* @param targetUserId 目标用户ID
|
||||
* @param cursor 时间游标
|
||||
* @param size 页大小
|
||||
* @return 聊天记录列表
|
||||
*/
|
||||
List<ChatRecords> selectChatHistoryByCursor(
|
||||
@Param("currentUserId") Long currentUserId,
|
||||
@@ -26,7 +33,11 @@ public interface ChatRecordsMapper {
|
||||
);
|
||||
|
||||
/**
|
||||
* 标记消息为已读
|
||||
* 标记聊天记录为已读
|
||||
* @param senderUserId 发送方用户ID
|
||||
* @param receiverUserId 接收方用户ID
|
||||
* @param readTime 已读时间
|
||||
* @return 影响行数
|
||||
*/
|
||||
int markMessagesAsRead(
|
||||
@Param("senderUserId") Long senderUserId,
|
||||
|
||||
@@ -37,7 +37,10 @@ public interface ChatSessionsMapper {
|
||||
int updateSessionForReceiver(ChatSessions chatSessions);
|
||||
|
||||
/**
|
||||
* 清空会话未读数
|
||||
* 清空会话的未读数
|
||||
* @param userId 用户ID
|
||||
* @param targetUserId 目标用户ID
|
||||
* @return 影响行数
|
||||
*/
|
||||
int clearUnreadCount(
|
||||
@Param("userId") Long userId,
|
||||
|
||||
Reference in New Issue
Block a user