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 @@ -46,7 +46,7 @@ public DataResponse<List<SubCategoryResponse>> getSubCategories(
@Operation(summary = "랜덤 카테고리 조회", description = "홈 화면용 랜덤 카테고리를 조회합니다. 상품 이미지 포함.")
@GetMapping("/random")
public DataResponse<List<CategoryRandomResponse>> getRandomCategories(
@RequestParam(defaultValue = "8") @Min(1) @Max(100) int count
@RequestParam(defaultValue = "4") @Min(1) @Max(100) int count
) {
List<CategoryRandomResponse> categories = categoryService.getRandomCategories(count);
return DataResponse.from(categories);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public ProductSimpleResponse toSimpleResponse(Product product) {
.discountRate(product.getDiscountRate())
.finalPrice(calculateFinalPrice(product))
.thumbnailImageUrl(getFirstImage(product.getImageUrls()))
.brandId(product.getBrand().getId())
.brandName(product.getBrand().getName())
.productType(product.getProductType())
.viewCount(product.getViewCount())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class ProductSimpleResponse {
@Schema(description = "대표 이미지 URL")
private String thumbnailImageUrl;

@Schema(description = "브랜드 ID")
private Long brandId;

@Schema(description = "브랜드명")
private String brandName;

Expand Down