he2802 %!s(int64=2) %!d(string=hai) anos
pai
achega
9cb6a06ad3

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -130,7 +130,7 @@ certificate:
 
 liveGotoURL: http://120.79.166.78:19014/
 
-enCodeVersion: develop
+enCodeVersion: release
 
 oldStudySys:
     syncPath: http://gdxypx.xy.com/System/BussinessApi/PostUserStudyRecords

+ 11 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleChapterServiceImpl.java

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -109,14 +110,17 @@ public class CourseModuleChapterServiceImpl extends ServiceImpl<CourseModuleChap
     @Override
     public List<CourseUserModuleChapterVo> chapterList(CourseMenuQueryBo bo) {
         List<CourseUserModuleChapterVo> courseUserModuleChapterVos = baseMapper.chapterList(bo);
-        if (!CollectionUtils.isEmpty(courseUserModuleChapterVos)) {
-            List<CourseUserModuleChapterVo> examList = baseMapper.examList(bo);
-            for(CourseUserModuleChapterVo vo : examList){
-                Integer learning = baseMapper.learningExamCheck(0L, vo.getGradeId(), bo.getUserId(), bo.getModuleId(), bo.getChapterId(), vo.getTypeId(),bo.getCourseId());
-                if(Validator.isNotEmpty(learning)){
-                    vo.setLearning(new Long(learning));
-                }
+        List<CourseUserModuleChapterVo> examList = baseMapper.examList(bo);
+        for(CourseUserModuleChapterVo vo : examList){
+            Integer learning = baseMapper.learningExamCheck(0L, vo.getGradeId(), bo.getUserId(), bo.getModuleId(), bo.getChapterId(), vo.getTypeId(),bo.getCourseId());
+            if(Validator.isNotEmpty(learning)){
+                vo.setLearning(new Long(learning));
             }
+        }
+        if (!CollectionUtils.isEmpty(courseUserModuleChapterVos)) {
+            courseUserModuleChapterVos.addAll(examList);
+        }else{
+            courseUserModuleChapterVos = new ArrayList<>();
             courseUserModuleChapterVos.addAll(examList);
         }