package com.xhkjedu.smarking.mapper.exam;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.exam.MsExam;
import com.xhkjedu.smarking.vo.exam.EBaseVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷考试表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsExamMapper extends TkMapper<MsExam> {
    //考试列表
    List<Map> listAll(@Param("exam") MsExam exam);

    //根据考试id获取考试状态
    EBaseVo getExamStateById(@Param("examid") Integer examid);

    //发布考试
    void postExam(@Param("examid") Integer examid,@Param("examcomm") String examcomm);

    //考试基本信息
    Map findById(@Param("examid") Integer examid);
    //考试状态
    Integer getExamstate(@Param("examid") Integer examid);

    //删除
    void deleteById(@Param("examid") Integer examid);

    //删除关联的班级
    void deleteClassById(@Param("examid") Integer examid);

    //更新考试状态
    void updateExamState(@Param("examid") Integer examid,@Param("examstate") int examstate);

    //获取考试学校id
    Integer getSchoolIdByExamId(@Param("examid") Integer examid);
    //批量结束考试
    Integer updateBatchExamState(@Param("examids") List<Integer> examids);
}
