“djh”
3 天以前 a0469a082320c33fc19d4e7239b7ddde67945227
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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>