feat: 인앱 알림(notification_log) 도메인 구현#23
Open
2nayeon wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 사항
1. notification_log 도메인 신규 구현
NotificationLog엔티티/Repository/Service/ControllerGET /api/notification: 알림 목록 조회 (최신순)PATCH /api/notification/{notificationId}/read: 읽음 처리 (본인 알림만 가능하도록 체크)NotificationLogService.saveLog(): 다른 도메인에서 알림 기록을 남길 때 사용하는 공용 메소드2. 복약 완료/미응답 알림 연동
PillLogService.confirmPill(): WARD가 복약 확인 시 보호자에게 실시간 알림 발송 + notification_log 저장PillNotificationScheduler.notifyProtector(): 3회 미응답 시 notification_log 저장 추가3. 재알림 스케줄러 버그 수정
finally블록으로 이동해 발송 성공 여부와 무관하게 카운트되도록 수정@Transactional누락으로 재시도 횟수/보호자 알림 처리가 실제 DB에 반영되지 않던 문제 수정 (재알림 로직이 3회 이후 보호자 알림까지 도달 못 하던 심각한 버그)배경
"보호자 알림" 화면(복약 완료/미이행 알림 목록) 구현을 위한 백엔드 작업. 화면 시안 확인 중 재알림 로직 테스트하다가 트랜잭션 관련 버그를 추가로 발견하여 함께 수정함.
테스트
참고
report도메인 미구현으로 이번 범위에서 제외 (추후 별도 작업 예정)