-
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
[feature/19] 프로필 조회 구현 #22
Conversation
it.user = user | ||
it.profileSelect = profileSelect |
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.
이전 pr 코드리뷰 반영했습니다!
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.
엇 여기는 �profileSelect를 변경하는거라 it.profileSelect = profileSelect
가 있어야해요!ㅋㅋㅋ
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.
수정해둘게요!
@@ -9,6 +10,8 @@ class User( | |||
@GeneratedValue(strategy = GenerationType.IDENTITY) | |||
val id: Long = 0, | |||
|
|||
var birthdate: LocalDate? = null, |
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.
이거 카카오에서 주는 정보가 생년월일 밖에 없어서 그런건가요??
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.
앗 아뇨! 나이를 저장하면 두 가지 문제가 있을거 같아요.
- 매년 해가 바뀔때마다 1씩 증가시켜줘야함
- 만 나이 제도를 적용하고 싶을 때 유연하지 않음
그래서 생년월일을 저장하는게 훨씬 유리할거 같아요!
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.
크게 변경될 사항이 없어서 바로 Approve 할게요~!!
고생하셨습니다 🙇♀️
@@ -9,6 +10,8 @@ class User( | |||
@GeneratedValue(strategy = GenerationType.IDENTITY) | |||
val id: Long = 0, | |||
|
|||
var birthdate: LocalDate? = null, |
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.
이거 카카오에서 주는 정보가 생년월일 밖에 없어서 그런건가요??
it.user = user | ||
it.profileSelect = profileSelect |
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.
엇 여기는 �profileSelect를 변경하는거라 it.profileSelect = profileSelect
가 있어야해요!ㅋㅋㅋ
|
||
@Transactional(readOnly = true) | ||
fun findUserProfile(userId: Long): UserProfile? { | ||
return profileRepository.findByUserId(userId) |
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.
오 저도 오랜만에 해서 까먹었었는데 생각해보니까
profileRepository.findByUser(user)
이렇게 id로 찾지 않고 객체로 찾아왔던 것 같아요!
인준님이 물어보셨던 객체지향스럽게 짜는게 저런게 아닌가 생각이 들었어요! ㅋㅋㅋ
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.
아하 그쵸 맞아요 그랬던 기억이 쪼끔나서 여쭤봤었어요 ㅋㅋ
log.info { "test!!: $userProfile" } | ||
return UserProfileResponseDto( | ||
userName = "테스트", | ||
age = 20, | ||
introduction = userProfile?.introduction, | ||
profileSelect = userProfile?.profileSelect | ||
).also { | ||
log.info { "TEst! : $it" } | ||
} |
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.
넵넵 맞습니다 주석 달아둘게요!
💡 이슈 번호
close: #19
✨ 작업 내용
프로필 조회 기능 구현입니다
🚀 전달 사항