Commit 9b7fb7e8 by 查志伟

Merge branch '20211116-sdk升级-zhiwei.zha' into qa

parents 077aafda 7a38bc7c
......@@ -113,7 +113,7 @@
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>sdk-common-base</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.4-RELEASE</version>
</dependency>
<!-- mybatis -->
......
......@@ -2115,7 +2115,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
XyDiscountServiceImpl xyDiscountService = (XyDiscountServiceImpl) PromotionFactory.getPromotionService(ShoppingCartPromotionEnum.XY_DISCOUNT);
xyDiscountService.updateShoppingCartGoodsApportion(shoppingCartGoodsResponseVo, calculationDiscountResult, shoppingCartGoodsDto, premiumExchangeActivity, shoppingCartInfoRequestVo);
//xy折
//满赠
BuyAndGiftsPromotionService buyAndGiftsPromotionService = (BuyAndGiftsPromotionService) PromotionFactory.getPromotionService(ShoppingCartPromotionEnum.BUY_GIFTS);
buyAndGiftsPromotionService.updateShoppingCartGoodsApportion(shoppingCartGoodsResponseVo, calculationDiscountResult, shoppingCartGoodsDto, premiumExchangeActivity, shoppingCartInfoRequestVo);
......
......@@ -449,8 +449,14 @@ public class CalculationCommonService {
cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice());
}
if (calculationGoods!=null) {
cartGoodsDetailDto.setTotalDiscountAmount(calculationGoods.getDiscountAmount().intValue());
//cartGoodsDetailDto.setOriginalPrice(calculationGoods.getOriginalPrice());
if (cartGoodsDetailDto.getIsSendGoods()) {
// 由于买赠活动中,赠品有属性的时候会裂为多行,所有优惠金额不能直接用促销返回的, 需要根据实际购物车行中的数量来计算
int discountAmt = calculationGoods.getDiscountAmount().intValue();
int discountCount = calculationGoods.getGoodsQuantity();
cartGoodsDetailDto.setTotalDiscountAmount(discountAmt / discountCount * cartGoods.getQty());
} else {
cartGoodsDetailDto.setTotalDiscountAmount(calculationGoods.getDiscountAmount().intValue());
}
}
else {
cartGoodsDetailDto.setTotalDiscountAmount(cartGoods.getOriginalAmount().intValue() - cartGoods.getAmount().intValue());
......
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