|
@@ -22,13 +22,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="userId" column="user_id"/>
|
|
|
<result property="goodsId" column="goods_id"/>
|
|
|
<result property="examId" column="exam_id"/>
|
|
|
- <result property="createTime" column="create_time"/>
|
|
|
- <result property="updateTime" column="update_time"/>
|
|
|
+
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<resultMap type="com.zhongzheng.modules.bank.vo.QuestionVo" id="QuestionResultVo">
|
|
@@ -54,16 +65,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
user_exam_wrong_record uew
|
|
|
LEFT JOIN exam e ON uew.exam_id = e.exam_id
|
|
|
+ LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
|
|
|
WHERE
|
|
|
uew.user_id = #{userId}
|
|
|
<if test="goodsId != null and goodsId != ''">
|
|
|
AND uew.goods_id = #{goodsId}
|
|
|
</if>
|
|
|
+ <if test="paperId != null and paperId != ''">
|
|
|
+ AND e.exam_paper_id = #{paperId}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
e.exam_id
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectQuestionList" parameterType="com.zhongzheng.modules.user.bo.UserExamWrongRecordQueryBo" resultMap="QuestionResultVo">
|
|
|
+ <select id="selectQuestionList" parameterType="com.zhongzheng.modules.user.bo.UserExamWrongRecordQueryBo" resultMap="UserExamWrongRecordVoResult">
|
|
|
SELECT DISTINCT
|
|
|
q.*
|
|
|
FROM
|
|
@@ -90,6 +105,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
( SELECT * FROM user_exam_wrong_record WHERE user_id = #{userId} ) uew
|
|
|
LEFT JOIN question q ON uew.question_id = q.question_id
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
+ AND uew.goods_id = #{goodsId}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
q.type
|
|
|
</select>
|
|
@@ -106,6 +126,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="type != null and type != ''">
|
|
|
AND q.type = #{type}
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
+ AND uew.goods_id = #{goodsId}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|