From a820ec5dc1682ac0a31fcbdba3eb4d2c0fe74b64 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 16 七月 2024 17:11:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/resources/mapper/ExamPaperAnswerMapper.xml | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/mapper/ExamPaperAnswerMapper.xml b/src/main/resources/mapper/ExamPaperAnswerMapper.xml index ea34ff9..6692f25 100644 --- a/src/main/resources/mapper/ExamPaperAnswerMapper.xml +++ b/src/main/resources/mapper/ExamPaperAnswerMapper.xml @@ -209,6 +209,9 @@ <if test="taskExamId != null"> task_exam_id = #{taskExamId,jdbcType=INTEGER}, </if> + <if test="invalid != null"> + invalid = #{invalid}, + </if> </set> where id = #{id,jdbcType=INTEGER} </update> @@ -659,14 +662,13 @@ <select id="getTemplateOtherExamAnswer" resultType="com.mindskip.xzs.domain.ExamPaperAnswer"> SELECT id, user_score FROM t_exam_paper_answer WHERE exam_paper_id IN - (SELECT exam_paper_id FROM t_exam_templates_user_count WHERE user_id = #{createUser} AND exam_templates_id = - (SELECT exam_templates_id FROM t_exam_templates_user_count WHERE exam_paper_id = #{examPaperId} LIMIT 1)) - HAVING MAX(user_score) ORDER BY create_time DESC LIMIT 1 + (SELECT exam_paper_id FROM t_exam_templates_user_count WHERE user_id = #{examPaperAnswer.createUser} AND exam_templates_id = #{templateId}) + ORDER BY user_score DESC LIMIT 1 </select> <select id="getPaperOtherExamAnswer" resultType="com.mindskip.xzs.domain.ExamPaperAnswer"> SELECT id, user_score FROM t_exam_paper_answer WHERE exam_paper_id = #{examPaperId} AND create_user = #{createUser} - HAVING MAX(user_score) ORDER BY create_time DESC LIMIT 1 + ORDER BY user_score DESC LIMIT 1 </select> </mapper> -- Gitblit v1.8.0