Authored by chenchao

add tips of least price of sku

... ... @@ -48,4 +48,6 @@ public class GoodsInfo {
private Integer storageNum;
private BigDecimal leastPrice;
private String leastPriceOfSkuTips;
}
... ...
... ... @@ -9,6 +9,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.product.response.StorageDataResp;
import org.slf4j.Logger;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
... ... @@ -76,4 +77,8 @@ public interface AbsSellerOrderViewService {
return prdPrice;
}
default String buildLeastPriceTips(BigDecimal leastPrice){
return "当前尺码最低售价¥" + leastPrice.toPlainString();
}
}
... ...
... ... @@ -349,8 +349,11 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){
ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId());
if (goodsInfo!=null){
goodsInfo.setLeastPrice(prdPrice.getLeastPrice());
BigDecimal leastPrice;
if ((leastPrice = prdPrice.getLeastPrice())!= null
&& leastPrice.compareTo(BigDecimal.ZERO)>0){
goodsInfo.setLeastPrice(leastPrice);
goodsInfo.setLeastPriceOfSkuTips(buildLeastPriceTips(leastPrice));
}
}
orderDetailInfo.setGoodsInfo(goodsInfo);
... ...
... ... @@ -248,7 +248,11 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
goodsInfo.setSkupList(sellerOrderGoods.getSkupList());
if(SkupStatus.CAN_SELL.getCode() == skupStatus.getCode()){
ProductProxyService.PrdPrice prdPrice = getPrdPrice(sellerOrderGoods.getStorageId());
goodsInfo.setLeastPrice(prdPrice.getLeastPrice());
BigDecimal leastPrice = prdPrice.getLeastPrice();
if (Objects.nonNull(prdPrice.getLeastPrice()) && leastPrice.compareTo(BigDecimal.ZERO)>0){
goodsInfo.setLeastPrice(leastPrice);
goodsInfo.setLeastPriceOfSkuTips(buildLeastPriceTips(leastPrice));
}
}
orderListInfo.setGoodsInfo(goodsInfo);
orderListInfo.setSecendLevelCreateTime(sellerOrder.getCreateTime());
... ...