| | |
| | | } |
| | | |
| | | @Override |
| | | public List<StudentStudyVO> selectStudyByPhaseAndStundentId(Long phaseId,Long studentId) { |
| | | public List<StudentStudyVO> selectStudyByPhaseAndStundentId(Long phaseId,Long studentId,Integer status) { |
| | | ExCoursePhase coursePhase=coursePhaseMapper.selectById(phaseId); |
| | | Long courseId=coursePhase.getCourseId(); |
| | | List<ExStudentStudy> studentStudyList= baseMapper.selectStudyByPhaseAndStudentId(phaseId,courseId,studentId); |
| | | Map<Long,ExStudentStudy> studentStudyMap=studentStudyList.stream().collect(Collectors.toMap(ExStudentStudy::getPeriodId, item->item)); |
| | | List<ExCourseChapter> courseChapterList=courseChapterService.selectChapterByCourseId(courseId); |
| | | List<ExCourseChapter> courseChapterList=courseChapterService.selectChapterByCourseId(courseId, status); |
| | | List<StudentStudyVO> studentStudyVOList=courseChapterList.stream().map(item ->{ |
| | | StudentStudyVO studentStudyVO=new StudentStudyVO(); |
| | | studentStudyVO.setChapterId(item.getId()); |
| | |
| | | studentStudyPeriodVO.setPeriodName(courseChapterPeriod.getName()); |
| | | studentStudyPeriodVO.setPeriodId(courseChapterPeriod.getId()); |
| | | studentStudyPeriodVO.setPeriod(courseChapterPeriod.getPeriod()); |
| | | studentStudyPeriodVO.setResourceId(courseChapterPeriod.getResourceId()); |
| | | ExStudentStudy exStudentStudy=studentStudyMap.get(courseChapterPeriod.getId()); |
| | | if(exStudentStudy!=null){ |
| | | studentStudyPeriodVO.setProgress(exStudentStudy.getProgress()); |