Skip to content
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 @@ -48,7 +48,7 @@ public ApiResponse<ProductListResponse> sort(@PathVariable String keyword, Produ
return ApiResponse.response(HttpStatus.OK.value(), ResponseMessage.SORT_STORE_PRODUCTS_SUCCESS.getMessage(), ProductListResponse.of(slice));
}

@Operation(summary = "지금 많이 찾는 상품 조회", description = "지금 많이 찾는 상품 20개를 5개씩 4페이지로 나누어 리스트로 반환합니다.")
@Operation(summary = "지금 많이 찾는 상품 조회", description = "지금 많이 찾는 상품 15개를 5개씩 3페이지로 나누어 리스트로 반환합니다.")
@GetMapping("/popular")
public ApiResponse<PopularProductListResponse> search() {
PopularProductListResponse response = popularProductService.getPopularProducts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public interface ProductRepository extends JpaRepository<Product, Long> {

@EntityGraph(attributePaths = "productImages")
List<Product> findTop20ByOrderById();
List<Product> findTop15ByOrderById();

@Query("""
SELECT DISTINCT p FROM Product p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PopularProductService {

@Transactional(readOnly = true)
public PopularProductListResponse getPopularProducts() {
List<Product> products = productRepository.findTop20ByOrderById();
List<Product> products = productRepository.findTop15ByOrderById();
return PopularProductListResponse.of(products, 5);
}

Expand Down