| | |
| | | <result property="useTime" column="use_time" /> |
| | | <result property="startTime" column="start_time" /> |
| | | <result property="state" column="state" /> |
| | | <result property="number" column="number"/> |
| | | <result property="version" column="version" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <update id="updateByPaperStudentId"> |
| | | update ex_paper_student set state = 0,start_time=null ,end_time = null where paper_id =#{paperId} and student_id =#{studentId} |
| | | </update> |
| | | <delete id="deleteByPaperStudentId"> |
| | | delete from ex_paper_student where paper_id =#{paperId} and student_id = #{studentId} |
| | | </delete> |
| | | |
| | | <select id="countByPaperId" resultType="java.lang.Integer"> |
| | | select count(1) from ex_paper_student where paper_id=#{paperId} |
| | |
| | | </select> |
| | | |
| | | <select id="selectPaperStudentList" resultMap="SimplePaperStudentResult"> |
| | | select a.*,e.name as create_name,b.phone as student_phone,b.name as student_name,c.name as paper_name,c.code as paper_code,c.limited,c.limit_time,c.deadline,d.name as category_name |
| | | select a.*,c.create_by as create_name,b.phone as student_phone,b.name as student_name,c.name as paper_name,c.code as paper_code,c.limited,c.limit_time,c.deadline,d.name as category_name |
| | | <if test="studentId!=null"> |
| | | ,(select question_id from ex_student_answer where paper_id=a.paper_id and student_id=#{studentId} order by id desc limit 1) as question_id |
| | | </if> |
| | |
| | | select a.*,b.name as paper_name,c.id as company_id,c.name as company_name from ex_paper_student a |
| | | left join ex_exam_paper b on b.id=a.paper_id |
| | | left join sys_company c on c.id=b.company_id |
| | | WHERE a.student_id = #{studentId} |
| | | </select> |
| | | |
| | | <select id="selectNoCompleteStudent" resultMap="SimplePaperStudentResult"> |