package com.keao.edu.user.dao;

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

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

public interface StudentExamResultDao extends BaseDAO<Long, StudentExamResult> {

    int batchInsert(@Param("results") List<StudentExamResult> results);

    /**
     * @describe 查询考试结果
     * @author Joburgess
     * @date 2020.06.30
     * @param params:
     * @return java.util.List<com.keao.edu.user.entity.StudentExamResult>
     */
    List<StudentExamResult> queryStudentExamResult(Map<String, Object> params);
    int countStudentExamResult(Map<String, Object> params);

    /**
     * @describe 考试结果统计信息
     * @author Joburgess
     * @date 2020.06.30
     * @param organIds:
     * @param examId:
     * @return com.keao.edu.user.dto.StudentExamResultStatisticsDto
     */
    StudentExamResultStatisticsDto getStudentExamResultStatisticsInfo(@Param("organIds") List<Integer> organIds,
                                                                      @Param("examId") Integer examId);

    /**
     * 获取考试次数
     * @param studentIds
     * @param tenantId
     * @return
     */
    List<Map> countExamNum(@Param("studentIds") List<Integer> studentIds, @Param("tenantId") String tenantId);
}
