feat: 알림 모두 읽음 처리 API 추가 - #374
Conversation
유저가 자신의 읽지 않은 모든 알림을 한 번에 읽음 처리할 수 있도록 POST /notifications/check-all 엔드포인트를 추가한다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Walkthrough사용자별 모든 미확인 알림을 읽음 상태로 변경하는 Changes알림 전체 읽음 처리
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant NotificationCommandController
participant NotificationMarkService
participant NotificationJpaRepository
Client->>NotificationCommandController: POST /notifications/check-all
NotificationCommandController->>NotificationMarkService: markAllToChecked(userId)
NotificationMarkService->>NotificationJpaRepository: 미확인 알림 일괄 갱신
NotificationJpaRepository-->>NotificationMarkService: 변경 행 수 반환
NotificationMarkService-->>NotificationCommandController: 처리 완료
NotificationCommandController-->>Client: 200 OK
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Test Results500 tests 500 ✅ 46s ⏱️ Results for commit b744eaf. |
Summary
POST /notifications/check-allAPI 추가POST /notifications/check)와 동일한 계층 구조(Controller → UseCase → Service → Port → Adapter)를 따름NotificationJpaRepository에@ModifyingJPQL 벌크 업데이트 쿼리 추가 (is_checked=false인 알림만 대상)Test plan
./gradlew compileJava성공NotificationMarkAllToCheckedApiTest신규 작성 및 통과 (본인 알림만 읽음 처리, 타 유저 알림 미영향 / 읽지 않은 알림 없을 때도 정상 동작)konkuk.thip.notification.*전체 테스트 통과 (회귀 없음)🤖 Generated with Claude Code
Summary by CodeRabbit
새 기능
테스트