Commit 68df8cb8 by dingkai

Merge branch 'feature/1.9.13-mall-20200219-dingkai' into develop

parents 8ecc9d3a c52a9808
...@@ -2741,7 +2741,8 @@ public class OrderSdkAdapter { ...@@ -2741,7 +2741,8 @@ public class OrderSdkAdapter {
if (ObjectUtils.equals(ProductTypeEnum.SETMEAL_PRODUCT.getCode(), productRequest.getProductType()) || ObjectUtils.equals(ProductTypeEnum.SETMEAL_UPPRICE_PRODUCT.getCode(), productRequest.getProductType())) { if (ObjectUtils.equals(ProductTypeEnum.SETMEAL_PRODUCT.getCode(), productRequest.getProductType()) || ObjectUtils.equals(ProductTypeEnum.SETMEAL_UPPRICE_PRODUCT.getCode(), productRequest.getProductType())) {
if (CollectionUtils.isNotEmpty(productRequest.getComboProduct())) { if (CollectionUtils.isNotEmpty(productRequest.getComboProduct())) {
Double comboProductTotalWeight = productRequest.getComboProduct().stream().map(t -> { Double comboProductTotalWeight = productRequest.getComboProduct().stream().map(t -> {
return WeightUtils.changeToG(t.getWeight(), t.getUnit()); Integer comboQty = t.getNumber() == null ? 0 : t.getNumber();
return WeightUtils.changeToG(t.getWeight(), t.getUnit()) * comboQty;
}).reduce(0D, Double::sum); }).reduce(0D, Double::sum);
totalWeight += comboProductTotalWeight * qty; totalWeight += comboProductTotalWeight * qty;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment