Skip to content

Conversation

@chaiminwoo0223
Copy link
Contributor

@chaiminwoo0223 chaiminwoo0223 commented Oct 17, 2025

📌 작업 내용 및 특이사항

✅ TripReport, TripReportStudyLog 연관 엔티티 삭제 및 하드 딜리트 기능 추가

  • TripReportQueryRepository.deleteAllByDeletedMemberOwner()를 통해 삭제된 멤버가 소유한 여행 리포트 삭제
  • TripReportStudyLogQueryRepository.deleteAllByDeletedMemberOwner()를 통해 삭제된 멤버가 소유한 여행 리포트 또는 학습 로그가 존재하면, 연관된 TripReportStudy 삭제
  • TripReportCommandService, TripReportStudyLogCommandService하드 딜리트 비즈니스 로직 추가

✅ HardDeleteFacade에 TripReport, TripReportStudyLog에 하드 딜리트 비즈니스 로직 추가

  • BatchJobScheduler를 통해 매일 04시에 하드 딜리트 삭제 처리 진행
  • HardDeleteExecutor를 통해 배치 처리 로그 기록 작성

✅ 테스트

  • TripReportCommandServiceTestHardDeleteTripReportsOwnedByDeletedMember 단위 테스트 추가
  • TripReportStudyLogCommandServiceTestHardDeleteTripReportStudyLogsOwnedByDeletedMember 단위 테스트 추가

🌱 관련 이슈


🔍 참고사항(선택)

  • StudyLog와 TripReport에 updateDeletedAt()이 없기 때문에, 삭제된 멤버를 기준으로 TripReportStudyLog를 삭제하는 비즈니스 로직을 구현했습니다.

📚 기타(선택)

* feat: TripReportQueryRepository, TripReportQueryRepositoryAdapter 구현
* feat: TripReportStudyLogQueryRepository, TripReportStudyLogQueryRepositoryAdapter 구현
* feat: TripReportCommandService, TripReportStudyLogCommandService에 하드 딜리트 비즈니스 로직 추가
* feat: HardDeleteFacade에 TripReport, TripReportStudyLog에 하드 딜리트 비즈니스 로직 추가

* test: TripReportCommandServiceTest에 HardDeleteTripReportsOwnedByDeletedMember 단위 테스트 추가
* test: TripReportStudyLogCommandServiceTest에 HardDeleteTripReportStudyLogsOwnedByDeletedMember 단위 테스트 추가
@chaiminwoo0223 chaiminwoo0223 self-assigned this Oct 17, 2025
@chaiminwoo0223 chaiminwoo0223 added the ✨feature 구현, 개선 사항 관련 부분 label Oct 17, 2025
Copy link
Contributor

@hisonghy hisonghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생많으셨습니다
병합부탁드릴께요!

@chaiminwoo0223 chaiminwoo0223 merged commit a95a4df into develop Oct 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature 구현, 개선 사항 관련 부분

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨[FEAT]: Spring Batch 기반 TripReport 연관 엔티티 삭제 및 하드 딜리트 기능 추가

3 participants