|
@@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
user_exam_wrong_record uew
|
|
user_exam_wrong_record uew
|
|
LEFT JOIN exam e ON uew.exam_id = e.exam_id
|
|
LEFT JOIN exam e ON uew.exam_id = e.exam_id
|
|
LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
|
|
LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
|
|
|
|
+ LEFT JOIN goods g ON g.goods_id = uew.goods_id
|
|
WHERE
|
|
WHERE
|
|
uew.user_id = #{userId}
|
|
uew.user_id = #{userId}
|
|
<if test="goodsId != null and goodsId != ''">
|
|
<if test="goodsId != null and goodsId != ''">
|
|
@@ -70,6 +71,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="paperId != null and paperId != ''">
|
|
<if test="paperId != null and paperId != ''">
|
|
AND e.exam_paper_id = #{paperId}
|
|
AND e.exam_paper_id = #{paperId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
|
+ AND g.education_type_id = #{educationTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
|
+ </if>
|
|
GROUP BY
|
|
GROUP BY
|
|
e.exam_id
|
|
e.exam_id
|
|
ORDER BY
|
|
ORDER BY
|
|
@@ -114,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
AND e.exam_paper_id = #{paperId}
|
|
AND e.exam_paper_id = #{paperId}
|
|
</if>) uew
|
|
</if>) uew
|
|
LEFT JOIN question q ON uew.question_id = q.question_id
|
|
LEFT JOIN question q ON uew.question_id = q.question_id
|
|
|
|
+ LEFT JOIN goods g ON g.goods_id = uew.goods_id
|
|
WHERE
|
|
WHERE
|
|
1 = 1
|
|
1 = 1
|
|
<if test="goodsId != null and goodsId != ''">
|
|
<if test="goodsId != null and goodsId != ''">
|
|
@@ -122,6 +130,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="orderGoodsId != null and orderGoodsId != ''">
|
|
<if test="orderGoodsId != null and orderGoodsId != ''">
|
|
AND uew.order_goods_id = #{orderGoodsId}
|
|
AND uew.order_goods_id = #{orderGoodsId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
|
+ AND g.education_type_id = #{educationTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
|
+ </if>
|
|
GROUP BY
|
|
GROUP BY
|
|
q.type
|
|
q.type
|
|
</select>
|
|
</select>
|