package com.ruoyi.project.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.project.common.domain.MessageContentUser;
import com.ruoyi.project.common.dto.MessageContentUserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jubs
 */
public interface MessageContentUserMapper extends BaseMapper<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(@Param("messageChatIds")List<Long> messageChatIds,@Param("receiveUserIds") 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(@Param("userId") Long userId, @Param("chatRoomId") Long chatRoomId);
    Integer getUnReadMessageByUserIdNeChatRoomId(@Param("userId") Long userId, @Param("chatRoomId") Long chatRoomId);
}
