package com.yonge.cooleshow.biz.dal.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.entity.MusicCompareRecordStat;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yonge.cooleshow.biz.dal.wrapper.StatGroupWrapper;
import com.yonge.cooleshow.biz.dal.wrapper.music.MusicCompareWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 曲目练习统计表 Mapper 接口
 * </p>
 *
 * @author Eric
 * @since 2022-10-17
 */
public interface MusicCompareRecordStatMapper extends BaseMapper<MusicCompareRecordStat> {

    /**
     * 用户曲目统计查询
     * @param page IPage<MusicCompareWrapper.RecordInfo>
     * @param query MusicCompareWrapper.StatQueryInfo
     * @return List<MusicCompareWrapper.RecordInfo>
     */
    List<MusicCompareWrapper.RecordInfo> selectMusicCompareRecordPage(@Param("page") IPage<MusicCompareWrapper.RecordInfo> page, @Param("record") MusicCompareWrapper.StatQueryInfo query);

    /**
     * 用户曲目统计汇总
     * @param query MusicCompareWrapper.StatQueryInfo
     * @return List<StatGroupWrapper>
     */
    List<StatGroupWrapper> selectMusicCompareRecordStatInfo(@Param("record") MusicCompareWrapper.StatQueryInfo query);

    /**
     * 曲目练习评测记录
     * @param page IPage<MusicCompareWrapper.RecordEvaluate>
     * @param query MusicCompareWrapper.EvaluteQueryInfo
     * @return List<MusicCompareWrapper.RecordEvaluate>
     */
    List<MusicCompareWrapper.RecordEvaluate> selectMusicCompareEvaluatePage(@Param("page") IPage<MusicCompareWrapper.RecordEvaluate> page,
                                                                            @Param("record") MusicCompareWrapper.EvaluteQueryInfo query);
}
