he2802 3 éve
szülő
commit
27b332a80a

+ 5 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterSectionServiceImpl.java

@@ -140,10 +140,14 @@ public class CourseChapterSectionServiceImpl extends ServiceImpl<CourseChapterSe
     @Override
     public List<CourseUserChapterSectionVo> sectionList(CourseMenuQueryBo bo) {
         List<CourseUserChapterSectionVo> courseUserChapterSectionVos = courseChapterSectionMapper.sectionList(bo);
-        List<CourseUserChapterSectionVo> examList = courseChapterSectionMapper.examList(bo);
+        List<CourseUserChapterSectionVo> examList = null;
         if (!CollectionUtils.isEmpty(courseUserChapterSectionVos)) {
+            bo.setModuleId(courseUserChapterSectionVos.get(0).getModuleId());
+            bo.setChapterId(courseUserChapterSectionVos.get(0).getChapterId());
+            examList = courseChapterSectionMapper.examList(bo);
             courseUserChapterSectionVos.addAll(examList);
         }else{
+            examList = courseChapterSectionMapper.examList(bo);
             courseUserChapterSectionVos = examList;
         }
         if (bo.getUserId() != null) {