package com.xhkjedu.sexam.mapper.exam;

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

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

public interface EBaseMapper extends TkMapper<EBase> {
    //考试删除
    Integer deleteById(@Param("examid") Integer examid);

    //删除关联的班级和科目
    void deleteClassAndSubjectById(@Param("examid") Integer examid);

    //考试列表
    List<Map> listAll(@Param("base") EBase base);

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

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

    //考试基本信息(带考试人数)
    Map findById2(@Param("examid") Integer examid);

    //根据考试id获取名称
    String getNameByExamId(@Param("examid") Integer examid);

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

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

    //考试设置状态
    Map getSetState(@Param("examid") Integer examid);
}