-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PC-443] 매치 프로필 누락 요소 및 통일되지 않은 변수명 수정 #38
Conversation
…s-response # Conflicts: # api/src/main/java/org/yapp/domain/match/application/MatchService.java # api/src/main/java/org/yapp/domain/match/presentation/dto/response/MatchProfileBasicResponse.java
|
||
public static MatchProfileBasicResponse fromProfile(Long matchId, Profile profile) { | ||
String nickname = profile.getProfileBasic().getNickname(); | ||
LocalDate birthDate = profile.getProfileBasic().getBirthdate(); | ||
LocalDate now = LocalDate.now(); | ||
String age = String.valueOf(Period.between(birthDate, now).getYears()); | ||
Integer age = Period.between(birthDate, now).getYears(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Profilebasic profileBasic = profile.getProfileBasic() 으로 profileBasic 변수를 따로 빼서 값들을 설정하는 것이 어떨까요 ?
ProfileBasic이 수정되는 경우 따로 변수를 빼서 값들을 설정하는 방식이 더 좋아보이기에 제안합니다 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은 생각인 것 같습니다!
그렇게 하면 코드가 더 깔끔해지겠네요.
수정하겠습니다.
MatchInfoResponse response = MatchInfoResponse.builder() | ||
.matchId(matchInfo.getId()) | ||
.matchStatus(getMatchStatus(userId, matchInfo)) | ||
.shortIntroduce("") // Deprecated 된 BIO 에서 넣어야하는지? | ||
.description(matchedUser.getProfile().getProfileBasic() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 프로퍼티 참조가 너무 깊게 되는 것 같아서, 따로 변수를 통해 빼고 관리하는 것이 좋아보입니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
옙 동의합니다
수정완료했습니다! |
고생하셨습니다 ! |
🔗 관련 이슈
PC-443
✨ 작업 내용
✅ 체크리스트
🎃 새롭게 알게된 사항
📋 참고 사항