Commit e33a1dde by xiaoer.li@freemud.com

对接促销算价Alpha->fix

parent 7356cafb
...@@ -547,6 +547,18 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -547,6 +547,18 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
coupon.setActivityCode(activityCode); coupon.setActivityCode(activityCode);
coupons.add(coupon); coupons.add(coupon);
} }
List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList = shoppingCartInfoRequestVo.getSendGoods();
List<ShoppingCartInfoRequestVo.SendGoods> sendGoods = new ArrayList<>();
if (CollectionUtils.isNotEmpty(sendGoodsList)) {
for (ShoppingCartInfoRequestVo.SendGoods sds : sendGoodsList) {
ShoppingCartInfoRequestVo.SendGoods sd = new ShoppingCartInfoRequestVo.SendGoods();
sd.setGoodsId(sds.getGoodsId());
sd.setQty(sds.getQty());
sd.setOriginalPrice(sds.getOriginalPrice());
sd.setActivityCode(sds.getActivityCode());
sendGoods.add(sd);
}
}
CalculationSharingDiscountResponseDto.CalculationDiscountResult calculationSharingDiscountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType CalculationSharingDiscountResponseDto.CalculationDiscountResult calculationSharingDiscountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType
, partnerId , partnerId
, storeId , storeId
...@@ -556,7 +568,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -556,7 +568,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, assortmentCustomerInfoVo.isMemberPaid() , assortmentCustomerInfoVo.isMemberPaid()
, cartGoodsList , cartGoodsList
, coupons , coupons
, null , sendGoods
, deliveryAmount); , deliveryAmount);
sharingCartService.distribute(calculationSharingDiscountResult sharingCartService.distribute(calculationSharingDiscountResult
, cartGoodsList , cartGoodsList
......
...@@ -69,7 +69,7 @@ public class CalculationCommonService { ...@@ -69,7 +69,7 @@ public class CalculationCommonService {
amount = cartGoods.getAmount(); amount = cartGoods.getAmount();
totalAmount += amount; totalAmount += amount;
//原价行记录 //原价行记录
originalAmount = cartGoods.getOriginalPrice(); originalAmount = cartGoods.getOriginalPrice() * cartGoods.getQty();
cartGoods.setOriginalAmount(originalAmount); cartGoods.setOriginalAmount(originalAmount);
totalOriginalAmount += originalAmount; totalOriginalAmount += originalAmount;
//包装费行记录 //包装费行记录
...@@ -108,7 +108,7 @@ public class CalculationCommonService { ...@@ -108,7 +108,7 @@ public class CalculationCommonService {
original += choice.getOriginalPrice() * cartGoods.getQty(); original += choice.getOriginalPrice() * cartGoods.getQty();
} else { } else {
amount += mt.getRealAmount(); amount += mt.getRealAmount();
original += mt.getOriginalPrice(); original += mt.getOriginalPrice() * cartGoods.getQty();
choice.setAmount(mt.getRealAmount().longValue()); choice.setAmount(mt.getRealAmount().longValue());
choice.setOriginalAmount(original); choice.setOriginalAmount(original);
} }
......
...@@ -211,7 +211,7 @@ public class CalculationSharingDiscountService { ...@@ -211,7 +211,7 @@ public class CalculationSharingDiscountService {
CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material material = new CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material(); CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material material = new CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material();
material.setType(2); material.setType(2);
material.setGoodsId(group.getGoodsId()); material.setGoodsId(group.getGoodsId());
material.setGoodsQuantity(1); material.setGoodsQuantity(cartGoods.getQty());
material.setOriginalPrice(group.getFinalPrice()); material.setOriginalPrice(group.getFinalPrice());
groups.add(material); groups.add(material);
} }
......
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