Authored by Lixiaodi

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

@@ -36,7 +36,7 @@ public class ProductController { @@ -36,7 +36,7 @@ public class ProductController {
36 } 36 }
37 37
38 private ProductDetailResp mockProductDetail(Integer productId){ 38 private ProductDetailResp mockProductDetail(Integer productId){
39 - 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}]}]}}"; 39 + 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\"}}";
40 ProductDetailResp resp = UfoJsonUtil.safelyParseObject(mockJson, ProductDetailResp.class); 40 ProductDetailResp resp = UfoJsonUtil.safelyParseObject(mockJson, ProductDetailResp.class);
41 41
42 return resp; 42 return resp;
@@ -21,7 +21,7 @@ public class ProductSearchController { @@ -21,7 +21,7 @@ public class ProductSearchController {
21 private final Logger LOG = LoggerFactory.getLogger(ProductSearchController.class); 21 private final Logger LOG = LoggerFactory.getLogger(ProductSearchController.class);
22 22
23 @ApiOperation(name = "ufo.product.search.list", desc="首页商品推荐") 23 @ApiOperation(name = "ufo.product.search.list", desc="首页商品推荐")
24 - @RequestMapping(params = "method=ufo.product.list") 24 + @RequestMapping(params = "method=ufo.product.search.list")
25 @IgnoreSession 25 @IgnoreSession
26 @Cachable 26 @Cachable
27 public ApiResponse searchProductList( 27 public ApiResponse searchProductList(
@@ -52,7 +52,7 @@ public class ProductSearchController { @@ -52,7 +52,7 @@ public class ProductSearchController {
52 52
53 53
54 @ApiOperation(name = "ufo.product.data.search.recommend", desc="商品详情页的相似商品推荐") 54 @ApiOperation(name = "ufo.product.data.search.recommend", desc="商品详情页的相似商品推荐")
55 - @RequestMapping(params = "method=ufo.product.data.recommend") 55 + @RequestMapping(params = "method=ufo.product.data.search.recommend")
56 @IgnoreSession 56 @IgnoreSession
57 @Cachable 57 @Cachable
58 public ApiResponse searchProductRecommendById( 58 public ApiResponse searchProductRecommendById(
@@ -31,8 +31,8 @@ public class GoodsSize { @@ -31,8 +31,8 @@ public class GoodsSize {
31 @JSONField(name="storage_num") 31 @JSONField(name="storage_num")
32 private Integer storageNum; 32 private Integer storageNum;
33 33
34 - @JSONField(name="price")  
35 - private BigDecimal price; 34 + @JSONField(name="least_price")
  35 + private BigDecimal leastPrice;
36 36
37 @JSONField(name="status") 37 @JSONField(name="status")
38 private Integer status; 38 private Integer status;
@@ -77,12 +77,12 @@ public class GoodsSize { @@ -77,12 +77,12 @@ public class GoodsSize {
77 this.storageNum = storageNum; 77 this.storageNum = storageNum;
78 } 78 }
79 79
80 - public BigDecimal getPrice() {  
81 - return price; 80 + public BigDecimal getLeastPrice() {
  81 + return leastPrice;
82 } 82 }
83 83
84 - public void setPrice(BigDecimal price) {  
85 - this.price = price; 84 + public void setLeastPrice(BigDecimal leastPrice) {
  85 + this.leastPrice = leastPrice;
86 } 86 }
87 87
88 public Integer getStatus() { 88 public Integer getStatus() {
@@ -2,6 +2,7 @@ package com.yohoufo.product.model; @@ -2,6 +2,7 @@ package com.yohoufo.product.model;
2 2
3 import com.alibaba.fastjson.annotation.JSONField; 3 import com.alibaba.fastjson.annotation.JSONField;
4 4
  5 +import java.math.BigDecimal;
5 import java.util.List; 6 import java.util.List;
6 7
7 public class ProductInfo { 8 public class ProductInfo {
@@ -24,6 +25,9 @@ public class ProductInfo { @@ -24,6 +25,9 @@ public class ProductInfo {
24 @JSONField(name = "product_code") 25 @JSONField(name = "product_code")
25 private String productCode; 26 private String productCode;
26 27
  28 + @JSONField(name="least_price")
  29 + private BigDecimal leastPrice;
  30 +
27 @JSONField(name="goods_list") 31 @JSONField(name="goods_list")
28 private List<Goods> goodsList; 32 private List<Goods> goodsList;
29 33
@@ -82,4 +86,12 @@ public class ProductInfo { @@ -82,4 +86,12 @@ public class ProductInfo {
82 public void setGoodsList(List<Goods> goodsList) { 86 public void setGoodsList(List<Goods> goodsList) {
83 this.goodsList = goodsList; 87 this.goodsList = goodsList;
84 } 88 }
  89 +
  90 + public BigDecimal getLeastPrice() {
  91 + return leastPrice;
  92 + }
  93 +
  94 + public void setLeastPrice(BigDecimal leastPrice) {
  95 + this.leastPrice = leastPrice;
  96 + }
85 } 97 }