package cn.com.qmth.examcloud.core.questions.service;

import cn.com.qmth.examcloud.api.commons.security.bean.User;
import cn.com.qmth.examcloud.core.questions.dao.entity.AudioTimeConfig;

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

/**
 * @author chenken
 * @date 2017年8月10日 下午3:16:02
 * @company QMTH
 * @description 音频次数设置service
 */
public interface AudioTimeConfigService {

    /**
     * 保存
     */
    public void saveAudioTimeConfig(List<AudioTimeConfig> audioTimeConfigs, User user);

    /**
     * 查询
     *
     * @param audioTimeConfig
     * @return
     */
    public List<AudioTimeConfig> findByAudioTimeConfig(AudioTimeConfig audioTimeConfig);

    /**
     * 根据examId删除
     */
    public void deleteByExamIdAndCourseCode(String examId, String courseCode);

    /**
     * 根据传入的对象查询音频题
     *
     * @return
     */
    public List<AudioTimeConfig> findAudioTimeConfigList(List<AudioTimeConfig> audioTimeConfigModelList);

    /**
     * @param audioTimeConfigModelList
     * @return
     */
    public List<AudioTimeConfig> findUpdateAudioTimeConfigList(List<AudioTimeConfig> audioTimeConfigModelList);

    /**
     * 新增音频播放次数
     *
     * @param audioTimeConfig
     */
    public void addAudioTimeConfig(AudioTimeConfig audioTimeConfig);

    /**
     * 根据考试id和课程id查询音频试题
     *
     * @param examId
     * @return
     */
    public List<AudioTimeConfig> findAudioTimeConfigByExamId(String examId, String courseCode);

    public Map<String, String> findAudioTimeConfig(String examId, String courseCode, String groupCode, String paperDetailUnitId);
}

