|
|
@@ -215,6 +215,10 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
vo.setSectionType(sectionVo.getSectionType());
|
|
|
vo.setLiveUrl(sectionVo.getLiveUrl());
|
|
|
vo.setRecordingUrl(sectionVo.getRecordingUrl());
|
|
|
+ Integer learning = courseChapterSectionMapper.learningCheck(vo.getSectionId(), vo.getGradeId(), bo.getUserId(), vo.getModuleId(), vo.getChapterId(), 0L,vo.getCourseId());
|
|
|
+ if (learning > 0) {
|
|
|
+ vo.setLearning(1L);
|
|
|
+ }
|
|
|
}
|
|
|
return vo;
|
|
|
}
|
|
|
@@ -678,6 +682,68 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
return sectionList;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ClassPeriodVo> menuAllListWithExam(UserStudyRecordQueryBo bo) {
|
|
|
+ //存储整个目录节列表
|
|
|
+ List<ClassPeriodVo> sectionList = new ArrayList<>();
|
|
|
+ //获取课程目录
|
|
|
+ List<ClassPeriodVo> list = baseMapper.listMenu(bo);
|
|
|
+ //排序目录
|
|
|
+ Collections.sort(list);
|
|
|
+ for (ClassPeriodVo classPeriodVo : list) {
|
|
|
+ //为模块搜索下面的章 和节
|
|
|
+ if (classPeriodVo.getType() == 1){
|
|
|
+ UserStudyRecordQueryBo moduleQueryBo = new UserStudyRecordQueryBo();
|
|
|
+ moduleQueryBo.setModuleId(classPeriodVo.getId());
|
|
|
+ List<ClassPeriodVo> classPeriodChapterVos = baseMapper.listModuleChapter(moduleQueryBo);
|
|
|
+ //排序章目录
|
|
|
+ Collections.sort(classPeriodChapterVos);
|
|
|
+ for (ClassPeriodVo classChapterVo : classPeriodChapterVos) {
|
|
|
+ UserStudyRecordQueryBo chapterQueryBo = new UserStudyRecordQueryBo();
|
|
|
+ chapterQueryBo.setChapterId(classChapterVo.getId());
|
|
|
+ List<ClassPeriodVo> classPeriodSectionVos = baseMapper.listChapterSection(chapterQueryBo);
|
|
|
+ //排序节目录
|
|
|
+ Collections.sort(classPeriodSectionVos);
|
|
|
+ for (ClassPeriodVo classSectionVo : classPeriodSectionVos) {
|
|
|
+ classSectionVo.setModuleId(classPeriodVo.getId());
|
|
|
+ classSectionVo.setChapterId(classChapterVo.getId());
|
|
|
+ classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ sectionList.add(classSectionVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //为章搜索节记录
|
|
|
+ if (classPeriodVo.getType() == 2){
|
|
|
+ UserStudyRecordQueryBo chapterQueryBo = new UserStudyRecordQueryBo();
|
|
|
+ chapterQueryBo.setChapterId(classPeriodVo.getId());
|
|
|
+ List<ClassPeriodVo> classPeriodSectionVos = baseMapper.listChapterSection(chapterQueryBo);
|
|
|
+ //排序节目录
|
|
|
+ Collections.sort(classPeriodSectionVos);
|
|
|
+ for (ClassPeriodVo classSectionVo : classPeriodSectionVos) {
|
|
|
+ classSectionVo.setModuleId(0L);
|
|
|
+ classSectionVo.setChapterId(classPeriodVo.getId());
|
|
|
+ classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ sectionList.add(classSectionVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //为节搜索学时记录
|
|
|
+ if (classPeriodVo.getType() == 3){
|
|
|
+ classPeriodVo.setModuleId(0L);
|
|
|
+ classPeriodVo.setChapterId(0L);
|
|
|
+ classPeriodVo.setSectionId(classPeriodVo.getId());
|
|
|
+ sectionList.add(classPeriodVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(ClassPeriodVo section : sectionList){
|
|
|
+ section.setGoodsId(bo.getGoodsId());
|
|
|
+ section.setGradeId(bo.getGradeId());
|
|
|
+ section.setUserId(bo.getUserId());
|
|
|
+ section.setCourseId(bo.getCourseId());
|
|
|
+ section.setStudyStatus(baseMapper.getStudyStatus(section));
|
|
|
+ }
|
|
|
+ return sectionList;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<SectionStudyRecordVo> listUserRecord(UserStudyRecordQueryBo bo) {
|
|
|
return this.baseMapper.listUserRecord(bo);
|