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.dto.RoomReservationUserSearch;
import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoom;
import com.ym.mec.biz.dal.vo.BaseRoomUserVo;
import com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomVo;
import com.ym.mec.biz.dal.vo.RoomReservationUserVo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.biz.dal.vo.LiveRoomGoodsOrderVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 直播房间管理表(ImLiveBroadcastRoom)表数据库访问层
 *
 * @author hgw
 * @since 2022-02-17 20:52:05
 */
public interface ImLiveBroadcastRoomDao extends BaseMapper<ImLiveBroadcastRoom> {

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

    List<ImLiveBroadcastRoomVo> queryPage(@Param("param") Map<String, Object> param);

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

    List<BaseRoomUserVo> queryBaseUserInfo(@Param("list") List<Integer> list);

    /**
     * 查询直播间预约用户信息
     *
     * @return
     */
    IPage<RoomReservationUserVo> queryRoomUser(@Param("page") IPage<RoomReservationUserVo> page,
                                                  @Param("query") RoomReservationUserSearch query);

    List<RoomReservationUserVo> queryRoomUser(@Param("query") RoomReservationUserSearch query);

    String querySchoolIds(@Param("organIds") String organIds);

    String queryTeamIds(@Param("organIds") String organIds);

    List<LiveRoomGoodsOrderVo> queryLiveRoomGoodsOrderList(Map<String, Object> params);

    int countLiveRoomGoodsOrderList(Map<String, Object> params);

    Map sumLiveRoomGoodsOrderList(Map<String, Object> params);
}

