From 75960d6e223f8cab9ceb489f6b89f5f08c6db62a Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期五, 01 八月 2025 17:24:32 +0800 Subject: [PATCH] 部分新功能 --- multi-system/src/main/resources/mapper/system/ExPaperStudentMapper.xml | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/multi-system/src/main/resources/mapper/system/ExPaperStudentMapper.xml b/multi-system/src/main/resources/mapper/system/ExPaperStudentMapper.xml index 96b78b7..6b69ff5 100644 --- a/multi-system/src/main/resources/mapper/system/ExPaperStudentMapper.xml +++ b/multi-system/src/main/resources/mapper/system/ExPaperStudentMapper.xml @@ -107,6 +107,12 @@ #{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} @@ -117,7 +123,7 @@ </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> -- Gitblit v1.9.2