package com.ruoyi.project.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.project.common.domain.MessageContentUser;
import com.ruoyi.project.common.dto.MessageContentUserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 聊天记录读取Service接口
 *
 * @author jubs
 * @date 2024-05-15
 */
public interface IMessageContentUserService extends IService<MessageContentUser> {
    /**
     * description: markUnReadMessage 用于查询 以聊天室、接收人为分组，唯独讯息
     * @param messageChatIds: 聊天室ids
     * @param receiveUserIds: 接收人ids
     * @return java.util.List<com.ruoyi.project.common.dto.MessageContentUserDto>
     * @author jubs 😀
     * @date 2024/5/17 9:18
     */
    List<MessageContentUserDto> markUnReadMessage(List<Long> messageChatIds, List<Long> receiveUserIds);


    /**
     * description: getUnReadMessageByUserIdAndChatRoom
     * @param userId:
     * @param chatRoomId:
     * @return java.util.List<com.ruoyi.project.common.dto.MessageContentUserDto>
     * @author jubs 😀
     * @date 2024/5/17 11:06
     */
    List<MessageContentUserDto> getUnReadMessageByUserIdAndChatRoom(Long userId, Long chatRoomId);

    Integer getUnReadMessageByUserIdNeChatRoomId(@Param("userId") Long userId, @Param("chatRoomId") Long chatRoomId);


}