From 12b7bf2629926c8acbd451f48aa815a2fb59fa50 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期三, 13 十一月 2024 11:51:17 +0800 Subject: [PATCH] 优化错题详情 --- src/main/resources/mapper/ExamPaperScoreMapper.xml | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/ExamPaperScoreMapper.xml b/src/main/resources/mapper/ExamPaperScoreMapper.xml index 0c5d29f..ab1d0fa 100644 --- a/src/main/resources/mapper/ExamPaperScoreMapper.xml +++ b/src/main/resources/mapper/ExamPaperScoreMapper.xml @@ -176,7 +176,19 @@ from t_exam_paper_score where user_id = #{userId} </select> - <select id="selectWrong" resultType="com.ycl.jxkg.domain.vo.student.wrong.WrongResponseVO"> - + <select id="checkWrong" resultType="com.ycl.jxkg.domain.entity.ExamPaperScore"> + SELECT + <include refid="Base_Column_List"/> + from t_exam_paper_score AS eps, + JSON_TABLE(paper_content, '$[*]' COLUMNS( + questionType INT PATH '$.questionType', + questionId INT PATH '$.questionList[*].questionId' + )) AS pc + <where> + eps.exam_id = #{examId} + AND eps.user_id = #{userId} + AND pc.questionType = #{questionType} + AND pc.questionId = #{questionId} + </where> </select> </mapper> -- Gitblit v1.8.0