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

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

import org.apache.ibatis.annotations.Param;

import com.yonge.cooleshow.biz.dal.dto.StudentTrainChartDto;
import com.yonge.cooleshow.biz.dal.dto.StudentTrainOverviewDto;
import com.yonge.cooleshow.biz.dal.entity.SysMusicCompareRecord;
import com.yonge.cooleshow.biz.dal.enums.HeardLevelEnum;
import com.yonge.toolset.mybatis.dal.BaseDAO;

public interface SysMusicCompareRecordDao extends BaseDAO<Long, SysMusicCompareRecord> {

	/**
	 * @describe 获取用户最后一次评测数据
	 * @author Joburgess
	 * @date 2021/8/23 0023
	 * @param userId:
	 * @return com.ym.mec.biz.dal.entity.SysMusicCompareRecord
	 */
	SysMusicCompareRecord getUserLastEvaluationData(@Param("userId") Long userId);

	/**
	 * @describe 获取用户训练总览
	 * @author Joburgess
	 * @date 2021/8/11 0011
	 * @param userId:
	 * @return com.ym.mec.biz.dal.dto.StudentTrainOverviewDto
	 */
	StudentTrainOverviewDto getUserTrainOverView(@Param("userId") Long userId);

	/**
	 * @describe 获取用户训练图表数据
	 * @author Joburgess
	 * @date 2021/8/12 0012
	 * @param userId:
	 * @param startTime:
	 * @param endTime:
	 * @return java.util.List<com.ym.mec.biz.dal.dto.StudentTrainChartDto>
	 */
	List<StudentTrainChartDto> getUserTrainChartData(@Param("userId") Long userId, @Param("startTime") String startTime, @Param("endTime") String endTime);

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

	/**
	 * @describe 统计分部小酷Ai新增人数
	 * @author Joburgess
	 * @date 2021/8/18 0018
	 * @param organId:
	 * @return int
	 */
	int getOrganNewCloudStudyNum(@Param("organId") Integer organId);

	int getOrgansTotalNewCloudStudyNum(@Param("organIds") List<Integer> organIds);

	List<Map<Integer, Integer>> getOrgansNewCloudStudyNum(@Param("organIds") List<Integer> organIds);

	/**
	 * @describe 获取用户本周最高分对应曲目编号
	 * @author Joburgess
	 * @date 2021/8/30 0030
	 * @param userId:
	 * @param monday:
	 * @param heardLevel:
	 * @return java.lang.Integer
	 */
	Integer getUserWeekMaxMusicScoreId(@Param("userId") Long userId, @Param("monday") String monday, @Param("heardLevel") HeardLevelEnum heardLevel);
}
