Skip to content

[RERF] 알림 콘텐츠 삭제 시 알림 상태에서도 삭제 #177

@GANGHYEON02

Description

@GANGHYEON02

📌 연관 이슈

  • Closes #

📊 작업 우선순위

  • P0 : 서비스 핵심 동작
  • P1 : 운영 및 확장 기능
  • P2 : 부가적인 고도화 기능

♻️ 리팩토링 목적 및 대상

  • 연관 도메인 : notification, notice, community, course
  • As-Is (변경 전) : 공지/게시글/강의가 삭제되어도 해당 컨텐츠와 연관된 알림이 DB에 그대로 남아 있어 사용자 알림함에 삭제된 컨텐츠로 이동하는 링크가 노출됨
  • To-Be (변경 후) : 공지/게시글/강의 삭제 시 해당 redirectUrl을 가진 알림도 함께 삭제하여 알림함의 데이터 정합성 유지

💻 상세 작업 내용

  • Model / Policy:
  • UseCase / Command:
  • Service: NoticeCommandService, PostCommandService, CourseCommandService — 각 삭제 메서드에 알림 삭제 로직 추가
  • Port / Adapter: NotificationRepositoryAdapterdeleteByRedirectUrlStartingWith() 구현 추가
  • Repository: NotificationRepository (인터페이스), SpringDataNotificationRepositorydeleteByRedirectUrlStartingWith() 메서드 추가
  • Controller:
  • response / request:

🚨 검증 및 사이드 이펙트 확인 (TestCode)

  • 기존 정상 동작 테스트 케이스 통과 확인
  • 예외(Exception) 처리 로직 유지 및 assertThrows 검증 통과 확인
  • (필요시) 변경된 구조에 맞춘 새로운 단위 테스트 작성

⚠️ 확인 사항

  • API 응답값(response DTO) 형태의 변경이 있나요? No
  • 만약 변경되었다면, 프론트엔드 개발자에게 공유되었나요? 해당 없음

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions