<?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.qmth.themis.business.dao.TEExamPaperMapper">
	<select id="findByExamIdAndCourseCodeAndPaperCode"
		resultType="com.qmth.themis.business.entity.TEExamPaper">
		select * from t_e_exam_paper t
		where t.exam_id=#{examId} and
		t.course_code=#{courseCode}
		and t.code =#{paperCode}
	</select>
	
	<select id="findListByExamIdAndCourseCode"
		resultType="com.qmth.themis.business.entity.TEExamPaper">
		select * from t_e_exam_paper t
		where t.exam_id=#{examId} and
		t.course_code=#{courseCode}
	</select>
	
	<update id="updateWeight">
		update t_e_exam_paper t set t.weight=#{weight} where t.id=#{id}
	</update>
	
	<select id="findByExamId"
		resultType="com.qmth.themis.business.entity.TEExamPaper">
		select * from t_e_exam_paper t
		where t.exam_id=#{examId}
	</select>
	
</mapper>
