-
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
[COZY-441] fix: 멤버 스탯 없는 사용자에 대한 찜 수정 #212
Conversation
리뷰해드려요~PreferenceMatchCountDTO.java - 리뷰 1
FavoriteCommandService.java - 리뷰 1
FavoriteQueryService.java - 리뷰 1
MemberStatConverter.java - 리뷰 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.
들여쓰기 때문에 수정된 것처럼 보이는 부분이 있어서, 코드 건드린 곳은 전부 코멘트 달아뒀습니다~
if (Objects.isNull(member.getMemberStat())) { | ||
throw new GeneralException(ErrorStatus._FAVORITE_CANNOT_MEMBER_WITHOUT_MEMBERSTAT); | ||
} |
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.
멤버 스탯 없으면 사용자 찜 못하던 예외 처리를 삭제했습니다
.map(favoriteMember -> { | ||
if (Objects.isNull(memberStat)) { | ||
return FavoriteConverter.toFavoriteMemberResponseDTO( | ||
memberIdFavoriteIdMap.get(favoriteMember.getId()), | ||
MemberStatConverter.toPreferenceResponseDTO( | ||
favoriteMember.getMemberStat(), | ||
MemberStatConverter.toMemberStatPreferenceDetailWithoutColorDTOList( | ||
favoriteMember.getMemberStat(), criteriaPreferences), 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.
본인이 멤버 스탯이 없는 경우에 대한 처리를 추가했습니다
.count(0) | ||
.count(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.
0 -> null로 반환 값을 수정했습니다
public static List<MemberStatPreferenceDetailColorDTO> toMemberStatPreferenceDetailWithoutColorDTOList( | ||
MemberStat memberStat, List<String> preferences) { | ||
Map<String, Object> memberStatMap = MemberStatUtil.getMemberStatFields(memberStat, | ||
preferences); | ||
|
||
return memberStatMap.entrySet().stream() | ||
.map(entry -> MemberStatConverter.toMemberStatPreferenceDetailWithoutColorDTO( | ||
entry.getKey(), entry.getValue())) | ||
.toList(); | ||
} |
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.
멤버 스탯 없는 사용자에 대해 color 처리를 위해 추가했습니다
public static MemberStatPreferenceDetailColorDTO toMemberStatPreferenceDetailWithoutColorDTO( | ||
String stat, Object value) { | ||
return MemberStatPreferenceDetailColorDTO.builder() | ||
.stat(stat) | ||
.value(value) | ||
.build(); | ||
} |
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.
멤버 스탯 없는 사용자에 대해 color 처리를 위해 추가했습니다22
int count | ||
Integer count |
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.
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.
LGTM! 큰 문제 없어 보입니다! 수정하시느라 수고하셨습니다
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.
LGTM~
⚒️develop의 최신 커밋을 pull 받았나요?
네
#️⃣ 작업 내용
동작 확인
멤버 스탯 없는 테스트 계정으로 사용자 찜하기
찜한 사용자 목록 조회 결과
찜한 방 목록 조회 결과
💬 리뷰 요구사항(선택)