package com.xhkjedu.smarking.mapper.paper;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.paper.MsPaperQtypeQuestion;
import com.xhkjedu.smarking.vo.paper.MsPaperParams;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷试卷题型试题表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsPaperQtypeQuestionMapper extends TkMapper<MsPaperQtypeQuestion> {

    //保存客观题选项数量
    int updateBatchQuestionOptionnum(@Param("list") List<MsPaperQtypeQuestion> list);

    //保存客观题答案
    int updateBatchQuestionAnswer(@Param("list") List<MsPaperQtypeQuestion> list);

    //保存试题难易度
    int updateBatchQuestionComplexity(@Param("list") List<MsPaperQtypeQuestion> list);

    //试卷中所有试题基础信息
    List<MsPaperQtypeQuestion> listQuestionsByMpid(@Param("mpid")Integer mpid);

    //清空试题难易度
    int updateComplexityByMpid(@Param("mpid")Integer mpid);

    //删除题型下试题
    void deleteByMptid(@Param("mptid")Integer mptid);

    //批量修改试题信息-线下
    int updateBatchQuestionInfo(@Param("list") List<MsPaperQtypeQuestion> list);

    //批量修改试题排序-线下
    int updateBatchQuestionOrder(@Param("list") List<MsPaperQtypeQuestion> list);
    //批量修改试题排序-移动-线下
    int updateBatchMoveQuestionOrder(@Param("list") List<MsPaperQtypeQuestion> list);

    //获取试卷中所有试题排序
    List<MsPaperQtypeQuestion> listQuesOrderByMpid(@Param("mpid")Integer mpid);

    //获取题型下试题数量
    int getQuesnumByMptid(@Param("mptid")Integer mptid);
    //试题移动-获取要交换位置的试题
    MsPaperQtypeQuestion getQuestionForMoverOrder(@Param("p")MsPaperParams p);
    //获取试卷中所有试题-页面展示
    List<Map<String,Object>> listQuestionsForShow(@Param("mpid")Integer mpid);
    //批量设置试题框选坐标
    int updateBatchQuestionCoor(@Param("list") List<MsPaperQtypeQuestion> list);
    //清空试题切割坐标
    int updateQuestionCoorByMpid(@Param("mpid")Integer mpid);
    //试卷中所有试题-考试报告
    List<MsPaperQtypeQuestion> listQuestionsForReport(@Param("mpid")Integer mpid);

}
