package com.keao.edu.user.dao;

import com.keao.edu.common.dal.BaseDAO;
import com.keao.edu.user.dto.ExamCertificationDto;
import com.keao.edu.user.dto.NeedCheckingDetailDto;
import com.keao.edu.user.entity.ExamCertification;
import org.apache.ibatis.annotations.Param;

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

public interface ExamCertificationDao extends BaseDAO<Long, ExamCertification> {

    int batchInsert(@Param("ecs")List<ExamCertification> ecs);

    /**
     * 获取学员准考证
     * @param studentId
     * @param examRegistrationId
     * @return
     */
    ExamCertification findByStuAndBasicId(@Param("studentId") Integer studentId, @Param("examRegistrationId") Long examRegistrationId);

    int updateExamAddress(@Param("address") String address,
                          @Param("registIds") List<Long> registIds);

    int deleteWithRegist(@Param("registIds") List<Long> registIds);

    /**
     * 获取学员准考证列表
     * @param studentId
     * @return
     */
    List<ExamCertificationDto> queryExamCertificationDtoPage(@Param("studentId") Integer studentId, @Param("examRegistrationId") Long examRegistrationId);
    /**
     * COUNT学员准考证列表
     * @param params
     * @return
     */
    Integer countExamCertificationDtoPage(Map<String, Object> params);

    /**
     * 学生端待考详情
     * @param examRegistrationId
     * @return
     */
    NeedCheckingDetailDto needCheckingDetail(Long examRegistrationId);

    /**
     * 获取监考端准考证详情
     * @param examRegistrationId
     * @return
     */
    ExamCertificationDto getExamCertificationDto(@Param("examRegistrationId") Long examRegistrationId);
}
