Authored by Lixiaodi

Merge branch 'master' of http://git.yoho.cn/ufo/yohoufo-fore

... ... @@ -36,7 +36,7 @@ public class ProductController {
}
private ProductDetailResp mockProductDetail(Integer productId){
String mockJson = "{\"product_info\":{\"product_id\":50031387,\"product_name\":\"Carrots by Anwar X AKOP. X Champion  LOGO鞋\",\"color_name\":\"白色\",\"brand_name\":\"Air Jordan\",\"series_name\":\"Air Jordan 4\",\"sale_time\":\"2018-08-08\",\"product_code\":\"QW123456\",\"goods_list\":[{\"goods_id\":40328,\"goods_name\":\"蓝\",\"color_name\":\"蓝\",\"status\":1,\"images_list\":[{\"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\"},{\"image_url\":\"http://img11.static.yhbimg.com/goodsimg/2013/01/09/09/0168a03a9a7df1f8ef0c1beba642a5e887.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80\"}],\"size_list\":[{\"size_id\":213,\"size_name\":\"XS\",\"order_by\":1,\"storage_num\":1,\"price\":1,\"status\":1},{\"size_id\":207,\"size_name\":\"S\",\"order_by\":2,\"storage_num\":0,\"price\":12,\"status\":1}]}]}}";
String mockJson = "{\"product_info\":{\"brand_name\":\"Air Jordan\",\"goods_list\":[{\"color_name\":\"蓝\",\"goods_id\":40328,\"images_list\":[{\"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\"},{\"image_url\":\"http://img11.static.yhbimg.com/goodsimg/2013/01/09/09/0168a03a9a7df1f8ef0c1beba642a5e887.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80\"}],\"size_list\":[{\"least_price\":1,\"order_by\":1,\"size_id\":213,\"size_name\":\"XS\",\"storage_num\":1},{\"least_price\":12,\"order_by\":2,\"size_id\":207,\"size_name\":\"S\",\"storage_num\":0}]}],\"least_price\":12,\"product_code\":\"QW123456\",\"product_id\":50031387,\"product_name\":\"Carrots by Anwar X AKOP. X Champion  LOGO鞋\",\"sale_time\":\"2018-08-08\",\"series_name\":\"Air Jordan 4\"}}";
ProductDetailResp resp = UfoJsonUtil.safelyParseObject(mockJson, ProductDetailResp.class);
return resp;
... ...
... ... @@ -21,7 +21,7 @@ public class ProductSearchController {
private final Logger LOG = LoggerFactory.getLogger(ProductSearchController.class);
@ApiOperation(name = "ufo.product.search.list", desc="首页商品推荐")
@RequestMapping(params = "method=ufo.product.list")
@RequestMapping(params = "method=ufo.product.search.list")
@IgnoreSession
@Cachable
public ApiResponse searchProductList(
... ... @@ -52,7 +52,7 @@ public class ProductSearchController {
@ApiOperation(name = "ufo.product.data.search.recommend", desc="商品详情页的相似商品推荐")
@RequestMapping(params = "method=ufo.product.data.recommend")
@RequestMapping(params = "method=ufo.product.data.search.recommend")
@IgnoreSession
@Cachable
public ApiResponse searchProductRecommendById(
... ...
... ... @@ -31,8 +31,8 @@ public class GoodsSize {
@JSONField(name="storage_num")
private Integer storageNum;
@JSONField(name="price")
private BigDecimal price;
@JSONField(name="least_price")
private BigDecimal leastPrice;
@JSONField(name="status")
private Integer status;
... ... @@ -77,12 +77,12 @@ public class GoodsSize {
this.storageNum = storageNum;
}
public BigDecimal getPrice() {
return price;
public BigDecimal getLeastPrice() {
return leastPrice;
}
public void setPrice(BigDecimal price) {
this.price = price;
public void setLeastPrice(BigDecimal leastPrice) {
this.leastPrice = leastPrice;
}
public Integer getStatus() {
... ...
... ... @@ -2,6 +2,7 @@ package com.yohoufo.product.model;
import com.alibaba.fastjson.annotation.JSONField;
import java.math.BigDecimal;
import java.util.List;
public class ProductInfo {
... ... @@ -24,6 +25,9 @@ public class ProductInfo {
@JSONField(name = "product_code")
private String productCode;
@JSONField(name="least_price")
private BigDecimal leastPrice;
@JSONField(name="goods_list")
private List<Goods> goodsList;
... ... @@ -82,4 +86,12 @@ public class ProductInfo {
public void setGoodsList(List<Goods> goodsList) {
this.goodsList = goodsList;
}
public BigDecimal getLeastPrice() {
return leastPrice;
}
public void setLeastPrice(BigDecimal leastPrice) {
this.leastPrice = leastPrice;
}
}
... ...