Skip to content

Commit

Permalink
Refactor : 주석 추가 및 불필요 주석 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
chanmin-00 committed Dec 27, 2024
1 parent e6014cd commit 56d9a86
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public class LearningSetCompleteEventListener {
private final LearningSetRepository learningSetRepository;
private final UserRepository userRepository;

/**
* 사용자 추가 시 학습 세트 추가 이벤트 핸들러
*
* @param user
*/
@Transactional
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public void handleLearningSetCompleteEvent(User user) {
Expand All @@ -34,6 +39,11 @@ public void handleLearningSetCompleteEvent(User user) {
userRepository.save(user);
}

/**
* 학습 세트 추가 시 사용자에게 학습 세트 배포 이벤트 핸들러
*
* @param learningSetList
*/
@Transactional
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public void handleLearningSetCompleteEvent(List<LearningSet> learningSetList) {
Expand All @@ -48,7 +58,5 @@ public void handleLearningSetCompleteEvent(List<LearningSet> learningSetList) {
.toList();

userList.forEach(user -> user.getLearningSetCompleteList().addAll(learningSetCompletes));

// userRepository.saveAll(userList);
}
}

0 comments on commit 56d9a86

Please sign in to comment.