Conversation
- getStatus를 오버로딩하여 기존 메서드 사용에도 차질이 없도록 함
- 인증서버에서 내려주는 isSopt 값을 받아서 사용하도록 함
kyoooooong
approved these changes
Mar 11, 2026
kyoooooong
left a comment
There was a problem hiding this comment.
너무 멋진 PR인 것같습니다 ... 👍 수고 너무너무너무 많으셨습니다!!
| if (soptActivities == null || soptActivities.isEmpty()) return 0; | ||
|
|
||
| return soptActivities.stream() | ||
| .filter(SoptActivities::isSopt) |
There was a problem hiding this comment.
요 부분 위에선 '.filter(a -> Boolean.TRUE.equals(a.isSopt()))' 으로 처리되어있는데 이부분에선 안되어있어서 NPE가 날 수 있을 것같아 혹시 통일하는 방향은 어떠실까요..?
|
|
||
| // TODO : 추후 유저 생성 api response 변경해 생성 api 쪽에서 soptamp user upsert 하도록 변경 | ||
| PlatformUserInfoResponse platformUserInfo = platformService.getPlatformUserInfoResponse(userId); | ||
| UserStatus status = platformService.getStatus(platformUserInfo); |
There was a problem hiding this comment.
오호 platformUserInfo를 한 번 조회한 뒤 status 계산에 재사용하도록 바뀐 걸까요? 어떤 변화였을지 궁금합니다! 우선 좋아보여요,,,, 😍
Member
Author
There was a problem hiding this comment.
맞아요! 기존에
- getStatus 메서드가 userId를 받아서 유저를 조회한 뒤 UserStatus를 반환함.
- 이후 getPlatformUserInfoResponse(userId) 로 유저 정보를 다시 가져와서 사용함
이런 흐름이어서
- getStatus 메서드를 PlatformUserInfoResponse 를 파라미터로 받는 형태와
- userId로 받았을 경우 PlatformUserInfoResponse 를 조회해서 내부적으로 getStatus를 호출하는 경우
로 분리했어요. 미세한 오버헤드가 있을 수 있지만, 기존 동작을 잘 유지하고 현재 상황에서 효율적이라고 생각했습니다~
- 내부 메서드를 통해서 동작 보장 및 메서드 참조를 통한 가독성 향상이 가능할 것으로 기대
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.
Related issue 🛠
Work Description ✏️
“웹”, “iOS”, “기획“, “서버“, “디자인“, “안드로이드”
“웹”, “iOS”, “기획“, “서버“, “디자인“, “안드로이드“, “PM”, “프론트엔드“, “백엔드“, “마케터“, “리서처“, “오거나이저“, “CX”
Trouble Shooting ⚽️
Related ScreenShot 📷
Uncompleted Tasks 😅
To Reviewers 📢