[♻️ refactor/#79] 스크랩 유저를 동기화 시, oUserId를 기준으로 scrap 테이블에 추가되도록 수정#80
Merged
junggyo1020 merged 5 commits intodevelopfrom May 2, 2025
Merged
[♻️ refactor/#79] 스크랩 유저를 동기화 시, oUserId를 기준으로 scrap 테이블에 추가되도록 수정#80junggyo1020 merged 5 commits intodevelopfrom
junggyo1020 merged 5 commits intodevelopfrom
Conversation
JungYoonShin
reviewed
May 3, 2025
Member
JungYoonShin
left a comment
There was a problem hiding this comment.
오홍 이런 문제가 있었군요!! 해결하느라 고생많으셨습니다~~
한가지 궁금한게 있는데 알림서버와 운영서버간에 스크랩 유저를 동기화할 때, 운영서버에서 스크랩을 취소하여 스크랩한 공고가 없는 유저의 경우는 알림서버 Scarp 테이블에서 지워주거나 ScrapStatus`의 상태값을 update 해주는 작업도 되어있나요?!
| public void sync(List<Long> userIds) { | ||
| List<Long> distinctUserIds = userIds.stream().distinct().toList(); | ||
| public void sync(List<Long> oUserIds) { | ||
| List<Long> distinctOUserIds = oUserIds.stream().distinct().toList(); |
Member
There was a problem hiding this comment.
운영서버로 받아오는 스크랩한 userId가 중복되기도 하여서 oUserIds.stream().distinct().toList() 요거로 중복제거하는 건가요??
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.
⚙️ ISSUE
📄 Work Description
userId를 기준으로 스크랩 테이블을 추가하게 되어,빈 리스트가 반환되고 있었습니다.oUserId를 기준으로 스크랩 동기화가 이루어질 수 있도록 로직을 수정했습니다!writer 부분에 log를 추가했습니다! 이부분은 이후에 QA가 완료된 이후삭제할 예정입니다.✅ 테스트
현재 테스트 서버의 유저는 3명
3명의 유저 중 1명의 유저만 스크랩을 한 상황(운영서버 userId = 115)
스크랩 동기화 실행 (알림서버에 oUserId(운영서버 userId) = 115, userId = 15인 유저의 스크랩 정보 동기화 완료)
1. 실행 전
2. 실행 후
스크랩한 유저에게만 푸시알림 발송 성공 (스크랩한 유저 1명에게만 푸시알림 발송)
✅ PR check list