package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.CommunityChatMsg;
import com.ruoyi.system.domain.vo.SysUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommunityChatMsgMapper extends BaseMapper<CommunityChatMsg> {
    /**
     * 获取登录用户的聊天列表
     *
     * @param userId
     * @return
     */
    List<SysUserVo> getChatListWithLatestMessage(@Param("userId") Long userId, @Param("type") String type);
}
