diff --git a/src/main/java/org/example/gather_back_end/creator/controller/CreatorController.java b/src/main/java/org/example/gather_back_end/creator/controller/CreatorController.java index bab2f07..0f0e617 100644 --- a/src/main/java/org/example/gather_back_end/creator/controller/CreatorController.java +++ b/src/main/java/org/example/gather_back_end/creator/controller/CreatorController.java @@ -96,15 +96,12 @@ public SuccessResponse getCreatorInfo(Authentication authentication) { // 크리에이터 찾기 @GetMapping("/filtering") public SuccessResponse> filteringCreator( - Authentication authentication, @PageableDefault(size = 12, page = 0) Pageable pageable, @RequestParam(value = "price", required = false) Integer price, @RequestParam(value = "category", required = false) String category, @RequestParam(value = "align", defaultValue = "recently", required = false) String recently ) { - CustomOAuth2User customOAuth2User = (CustomOAuth2User) authentication.getPrincipal(); - String providerId = customOAuth2User.getUsername(); - PageResponse res = creatorService.filteringCreator(providerId, pageable, price, category, recently); + PageResponse res = creatorService.filteringCreator(pageable, price, category, recently); return SuccessResponse.of(res); } diff --git a/src/main/java/org/example/gather_back_end/creator/controller/CreatorControllerApi.java b/src/main/java/org/example/gather_back_end/creator/controller/CreatorControllerApi.java index ac78268..f9a5eea 100644 --- a/src/main/java/org/example/gather_back_end/creator/controller/CreatorControllerApi.java +++ b/src/main/java/org/example/gather_back_end/creator/controller/CreatorControllerApi.java @@ -140,9 +140,18 @@ SuccessResponse createCreator( }) @GetMapping SuccessResponse> filteringCreator( - Authentication authentication, @PageableDefault(size = 12, page = 0) Pageable pageable, - @Parameter(description = "가격 필터링 기준 (선택)", example = "50000") + @Parameter( + description = """ + 가격 필터링 기준 (선택) + - 1만원 미만 : 10000 + - 5만원 미만 : 50000 + - 10만원 미만 : 100000 + - 20만원 미만 : 200000 + - 20만원 이상 : 200001 + """, + example = "50000" + ) @RequestParam(value = "price", required = false) Integer price, @Parameter(description = "카테고리 필터링 기준 (선택): PRINTS, VIDEO, SNS_POST 중 하나", example = "PRINTS") @RequestParam(value = "category", required = false) String category, diff --git a/src/main/java/org/example/gather_back_end/creator/service/CreatorService.java b/src/main/java/org/example/gather_back_end/creator/service/CreatorService.java index 9a23e61..2d36bef 100644 --- a/src/main/java/org/example/gather_back_end/creator/service/CreatorService.java +++ b/src/main/java/org/example/gather_back_end/creator/service/CreatorService.java @@ -20,5 +20,5 @@ void createCreator( GetCreatorRes getCreator(String nickname); GetCreatorRes getCreatorInfo(Authentication authentication); - PageResponse filteringCreator(String providerId, Pageable pageable, Integer price, String category, String align); + PageResponse filteringCreator(Pageable pageable, Integer price, String category, String align); } diff --git a/src/main/java/org/example/gather_back_end/creator/service/CreatorServiceImpl.java b/src/main/java/org/example/gather_back_end/creator/service/CreatorServiceImpl.java index 1852c49..5845101 100644 --- a/src/main/java/org/example/gather_back_end/creator/service/CreatorServiceImpl.java +++ b/src/main/java/org/example/gather_back_end/creator/service/CreatorServiceImpl.java @@ -103,7 +103,7 @@ public GetCreatorRes getCreatorInfo(Authentication authentication){ } @Override - public PageResponse filteringCreator(String providerId, Pageable pageable, Integer price, String category, String align) { + public PageResponse filteringCreator(Pageable pageable, Integer price, String category, String align) { Sort sort = switch (align) { case "lowPrice" -> Sort.by(Sort.Direction.ASC, "workList.startPrice");