Commit c52a9808 by dingkai

订单重量

parent 2a6cdb0e
......@@ -2735,7 +2735,8 @@ public class OrderSdkAdapter {
if (ObjectUtils.equals(ProductTypeEnum.SETMEAL_PRODUCT.getCode(), productRequest.getProductType()) || ObjectUtils.equals(ProductTypeEnum.SETMEAL_UPPRICE_PRODUCT.getCode(), productRequest.getProductType())) {
if (CollectionUtils.isNotEmpty(productRequest.getComboProduct())) {
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);
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