| | |
| | | .eq(TStoryListen::getWeek, week) |
| | | .eq(TStoryListen::getDisabled, 0).list(); |
| | | // 自主故事 - 框架记忆 |
| | | total += storyListenList.stream().map(TStoryListen::getIntegral).mapToInt(Integer::intValue).sum(); |
| | | total += storyListenList.stream().map(TStoryListen::getIntegral).filter(Objects::nonNull).mapToInt(Integer::intValue).sum(); |
| | | // 自主故事 - 看图配音 |
| | | total += storyListenList.stream().map(TStoryListen::getLookIntegral).mapToInt(Integer::intValue).sum(); |
| | | total += storyListenList.stream().map(TStoryListen::getLookIntegral).filter(Objects::nonNull).mapToInt(Integer::intValue).sum(); |
| | | // 判断周目是否可以进入学习 |
| | | Boolean canStudy = checkWeekCanStudy(userId, item, week); |
| | | result.add(new StudyWeekDTO(week, type, quarter, title, total, canStudy)); |
| | |
| | | @Override |
| | | public StudyListenResultVO listenSelectPicture(Integer week, Integer day, List<TStudyListen> studyListens, Integer userid) { |
| | | if (studyListens.isEmpty()) { |
| | | System.err.println("当前学习周目题目数量不足2222222"); |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | // 题组信息 |
| | |
| | | @Override |
| | | public R<StudyLookResultVO> pictureSelectVoice(Integer week, Integer day, List<TStudyLook> lookList, Integer userid) { |
| | | if (lookList.isEmpty()) { |
| | | System.err.println("当前学习周目题目数量不足3333333"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | // 题组信息 |
| | |
| | | @Override |
| | | public R<StudyInductionResultVO> induceExclude(Integer week, Integer day, List<TStudyInduction> inductionList, Integer userid) { |
| | | if (inductionList.isEmpty()) { |
| | | System.err.println("当前学习周目题目数量不足4444444"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | // 题组信息 |
| | |
| | | @Override |
| | | public R<StudyAnswerResultVO> questionsAndAnswers(Integer week, Integer day, List<TStudyAnswer> answerList, Integer userid) { |
| | | if (answerList.isEmpty()) { |
| | | System.err.println("当前学习周目题目数量不足555555"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | if (answerList.size() < 4) { |
| | | if (answerList.size() < 2) { |
| | | System.err.println("当前学习周目题目数量不足666666"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | if (answerList.size() % 4 != 0) { |
| | | if (answerList.size() % 2 != 0) { |
| | | System.err.println("当前学习周目题目数量不足7777777"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足"); |
| | | } |
| | | // 题组信息 |
| | |
| | | @Override |
| | | public R<StudyPairResultVO> pictureMateVoice(Integer week, Integer day, List<TStudyPair> pair, Integer userid) { |
| | | if (pair.isEmpty()) { |
| | | System.err.println("当前学习周目题目数量不足8888888"); |
| | | |
| | | throw new GlobalException("当前学习周目题目数量不足!"); |
| | | } |
| | | // 题组信息 |