package com.keao.edu.user.dao;

import com.keao.edu.common.dal.BaseDAO;
import com.keao.edu.user.dto.ExamSubjectSongDto;
import com.keao.edu.user.entity.ExamSubjectSong;
import org.apache.ibatis.annotations.Param;

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

public interface ExamSubjectSongDao extends BaseDAO<Long, ExamSubjectSong> {

    int batchInsert(@Param("examSubjectSongs") List<ExamSubjectSong> examSubjectSongs);

    /**
     * @param examId:
     * @return java.util.List<com.keao.edu.user.entity.ExamSubjectSong>
     * @describe 获取考级项目下的专业设置
     * @author Joburgess
     * @date 2020.06.22
     */
    List<ExamSubjectSong> findByExam(@Param("examId") Integer examId);


    /**
     * 获取考试对应科目对应级别的曲目
     *
     * @param examSubjectId
     * @param level
     * @return
     */
    ExamSubjectSong getExamSubjectSong(@Param("examinationBasicId") Integer examinationBasicId, @Param("examSubjectId") Long examSubjectId, @Param("level") Integer level);

    /**
     * 获取项目对应专业的级别
     * @param examinationBasicId
     * @param examSubjectId
     * @return
     */
    List<ExamSubjectSong> getExamSubjectLevels(@Param("examinationBasicId") Integer examinationBasicId, @Param("examSubjectId") Long examSubjectId);

    List<ExamSubjectSongDto> queryExamSubjectSongs(Map<String, Object> params);
    int countExamSubjectSongs(Map<String, Object> params);

    int countExamSongsWithSubject(@Param("examId") Long examId,@Param("subjectId") Integer subjectId);

}
