package com.ym.mec.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ym.mec.biz.dal.entity.ImLiveRoomReservation;
import com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 直播预约记录(ImLiveRoomReservation)表数据库访问层
 *
 * @author hgw
 * @since 2022-05-24 14:54:05
 */
public interface ImLiveRoomReservationDao extends BaseMapper<ImLiveRoomReservation> {

    int insertBatch(@Param("entities") List<ImLiveRoomReservation> entities);

    IPage<ImLiveBroadcastRoomVo> queryPageStudent(Page<ImLiveBroadcastRoomVo> page, @Param("param") Map<String, Object> param);

    /**
     * 查询房间预约人数
     *
     * @param roomIdList 房间id集合
     * @return
     */
    List<ImLiveBroadcastRoomVo> selectCountRoomReservation(@Param("roomIdList") List<String> roomIdList);

    String queryMusicGroupIds(@Param("userId") Integer userId);
}

