Repository navigation
Conversation
github-actions
Bot
requested review from
jjunh33,
leegain1,
sangrae2325 and
xeoxxn
October 13, 2026 09:45
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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 |
This was referenced Oct 13, 2026
tnals0924
added this pull request to stack #122
October 14, 2026 07:31
sangrae2325
approved these changes
Oct 15, 2026
| public void createDefaultIfAbsent(Long memberId) { | ||
| if (memberNotificationSettingRepository.existsByMemberId(memberId)) { | ||
| return; | ||
| } |
Collaborator
There was a problem hiding this comment.
재가입 하는 회원의 기존 알림 설정을 유지하기 위한 덮어쓰지 않고 그냥 두는 점 이해했습니다!
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.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
학생 앱 알림 설정 화면에서 카테고리별 푸시 수신 여부를 조회·수정하는 API를 추가합니다.
rentalEnabledeventEnablednoticeEnabledlockerEnabled전체 알림은 저장하지 않습니다. 앱이 네 값이 모두
true면 켜진 것으로 보여주고, 전체 알림을 누르면 네 값을 한꺼번에true나false로 보내면 됩니다.❓ 왜 해결해야 하나요?
FCM을
notification페이로드로 보내므로 앱이 백그라운드나 종료 상태일 때는 OS가 알림을 바로 띄웁니다. Android는onMessageReceived가 불리지 않고, iOS는 알림을 숨기려면 Apple 승인이 필요한 entitlement가 있어야 합니다. 앱에서 받은 알림을 걸러낼 수 없으니 설정을 서버에 두고 발송할 때 걸러야 합니다.V1에
member_notification_settings테이블과 도메인·엔티티는 있었지만, 값을 읽고 쓰는 경로가 없었습니다.⭐ 어떻게 해결했나요?
MemberNotificationSettingService(notification 도메인)를 새로 만들고 컨트롤러가 바로 부릅니다.MemberNotificationSetting.update가 바뀌었는지 돌려주고, 바뀐 값이 없으면 저장하지 않습니다(Member.updateFcmToken과 같은 방식).MemberSignUpUseCase를 거치도록 바꿨습니다.MemberService.signUp과 기본 설정 생성(모두 켜짐)을 한 트랜잭션으로 묶습니다.RentalApplyUseCase와 같은 구조).createDefaultIfAbsent). 그 회원이 바꿔 둔 값은 그대로 남습니다.V17__insert_default_member_notification_settings.sql이 설정이 없는 활성 회원 전원에게 기본 설정을 만듭니다. 아직 가입을 마치지 않은 회원도 포함되고, 나중에 가입하면 이미 있는 설정을 그대로 씁니다.NotificationErrorCode.NOTIFICATION_SETTING_NOT_FOUND(404)🧩 이 PR의 한계 & 트레이드오프
PushNotificationClient를 호출해 푸시를 보내는 코드가 없습니다. 이번 PR은 설정 저장까지만 다룹니다. 발송을 구현할 때 꺼진 카테고리는 푸시만 보내지 않고 알림함(notifications)에는 저장하기로 정했습니다(Swagger 설명에도 적어 둠).ModularityTests·DomainImplAccessTests까지만 확인했습니다. V17 마이그레이션과 API 호출은 dev에서 확인이 필요합니다.⛓️ 기존 기능에 미치는 영향
POST /v1/app/members/sign-up)이 성공하면member_notification_settings에 row가 하나 생깁니다. 요청·응답 형식은 바뀌지 않습니다.알림이 생깁니다.🔀 Edge Case & 실패 시나리오
INVALID_INPUTNOTIFICATION_SETTING_NOT_FOUNDuk_member_notification_settings_member_id) 위반으로 한쪽이 500입니다. 같은 경합에서 약관 동의 저장도 이미 유니크 키로 실패하므로 따로 처리하지 않았습니다.📋 검토한 대안과 선택 이유
all_enabled컬럼 추가: 화면에서 전체 알림이 꺼져 있어도 개별 알림이 켜져 있을 수 있어 독립 스위치가 아니라 파생값으로 봤습니다. 저장하면 네 값과 어긋날 수 있어 두지 않았습니다./v1/app/members/me/notification-settings: FCM 토큰 API(/members/me/fcm-token)와 경로는 맞지만, notification 도메인을 별도 컨트롤러로 두고 나중에 알림함 목록도/v1/app/notifications에 둘 수 있게/v1/app/notifications/settings로 정했습니다.💬 리뷰 포인트
MemberSignUpUseCase: 가입과 설정 생성을 한 트랜잭션으로 묶은 것, 재가입 시 기존 설정을 유지하는 것V17: 가입 전 회원까지 포함해서 만드는 범위/v1/app/notifications/settings