package com.keao.edu.user.dao;

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

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

public interface ExaminationBasicDao extends BaseDAO<Long, ExaminationBasic> {

    int batchUpdate(@Param("exams") List<ExaminationBasic> exams);

    ExaminationBasic lockExam(@Param("examId") Long examId);

    ExaminationBasicDto getExaminationBasic(Integer examId);

    /**
     * @describe 获取指定日期结束的考级项目
     * @author Joburgess
     * @date 2020.07.27
     * @param day:
     * @return java.util.List<com.keao.edu.user.entity.ExaminationBasic>
     */
    List<ExaminationBasic> getEndExamsWithDayAndStatus(@Param("day") String day);

    List<ExaminationBasicDto> findExaminationBasics(Map<String, Object> params);
    int countExaminationBasics(Map<String, Object> params);

    /**
     * @describe 获取需要更新状态的考级项目
     * @author Joburgess
     * @date 2020.06.19
     * @return java.util.List<com.keao.edu.user.entity.ExaminationBasic>
     */
    List<ExaminationBasic> getNeedUpdateStatusExams();

    List<ExaminationBasicDto> getExams(@Param("examIds") List<Long> examIds);
	
}
