|
|
@@ -47,9 +47,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
3 as type
|
|
|
<if test="userId != null ">
|
|
|
,
|
|
|
- ifnull( (select `status` from user_exam_record uer where uer.exam_id = e.exam_id and uer.user_id = #{userId} and uer.goods_id = #{goodsId} ORDER BY uer.record_id desc limit 1),-1) record_status
|
|
|
+ ifnull( (select `status` from user_exam_record uer where uer.exam_id = e.exam_id and uer.user_id = #{userId} and uer.goods_id = #{goodsId} and uer.chapter_exam_id = qce.chapter_exam_id and uer.module_exam_id = #{moduleExamId} ORDER BY uer.record_id desc limit 1),-1) record_status
|
|
|
,
|
|
|
- ifnull( (select record_id from user_exam_record uer where uer.exam_id = e.exam_id and uer.user_id = #{userId} and uer.goods_id = #{goodsId} ORDER BY uer.record_id desc limit 1),-1) record_id
|
|
|
+ ifnull( (select record_id from user_exam_record uer where uer.exam_id = e.exam_id and uer.user_id = #{userId} and uer.goods_id = #{goodsId} and uer.chapter_exam_id = qce.chapter_exam_id and uer.module_exam_id = #{moduleExamId} ORDER BY uer.record_id desc limit 1),-1) record_id
|
|
|
</if>
|
|
|
FROM
|
|
|
question_chapter_exam qce
|