소스 검색

fix 题库

he2802 3 년 전
부모
커밋
0283c1e6d0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionChapterExamMapper.xml

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionChapterExamMapper.xml

@@ -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