From 887b9a1e00744c353e72b45de87aba40faf20e28 Mon Sep 17 00:00:00 2001 From: NARUBROWN Date: Fri, 29 Nov 2024 14:34:19 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=EC=B1=95=ED=84=B0=20=EB=8B=A8=20?= =?UTF-8?q?=EA=B1=B4=20=EC=A1=B0=ED=9A=8C=EC=97=90=EC=84=9C=20=EB=B3=B4?= =?UTF-8?q?=EC=83=81=20=EC=88=98=EB=A0=B9=20=EB=B2=84=ED=8A=BC=EC=9D=B4=20?= =?UTF-8?q?True=EB=A1=9C=20=EB=B0=94=EB=80=8C=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8D=98=20=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=ED=95=B4=EA=B2=B0?= =?UTF-8?q?=ED=96=88=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codingland/domain/chapter/service/ChapterService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/domain/src/main/java/com/codingland/domain/chapter/service/ChapterService.java b/domain/src/main/java/com/codingland/domain/chapter/service/ChapterService.java index cd8e68f..0917df8 100644 --- a/domain/src/main/java/com/codingland/domain/chapter/service/ChapterService.java +++ b/domain/src/main/java/com/codingland/domain/chapter/service/ChapterService.java @@ -65,16 +65,16 @@ public ResponseChapterDto getChapter(Long chapter_id, Long user_id) { IsChapterCleared foundIsChapterCleared = isChapterClearedRepository.findByChapterAndUser(foundChapter, foundUser) .orElse(null); + List clearedQuizzes = isQuizClearedRepository.findAllByUserAndQuizIn(foundUser, foundChapter.getQuizzes()); + Set clearedQuizzesIds = new HashSet<>(); + List quizIds = new ArrayList<>(); for (Quiz quiz : foundChapter.getQuizzes()) { quizIds.add(quiz.getId()); } - List clearedQuizzes = isQuizClearedRepository.findAllByUserAndQuizIn(foundUser, foundChapter.getQuizzes()); - Set clearedQuizzesIds = new HashSet<>(); - for (IsQuizCleared clearedQuiz : clearedQuizzes) { - clearedQuizzesIds.add(clearedQuiz.getId()); + clearedQuizzesIds.add(clearedQuiz.getQuiz().getId()); } boolean buttonActiveState = true;