Authored by chenchao

add tips of least price of sku

@@ -48,4 +48,6 @@ public class GoodsInfo { @@ -48,4 +48,6 @@ public class GoodsInfo {
48 private Integer storageNum; 48 private Integer storageNum;
49 49
50 private BigDecimal leastPrice; 50 private BigDecimal leastPrice;
  51 +
  52 + private String leastPriceOfSkuTips;
51 } 53 }
@@ -9,6 +9,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService; @@ -9,6 +9,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
9 import com.yohoufo.product.response.StorageDataResp; 9 import com.yohoufo.product.response.StorageDataResp;
10 import org.slf4j.Logger; 10 import org.slf4j.Logger;
11 11
  12 +import java.math.BigDecimal;
12 import java.util.Arrays; 13 import java.util.Arrays;
13 import java.util.List; 14 import java.util.List;
14 15
@@ -76,4 +77,8 @@ public interface AbsSellerOrderViewService { @@ -76,4 +77,8 @@ public interface AbsSellerOrderViewService {
76 77
77 return prdPrice; 78 return prdPrice;
78 } 79 }
  80 +
  81 + default String buildLeastPriceTips(BigDecimal leastPrice){
  82 + return "当前尺码最低售价¥" + leastPrice.toPlainString();
  83 + }
79 } 84 }
@@ -349,8 +349,11 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I @@ -349,8 +349,11 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
349 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); 349 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
350 if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){ 350 if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){
351 ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId()); 351 ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId());
352 - if (goodsInfo!=null){  
353 - goodsInfo.setLeastPrice(prdPrice.getLeastPrice()); 352 + BigDecimal leastPrice;
  353 + if ((leastPrice = prdPrice.getLeastPrice())!= null
  354 + && leastPrice.compareTo(BigDecimal.ZERO)>0){
  355 + goodsInfo.setLeastPrice(leastPrice);
  356 + goodsInfo.setLeastPriceOfSkuTips(buildLeastPriceTips(leastPrice));
354 } 357 }
355 } 358 }
356 orderDetailInfo.setGoodsInfo(goodsInfo); 359 orderDetailInfo.setGoodsInfo(goodsInfo);
@@ -248,7 +248,11 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde @@ -248,7 +248,11 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
248 goodsInfo.setSkupList(sellerOrderGoods.getSkupList()); 248 goodsInfo.setSkupList(sellerOrderGoods.getSkupList());
249 if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){ 249 if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){
250 ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId()); 250 ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId());
251 - goodsInfo.setLeastPrice(prdPrice.getLeastPrice()); 251 + BigDecimal leastPrice = prdPrice.getLeastPrice();
  252 + if (Objects.nonNull(prdPrice.getLeastPrice()) && leastPrice.compareTo(BigDecimal.ZERO)>0){
  253 + goodsInfo.setLeastPrice(leastPrice);
  254 + goodsInfo.setLeastPriceOfSkuTips(buildLeastPriceTips(leastPrice));
  255 + }
252 } 256 }
253 orderListInfo.setGoodsInfo(goodsInfo); 257 orderListInfo.setGoodsInfo(goodsInfo);
254 orderListInfo.setSecendLevelCreateTime(sellerOrder.getCreateTime()); 258 orderListInfo.setSecendLevelCreateTime(sellerOrder.getCreateTime());