package com.xhkjedu.smarking.mapper.papercheck;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.papercheck.MsPaperCheckTeacher;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷批阅分配教师表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsPaperCheckTeacherMapper extends TkMapper<MsPaperCheckTeacher> {
    //批量保存
    void batchSave(@Param("list") List<MsPaperCheckTeacher> teachers);

    //题块阅卷教师列表
    List<Map> listCheckTeacher(@Param("mpid") Integer mpid,@Param("mblockid") Integer mblockid);

    //根据题块id查询批阅教师任务信息
    MsPaperCheckTeacher findByBlockId(@Param("mblockid") Integer mblockid,@Param("teacherid") Integer teacherid);

    //更新批阅教师任务数量
    void updateTaskNum(@Param("mblockid") Integer mblockid, @Param("teacherid") Integer teacherid
            , @Param("tasknum") Integer tasknum,@Param("addTeacherId") Integer addTeacherId);

    //获取教师题块批阅信息
    MsPaperCheckTeacher getTeacherBlockCheck(@Param("mblockid") Integer mblockid, @Param("teacherid") Integer teacherid);

    //题块阅卷教师列表（复制用）
    List<MsPaperCheckTeacher> listCheckTeacher2(@Param("mpid") Integer mpid,@Param("mblockid") Integer mblockid);

    //根据试卷ID删除阅卷教师
    int deleteByMpid(@Param("mpid") Integer mpid);
}
