Skip to content

Commit

Permalink
feat: 회원 탈퇴시 행사 삭제 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee authored and pakxe committed Feb 5, 2025
1 parent 2cdd2c9 commit b1abb3d
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 @@ -241,4 +241,11 @@ private void deleteEvent(String token, Long userId) {

eventRepository.delete(event);
}

@Async
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public void handleUserDelete(UserDeleteEvent userDeleteEvent) {
Long userId = userDeleteEvent.id();
eventRepository.deleteByUserId(userId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class UserService {


private final UserRepository userRepository;
private final ApplicationEventPublisher eventPublisher;

@Transactional
public Long joinGuest(UserGuestSaveAppRequest request) {
Expand Down

0 comments on commit b1abb3d

Please sign in to comment.