Skip to content

Commit

Permalink
Merge branch 'feature/store-get-detail' of github.com:everymeals/Ever…
Browse files Browse the repository at this point in the history
…yMeal_Server into feature/store-get-detail
  • Loading branch information
Qbeom0925 committed Nov 22, 2023
2 parents f5df662 + e00f999 commit a67ea40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,18 @@ public ApplicationResponse<Page<StoreGetRes>> getStores(
SORT_RECENT
})
String order,
@RequestParam(value = "group")
@RequestParam(value = "group", required = false, defaultValue = "all")
@Schema(
title = "그룹",
description = "그룹",
allowableValues = {"etc", "recommend", "restaurant", "cafe", "bar"})
allowableValues = {
"all",
"etc",
"recommend",
"restaurant",
"cafe",
"bar"
})
String group,
@Parameter(hidden = true) @AuthUser AuthenticatedUser authenticatedUser,
@RequestParam(value = "grade", required = false)
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/everymeal/server/store/entity/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ public class Store extends BaseEntity {

private String name;
private String address;
// 카카오에서 제공하는 카테고리
private String categoryGroup;
// 조회할때 쓰인 음식점, 카페에 대한 카테고리
private String category;
// 조회 기반에 따라 세분화된 카테고리
private String categoryDetail;
private String kakaoId;
private String phone;
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/mybatis/mappers/StoreMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
WHEN #{group} = 'restaurant' THEN s.category_detail IN ('한식', '중식', '일식', '양식')
WHEN #{group} = 'cafe' THEN s.category_detail IN ('카페', '디저트')
WHEN #{group} = 'bar' THEN s.category_detail = '술집'
ELSE s.category_detail IN ('기타', '패스트푸드', '분식')
WHEN #{group} = 'etc' THEN s.category_detail IN ('기타', '패스트푸드', '분식')
WHEN #{group} = 'all' THEN 1=1
ELSE s.category_detail IN ('한식', '중식', '일식', '양식', '카페', '디저트', '술집', '기타', '패스트푸드', '분식')
END
)
AND (
Expand Down Expand Up @@ -106,7 +108,8 @@
WHEN #{group} = 'restaurant' THEN s.category_detail IN ('한식', '중식', '일식', '양식')
WHEN #{group} = 'cafe' THEN s.category_detail IN ('카페', '디저트')
WHEN #{group} = 'bar' THEN s.category_detail = '술집'
ELSE s.category_detail IN ('기타', '패스트푸드', '분식')
WHEN #{group} = 'all' THEN 1=1
ELSE s.category_detail IN ('한식', '중식', '일식', '양식', '카페', '디저트', '술집', '기타', '패스트푸드', '분식')
END
)
AND (
Expand Down

0 comments on commit a67ea40

Please sign in to comment.