...
|
...
|
@@ -4,6 +4,8 @@ import com.yoho.tools.docs.ApiOperation; |
|
|
import com.yohoufo.common.utils.UfoJsonUtil;
|
|
|
import com.yohoufo.product.response.ProductDetailResp;
|
|
|
import com.yohoufo.product.response.ProductSeriesTemplateResp;
|
|
|
import com.yohoufo.product.response.StorageDataResp;
|
|
|
import com.yohoufo.product.response.StorageLeastPriceResp;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
...
|
...
|
@@ -62,4 +64,42 @@ public class ProductController { |
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.storage.leastprice", desc="sku的最低价")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.storage.leastprice")
|
|
|
//@Cachable(expire=600)
|
|
|
public ApiResponse queryStorageLeastprice(
|
|
|
@RequestParam(value = "storage_id", required = false) String storageId) {
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().data(queryStorageLeastprice()).code(200).message("storage data").build();
|
|
|
}
|
|
|
|
|
|
|
|
|
private StorageLeastPriceResp queryStorageLeastprice(){
|
|
|
String mockJson = "{\"storage_least_price\":{\"storage_id\":2,\"least_price\":124.3}}";
|
|
|
StorageLeastPriceResp resp = UfoJsonUtil.safelyParseObject(mockJson, StorageLeastPriceResp.class);
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.storage.data", desc="sku信息")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.storage.data")
|
|
|
//@Cachable(expire=600)
|
|
|
public ApiResponse queryStorageInfo(
|
|
|
@RequestParam(value = "storage_id", required = false) String storageId) {
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().data(queryStorageData()).code(200).message("product data").build();
|
|
|
}
|
|
|
|
|
|
|
|
|
private StorageDataResp queryStorageData(){
|
|
|
String mockJson = "{\"product_info\":{\"product_id\":50031387,\"product_name\":\"Carrots by Anwar X AKOP. X Champion LOGO鞋\",\"color_id\":2,\"color_name\":\"黄\",\"image_url\":\"http://img13.static.yhbimg.com/goodsimg/2012/11/07/15/02c24ff8521007bad91dfa5d55e667d8f7.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80\",\"size_list\":[{\"size_id\":2,\"size_name\":\"S\"}]}}";
|
|
|
StorageDataResp resp = UfoJsonUtil.safelyParseObject(mockJson, StorageDataResp.class);
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|