Skip to content

Commit

Permalink
Feat : 개념학습, 퀴즈 퀘스트 완료 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen-ing committed Feb 3, 2025
1 parent 8490533 commit cbd437e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.ripple.BE.learning.service.learningset.LearningSetService;
import com.ripple.BE.user.domain.User;
import com.ripple.BE.user.domain.type.Level;
import com.ripple.BE.user.service.AttendanceService;
import com.ripple.BE.user.service.UserProgressService;
import com.ripple.BE.user.service.UserService;
import java.util.List;
Expand All @@ -31,6 +32,7 @@ public class ConceptService {
private final LearningSetService learningSetService;
private final UserService userService;
private final UserProgressService userProgressService;
private final AttendanceService attendanceService;

private final UserLearningSetRepository userLearningSetRepository;
private final ConceptRepository conceptRepository;
Expand Down Expand Up @@ -74,6 +76,8 @@ public void completeConceptLearning(

userProgressService.updateLevel(user);
}

attendanceService.completeQuest(userId, "CONCEPT");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.ripple.BE.learning.service.learningset.LearningSetService;
import com.ripple.BE.user.domain.User;
import com.ripple.BE.user.domain.type.Level;
import com.ripple.BE.user.service.AttendanceService;
import com.ripple.BE.user.service.UserProgressService;
import com.ripple.BE.user.service.UserService;
import java.util.Collections;
Expand All @@ -46,6 +47,7 @@ public class QuizService {
private final LearningSetService learningSetService;
private final UserService userService;
private final UserProgressService userProgressService;
private final AttendanceService attendanceService;

private static final String QUESTION_TYPE = "questions";
private static final String WRONG_ANSWER_TYPE = "wrongAnswer";
Expand Down Expand Up @@ -145,6 +147,8 @@ public void finishQuiz(final long userId, final long learningSetId, final Level
}

quizRedisService.clearRedisKeys(userId); // 퀴즈 진행 관련 데이터 삭제

attendanceService.completeQuest(userId, "QUIZ");
}

@Transactional(readOnly = true)
Expand Down

0 comments on commit cbd437e

Please sign in to comment.