From e6fd22212f7ce2115ca65df4f89a2f5d2a2e60f7 Mon Sep 17 00:00:00 2001 From: SangYeong Park Date: Sun, 22 Sep 2024 02:12:25 +0900 Subject: [PATCH] =?UTF-8?q?comment=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/swdc/server/controller/PriceController.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/com/swdc/server/controller/PriceController.java b/server/src/main/java/com/swdc/server/controller/PriceController.java index 0ef5d13..cc39073 100644 --- a/server/src/main/java/com/swdc/server/controller/PriceController.java +++ b/server/src/main/java/com/swdc/server/controller/PriceController.java @@ -27,10 +27,8 @@ public class PriceController { * * 플랫폼 이름, 카테고리 이름, 상품 id를 이용하여 priceService의 getProductDetails를 호출 * - * encoded category_name을 decoded category_name으로 변환하여 priceService에 전달 - * (%EC%B1%84%EC%86%8C -> 채소) - * * 가격 정보를 담은 Price 객체(platform/category_name/product_id에 해당)를 반환 + * */ @GetMapping("{platform}/{product_id}/**") public Price getPriceInfo(@PathVariable String platform, HttpServletRequest request, @PathVariable String product_id) { @@ -44,6 +42,14 @@ public Price getPriceInfo(@PathVariable String platform, HttpServletRequest requ return priceService.getProductDetails(platform, category_name, product_id); } + /** + * + * 플랫폼 이름, 상품 id를 이용하여 priceService의 getProductDetailsWithoutCategory를 호출 + * + * 가격 정보를 담은 Price 객체(platform/category_name/product_id에 해당)를 반환 + * -> category 전수탐색을 통해 알맞은 category를 알아서 찾아냄 + * + */ @GetMapping("{platform}/{product_id}") public Price getPriceInfo(@PathVariable String platform, @PathVariable String product_id) { return priceService.getProductDetailsWithoutCategory(platform, product_id);