|
@@ -138,41 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
e.exam_id
|
|
|
ORDER BY
|
|
|
create_time desc
|
|
|
- UNION ALL
|
|
|
- SELECT
|
|
|
- e.exam_id,
|
|
|
- e.exam_name,
|
|
|
- e.create_time,
|
|
|
- COUNT( cq.question_id ) question_num,
|
|
|
- 3 AS do_mode
|
|
|
- FROM
|
|
|
- collect_question cq
|
|
|
- LEFT JOIN exam_simulate e ON cq.exam_id = e.exam_id
|
|
|
- LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
|
|
|
- LEFT JOIN goods g ON g.goods_id = cq.goods_id
|
|
|
- WHERE
|
|
|
- 1 = 1
|
|
|
- AND cq.do_mode = 3
|
|
|
- AND cq.user_id = #{userId}
|
|
|
- <if test="paperId != null and paperId != ''">
|
|
|
- AND e.exam_paper_id = #{paperId}
|
|
|
- </if>
|
|
|
- <if test="goodsId != null and goodsId != ''">
|
|
|
- AND cq.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- <if test="orderGoodsId != null and orderGoodsId != ''">
|
|
|
- AND cq.order_goods_id = #{orderGoodsId}
|
|
|
- </if>
|
|
|
- <if test="businessId != null and businessId != ''">
|
|
|
- AND g.business_id = #{businessId}
|
|
|
- </if>
|
|
|
- <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
- AND g.education_type_id = #{educationTypeId}
|
|
|
- </if>
|
|
|
- GROUP BY
|
|
|
- e.exam_id
|
|
|
- ORDER BY
|
|
|
- create_time desc
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
<select id="selectExamQuestionList" parameterType="com.zhongzheng.modules.collect.bo.CollectQuestionQueryBo" resultMap="QuestionResultVo">
|