package com.xhkjedu.sstudy.mapper.question;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sstudy.model.question.TQuestionStudent;
import com.xhkjedu.sstudy.vo.question.QuestionStudentVo;
import com.xhkjedu.sstudy.vo.subjectbook.SubjectQuestiontypeVo;
import org.apache.ibatis.annotations.Param;

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

public interface QuestionStudentMapper extends TkMapper<TQuestionStudent> {
    /**
     * 获取学生错题信息
     * @Param [questionid, studentid]
     * @Author ywx
     * @Date 2020/6/10 16:23
     * @return com.xhkjedu.model.question.TQuestionStudent
     **/
    TQuestionStudent getQuestionStudent(@Param("qs") TQuestionStudent qs);

    /**
     * 错题列表
     * @Param [questionStudent]
     * @Author ywx
     * @Date 2020/6/11 14:25
     * @return java.util.List<com.xhkjedu.vo.question.QuestionStudentVo>
     **/
    List<QuestionStudentVo> findAll(@Param("qs") TQuestionStudent questionStudent);

    /**
     * 删除
     * @Param [qsid]
     * @Author ywx
     * @Date 2020/6/11 14:42
     * @return java.lang.Integer
     **/
    Integer deleteById(@Param("qsid") Integer qsid);

    /**
     * 更新错误次数
     * @Param [qsid]
     * @Author ywx
     * @Date 2020/6/11 15:00
     * @return java.lang.Integer
     **/
    Integer updateErrorNum(@Param("qsid") Integer qsid,@Param("checktime") Integer checktime);


    //////////////////////////////////////////////学生WEB端//////////////////////////////////////////////
    /**
     * 错题集列表
     * @Param [question]
     * @Author ywx
     * @Date 2020/9/4 10:04
     * @return java.util.List<com.xhkjedu.vo.question.QuestionStudentVo>
     **/
    List<QuestionStudentVo> listForWeb(@Param("question") TQuestionStudent question);

    /**
     * 更新错题信息
     * @Param [qs]
     * @Author ywx
     * @Date 2020/9/4 15:07
     * @return java.lang.Integer
     **/
    Integer updateQuestion(@Param("qs") TQuestionStudent qs);

    /**
     * 结构试题详情
     *
     * @return com.xhkjedu.vo.question.QuestionStudentVo
     * @Param [questionid, studentid]
     * @Author ywx
     * @Date 2020/9/5 9:41
     **/
    QuestionStudentVo detail(@Param("questionid") String questionid, @Param("studentid") Integer studentid, @Param("qctype") Integer qctype);

    /**
     * 附件试题详情
     * @Param [questionid, studentid]
     * @Author ywx
     * @Date 2020/9/5 10:01
     * @return com.xhkjedu.vo.question.QuestionStudentVo
     **/
    QuestionStudentVo sdetail(String questionid, Integer studentid);

    /**
     * 已批阅未得满分的试题
     * @Param [paperid, classid]
     * @Author ywx
     * @Date 2020/10/12 15:11
     * @return java.util.List<com.xhkjedu.model.question.TQuestionStudent>
     **/
    List<TQuestionStudent> listQuestions(Long paperid, Integer classid, Integer qctype);

    /**
     * 题型列表
     * @Param [qs]
     * @Author ywx
     * @Date 2020/10/21 16:15
     * @return java.util.List<com.xhkjedu.vo.subjectbook.SubjectQuestiontypeVo>
     **/
    List<SubjectQuestiontypeVo> listQtype(@Param("qs") TQuestionStudent qs);

    List<Map> getPaperNameById(@Param("paperids") List<Integer> paperids);

    //保存学生错题
    void saveQuestionStudent(@Param("qs") TQuestionStudent qs);
}
