<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionHistoryMapper">

    <!--修改历史-->
    <select id="listExamStuQuestionHistory" resultType="java.util.Map">
        select h.*,u.username stuname,u.loginname,s.subjectname
        from e_paper_student_question_history h left join t_user u on h.studentid=u.userid
                                                left join t_subject s on h.subjectid=s.subjectid
        where h.examid=#{examid}
        <if test="subjectid!=null and subjectid!='' and subjectid!='0'">
            and h.subjectid=#{subjectid}
        </if>
        order by h.createtime desc
    </select>

</mapper>
