-
Notifications
You must be signed in to change notification settings - Fork 2
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
#112 마이페이지 조회 API 구현 #113
#112 마이페이지 조회 API 구현 #113
Conversation
public MyPageResponse.GetMyPageDTO getMyPage(Long memberId){ | ||
Member member = findMember(memberId); | ||
|
||
String profileName = profileFeatureRepository.findProfileFeature(member, PageRequest.of(0,1)).get(0); |
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.
Paging하신 이유가 궁금합니다.
@query("select pf.profileValue " +
"from Profile p " +
"join ProfileFeature pf on p = pf.profile " +
"where pf.profileKey = 'name' and p.member = :member " +
"order by p.isDefault desc, p.createdAt asc ")
List findProfileFeature(@param("member") Member member);
...
String profileName = profileFeatureRepository.findProfileFeature(member).get(0);
이렇게 페이지네이션 처리없이 조회했을 때와 비교하여 이점이 있는 건가요?
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.
저도 paging으로 처리하고싶진 않았는데,
profile feature가 여러개 나올 수 있는 상황에서 jpql로는 sql의 limit 키워드가 안먹어서
어쩔 수 없이 paging으로 처리했습니다ㅠ 혹시 더 좋은 방법이 있다면 알려주시면 감사하겠습니다!
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.
넵 확인했습니다. 저도 궁금해서 질문드린거라 더 좋은 방법은 모르겠네요😅
@Query("select count(*)" + | ||
"from MemberSpace ms join Space s on ms.space = s " + | ||
"where s.member = :member") | ||
Integer countSharedProfileByMember(@Param("member") Member member); |
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.
혹시 countShared"Profile"ByMember라고 작명하신 이유가 있을까요?
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.
앗! 이건 제가 잘못 작명했습니다! profile -> space로 변경하겠습니다. 꼼꼼한 확인 감사합니당
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.
확인했습니다!
- #112 - countShared"profile"ByMember -> countSharedSpaceByMember
📍 PR 타입 (하나 이상 선택)
❗️ 관련 이슈 링크
📌 개요
🔁 변경 사항
📸 스크린샷
👀 기타 더 이야기해볼 점
✅ 체크 리스트