he2802 пре 2 година
родитељ
комит
258ea33435

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -507,11 +507,11 @@
         JOIN question_module_chapter a on e.major_id = a.module_exam_id LEFT JOIN question_chapter_exam h on
         a.chapter_exam_id = h.chapter_exam_id where e.goods_id = g.goods_id and e.type=1) FROM goods_attached a where
         a.goods_id=g.goods_id and a.type = 3) as exam_num,
-        (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.user_id = #{userId} ORDER BY
+        (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
         create_time ASC LIMIT 1) as start_time,
-        (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.user_id = #{userId} ORDER BY
+        (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
         create_time DESC LIMIT 1) as end_time,
-        (SELECT COUNT(DISTINCT exam_id) FROM user_exam_record r where r.goods_id=g.goods_id AND r.user_id = #{userId})
+        (SELECT COUNT(DISTINCT exam_id) FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId})
         as stu_all_num,
         s.service_start_time,
         s.service_end_time