无关风月
2026-02-27 89182ea612a57f812b2a1d9a0b465953f2067686
ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/service/impl/TStudyServiceImpl.java
@@ -161,9 +161,9 @@
                    .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));
@@ -427,6 +427,7 @@
    @Override
    public StudyListenResultVO listenSelectPicture(Integer week, Integer day, List<TStudyListen> studyListens, Integer userid) {
        if (studyListens.isEmpty()) {
            System.err.println("当前学习周目题目数量不足2222222");
            throw new GlobalException("当前学习周目题目数量不足!");
        }
        // 题组信息
@@ -595,6 +596,8 @@
    @Override
    public R<StudyLookResultVO> pictureSelectVoice(Integer week, Integer day, List<TStudyLook> lookList, Integer userid) {
        if (lookList.isEmpty()) {
            System.err.println("当前学习周目题目数量不足3333333");
            throw new GlobalException("当前学习周目题目数量不足!");
        }
        // 题组信息
@@ -734,6 +737,8 @@
    @Override
    public R<StudyInductionResultVO> induceExclude(Integer week, Integer day, List<TStudyInduction> inductionList, Integer userid) {
        if (inductionList.isEmpty()) {
            System.err.println("当前学习周目题目数量不足4444444");
            throw new GlobalException("当前学习周目题目数量不足!");
        }
        // 题组信息
@@ -912,12 +917,18 @@
    @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("当前学习周目题目数量不足");
        }
        // 题组信息
@@ -1079,6 +1090,8 @@
    @Override
    public R<StudyPairResultVO> pictureMateVoice(Integer week, Integer day, List<TStudyPair> pair, Integer userid) {
        if (pair.isEmpty()) {
            System.err.println("当前学习周目题目数量不足8888888");
            throw new GlobalException("当前学习周目题目数量不足!");
        }
        // 题组信息