Browse Source

fix 学习记录

he2802 3 năm trước cách đây
mục cha
commit
5b24551876

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

@@ -224,6 +224,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         any_value ( usr.section_id ) section_id
         FROM
         ( SELECT * FROM user_study_record WHERE 1=1
+        AND module_id = 0
+        AND chapter_id = 0
          AND current_status = 1
         <if test="userId != null and userId !=''">
                 AND user_id = #{userId}
@@ -274,6 +276,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gradeId != null and gradeId !=''">
                 AND grade_id = #{gradeId}
             </if>
+            AND module_id = 0
+            AND chapter_id = c.chapter_id
             AND course_id = #{courseId} ORDER BY record_id DESC LIMIT 9999 ) usr
             GROUP BY
             usr.section_id) usr1 on s.section_id = usr1.section_id
@@ -306,6 +310,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         any_value ( usr.section_id ) section_id
         FROM
         ( SELECT * FROM user_study_record WHERE 1=1
+        AND module_id = e.module_id
+        AND chapter_id = c.chapter_id
         <if test="userId != null and userId !=''">
             AND user_id = #{userId}
         </if>