Skip to content
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

refactor : 리뷰 조회 response key 변경 #91

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Map;

public record StoreGetReviewRes(
Integer reviewIdx,
Long reviewIdx,
String content,
Integer grade,
LocalDateTime createdAt,
Expand All @@ -27,7 +27,7 @@ public static List<StoreGetReviewRes> of(List<Map<String, Object>> storeReview)
images.replaceAll(S3Util::getImgUrl);
}
return new StoreGetReviewRes(
(Integer) review.get("reviewIdx"),
(Long) review.get("idx"),
(String) review.get("content"),
(Integer) review.get("grade"),
(LocalDateTime) review.get("createdAt"),
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mybatis/mappers/StoreMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
left join users u on r.user_idx = u.idx and u.is_deleted = false
left join images i on r.idx = i.review_idx and i.is_deleted = false
left join store s on r.store_idx = s.idx and s.is_deleted = false
left join university un on s.university_idx = #{campusIdx} and un.is_deleted = false
join university un on s.university_idx = #{campusIdx} and un.is_deleted = false
where CASE
WHEN #{group} = 'recommend' THEN s.recommended_count > 0
WHEN #{group} = 'restaurant' THEN s.category_detail IN ('한식', '중식', '일식', '양식')
Expand Down
Loading