he2802 3 жил өмнө
parent
commit
79bb66d173

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseChapterSectionMapper.java

@@ -35,6 +35,6 @@ public interface CourseChapterSectionMapper extends BaseMapper<CourseChapterSect
     Integer auditCheck(@Param("typeId") Long typeId,@Param("gradeId") Long gradeId,
                        @Param("userId") Long userId,@Param("moduleId") Long moduleId,@Param("chapterId") Long chapterId,@Param("examId") Long examId);
 
-    Long learningExamCheck(@Param("typeId") Long typeId,@Param("gradeId") Long gradeId,
+    Integer learningExamCheck(@Param("typeId") Long typeId,@Param("gradeId") Long gradeId,
                           @Param("userId") Long userId,@Param("moduleId") Long moduleId,@Param("chapterId") Long chapterId,@Param("examId") Long examId);
 }

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterSectionServiceImpl.java

@@ -162,8 +162,9 @@ public class CourseChapterSectionServiceImpl extends ServiceImpl<CourseChapterSe
                     if (rebuild > 0) {
                         courseMenuVo.setAudit(1L);
                     }
-                    Long learning = baseMapper.learningExamCheck(0L, courseMenuVo.getGradeId(), bo.getUserId(), bo.getModuleId(), bo.getChapterId(), courseMenuVo.getTypeId());
-                    courseMenuVo.setLearning(learning);
+                    Integer learning = baseMapper.learningExamCheck(0L, courseMenuVo.getGradeId(), bo.getUserId(), bo.getModuleId(), bo.getChapterId(), courseMenuVo.getTypeId());
+
+                    courseMenuVo.setLearning(new Long(learning));
                 }
             }
         }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseChapterSectionMapper.xml

@@ -202,7 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="learningExamCheck" parameterType="map"  resultType="integer">
         SELECT
-            ubr.report_status
+            IFNULL(ubr.report_status,0)
         FROM
             user_bank_record ubr
         WHERE

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -297,7 +297,7 @@
         class_grade_user cgu
         LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
         LEFT JOIN `user` u ON u.user_id = cgu.user_id
-        where 1=1 AND cgu.change_grade = 0
+        where 1=1 
         <if test="userId != null and userId !='' ">
             and u.user_id = #{userId}
         </if>