package com.yutou.bilibili.mybatis.Bili.mybatis.dao;

import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveData;
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveDataExample;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface BilibiliLiveDataDao {
    long countByExample(BilibiliLiveDataExample example);

    int deleteByExample(BilibiliLiveDataExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(BilibiliLiveData record);

    int insertSelective(BilibiliLiveData record);

    List<BilibiliLiveData> selectByExample(BilibiliLiveDataExample example);

    BilibiliLiveData selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") BilibiliLiveData record, @Param("example") BilibiliLiveDataExample example);

    int updateByExample(@Param("record") BilibiliLiveData record, @Param("example") BilibiliLiveDataExample example);

    int updateByPrimaryKeySelective(BilibiliLiveData record);

    int updateByPrimaryKey(BilibiliLiveData record);

    List<BilibiliLiveData> queryLiveData(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("type")String[] type);

    List<BilibiliLiveData> queryTimeOfRoomid(@Param("roomid") int roomId,@Param("giftId")int giftId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);

    int queryGiftUserToDistinct(@Param("roomid") int roomId,@Param("giftId")int giftId, @Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("type")String[] type);

    List<Map<String, BigDecimal>> queryPriceTimeGroup(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);

    List<Map<String, BigDecimal>> queryGiftTimeGroup(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);
}