|
@@ -52,6 +52,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="totalScore" column="total_score"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.user.vo.UserExamWrongRecordVo" id="UserExamRecordQuestionVoResult">
|
|
|
+ <result property="wrongId" column="wrong_id"/>
|
|
|
+ <result property="recordId" column="record_id"/>
|
|
|
+ <result property="questionId" column="question_id"/>
|
|
|
+ <result property="userId" column="user_id"/>
|
|
|
+ <result property="goodsId" column="goods_id"/>
|
|
|
+ <result property="examId" column="exam_id"/>
|
|
|
+
|
|
|
+
|
|
|
+ <result property="examName" column="exam_name"/>
|
|
|
+ <result property="wrongQuestionNum" column="wrong_question_num"/>
|
|
|
+ <result property="type" column="type"/>
|
|
|
+ <result property="num" column="num"/>
|
|
|
+
|
|
|
+ <result property="content" column="content"/>
|
|
|
+ <result property="type" column="type"/>
|
|
|
+ <result property="answerQuestion" column="answer_question"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="analysisContent" column="analysis_content"/>
|
|
|
+ <result property="imgUrl" column="img_url"/>
|
|
|
+ <result property="jsonStr" column="json_str"/>
|
|
|
+ <result property="prefixName" column="prefix_name"/>
|
|
|
+ <result property="knowledgeIds" column="knowledge_ids"/>
|
|
|
+ <result property="publishStatus" column="publish_status"/>
|
|
|
+ <result property="code" column="code"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.user.bo.UserExamRecordQueryBo" resultMap="UserExamRecordVoResult">
|
|
|
SELECT
|
|
|
ue.*,
|
|
@@ -132,4 +159,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN exam e ON e.exam_id = uer.exam_id
|
|
|
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getExamRecordRightList" parameterType="com.zhongzheng.modules.user.bo.UserExamRecordQueryBo" resultMap="UserExamRecordQuestionVoResult">
|
|
|
+ SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ question
|
|
|
+ WHERE
|
|
|
+ FIND_IN_SET(
|
|
|
+ question_id,(
|
|
|
+ SELECT
|
|
|
+ right_question_ids
|
|
|
+ FROM
|
|
|
+ user_exam_record uer
|
|
|
+ WHERE
|
|
|
+ uer.user_id = #{userId}
|
|
|
+ AND uer.goods_id = #{goodsId}
|
|
|
+ AND uer.exam_id = #{examId}
|
|
|
+ ORDER BY
|
|
|
+ record_id DESC
|
|
|
+
|
|
|
+ LIMIT 1 ))
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getExamRecordWrongList" parameterType="com.zhongzheng.modules.user.bo.UserExamRecordQueryBo" resultMap="UserExamRecordQuestionVoResult">
|
|
|
+ SELECT
|
|
|
+ q.*
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ question_id
|
|
|
+ FROM
|
|
|
+ user_exam_wrong_record
|
|
|
+ WHERE
|
|
|
+ record_id = ( SELECT record_id FROM user_exam_record uer WHERE uer.user_id = #{userId} AND uer.exam_id = #{examId} AND uer.goods_id = #{goodsId} ORDER BY record_id DESC LIMIT 1 )) uewr
|
|
|
+ LEFT JOIN question q ON q.question_id = uewr.question_id
|
|
|
+
|
|
|
+ </select>
|
|
|
</mapper>
|