Commit dae22a2a by 刘鹏飞

Merge remote-tracking branch 'origin/feature/coco_three' into qa

parents ece7959f f57ae071
...@@ -136,7 +136,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService { ...@@ -136,7 +136,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
giftMap.put(giftProduct.getOcid(),giftProduct.getQty()); giftMap.put(giftProduct.getOcid(),giftProduct.getQty());
}); });
} }
Long itemAmount = 0L;
// 赠品原总价 // 赠品原总价
Long giftOriTotalAmount = 0L; Long giftOriTotalAmount = 0L;
List<ProductVo> productVos = new ArrayList<>(); List<ProductVo> productVos = new ArrayList<>();
...@@ -156,6 +156,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService { ...@@ -156,6 +156,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
// 商品现单价 = 商品现单价+小料现单价 // 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal; smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal;
product.setOriginalPrice(smallMaterialOriTotal + (product.getOriginalPrice() == null ? 0L : product.getOriginalPrice())); product.setOriginalPrice(smallMaterialOriTotal + (product.getOriginalPrice() == null ? 0L : product.getOriginalPrice()));
itemAmount = itemAmount + product.getOriginalPrice() * product.getQty();
giftOriTotalAmount = giftOriTotalAmount + product.getOriginalPrice() * giftQty; giftOriTotalAmount = giftOriTotalAmount + product.getOriginalPrice() * giftQty;
...@@ -191,8 +192,8 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService { ...@@ -191,8 +192,8 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
masterProducts.addAll(productVos); masterProducts.addAll(productVos);
queryOrderResponseVo.setProducts(masterProducts); queryOrderResponseVo.setProducts(masterProducts);
// 商品总价需要包含赠品的价格 // 商品总价
queryOrderResponseVo.setItemAmount(queryOrderResponseVo.getItemAmount() + giftOriTotalAmount); queryOrderResponseVo.setItemAmount(itemAmount + giftOriTotalAmount);
} }
......
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