Commit e33a1dde by xiaoer.li@freemud.com

对接促销算价Alpha->fix

parent 7356cafb
......@@ -547,6 +547,18 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
coupon.setActivityCode(activityCode);
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
, partnerId
, storeId
......@@ -556,7 +568,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, assortmentCustomerInfoVo.isMemberPaid()
, cartGoodsList
, coupons
, null
, sendGoods
, deliveryAmount);
sharingCartService.distribute(calculationSharingDiscountResult
, cartGoodsList
......
......@@ -69,7 +69,7 @@ public class CalculationCommonService {
amount = cartGoods.getAmount();
totalAmount += amount;
//原价行记录
originalAmount = cartGoods.getOriginalPrice();
originalAmount = cartGoods.getOriginalPrice() * cartGoods.getQty();
cartGoods.setOriginalAmount(originalAmount);
totalOriginalAmount += originalAmount;
//包装费行记录
......@@ -108,7 +108,7 @@ public class CalculationCommonService {
original += choice.getOriginalPrice() * cartGoods.getQty();
} else {
amount += mt.getRealAmount();
original += mt.getOriginalPrice();
original += mt.getOriginalPrice() * cartGoods.getQty();
choice.setAmount(mt.getRealAmount().longValue());
choice.setOriginalAmount(original);
}
......
......@@ -211,7 +211,7 @@ public class CalculationSharingDiscountService {
CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material material = new CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material();
material.setType(2);
material.setGoodsId(group.getGoodsId());
material.setGoodsQuantity(1);
material.setGoodsQuantity(cartGoods.getQty());
material.setOriginalPrice(group.getFinalPrice());
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