<?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.gkhy.exam.system.mapper.ExStudentAnswerMapper">
|
|
<select id="countByPaperId" resultType="java.lang.Integer">
|
select count(1) from ex_student_answer where paper_id=#{paperId} and student_id=#{studentId}
|
</select>
|
|
<select id="selectPassCount" resultType="java.lang.Integer">
|
select count(1) from ex_student_answer a
|
inner join ex_question b on b.id=a.question_id
|
where a.paper_id=#{paperId} and a.student_id=#{studentId} and b.question_type=#{questionType} and a.passed=1
|
</select>
|
|
<select id="getStudentAnswer" resultType="com.gkhy.exam.system.domain.ExStudentAnswer">
|
select * from ex_student_answer where paper_id=#{paperId} and student_id=#{studentId} and question_id=#{questionId}
|
</select>
|
</mapper>
|