fix: 피드백 빨간점 읽음 처리 (#131) - #132
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough영상 상세 조회 시 해당 영상의 미읽은 Changes영상 피드백 알림 읽음 처리
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant VideoService
participant NotificationService
participant NotificationRepository
VideoService->>NotificationService: 영상 피드백 알림 읽음 처리 호출
NotificationService->>NotificationRepository: 사용자·영상 기준 일괄 업데이트
NotificationRepository-->>NotificationService: 변경된 알림 수 반환
NotificationService-->>VideoService: 영상 상세 정보 반환
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java`:
- Around line 106-117: 수정 쿼리의 `@Modifying` 설정에서 clearAutomatically 옵션을 제거하고
flushAutomatically는 유지하세요. 이렇게 NotificationRepository의 읽음 처리 후에도
VideoRepository.findByIdAndProjectId()가 반환한 video의 lazy project가 DTO 생성 시점까지
초기화될 수 있도록 기존 영속성 컨텍스트를 보존하세요.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f16d5a80-94b1-487b-b22f-f9c7bf7b3fe2
📒 Files selected for processing (3)
src/main/java/com/slatto/domain/notification/repository/NotificationRepository.javasrc/main/java/com/slatto/domain/notification/service/NotificationService.javasrc/main/java/com/slatto/domain/video/service/VideoService.java
chazy-d
left a comment
There was a problem hiding this comment.
수고하셨습니다~ 쿼리가 V004의 idx_notification_group_lookup (user_id, type, target_type, target_id, is_read)를 조건 순서까지 정확히 타고가서 인덱스 추가 없이 붙은 점이 좋은것 같습니다.
🔗 관련 이슈 (Related Issue)
Closes #131
📝 작업 내용
사용자와 영상을 기준으로 미읽은 VIDEO_FEEDBACK_COMMENTED 알림을 읽음 처리하는 쿼리를 추가했
습니다.
영상 피드백 알림 읽음 처리 서비스 로직을 추가했습니다.
영상 상세 조회 시 해당 영상의 피드백 알림이 읽음 처리되도록 연동했습니다.
삭제된 알림, 이미 읽은 알림, 다른 사용자 및 다른 영상의 알림은 처리 대상에서 제외했습니다.
✅ PR 체크리스트
Summary by CodeRabbit