Commit 2d01bd54 by xiaoer.li@freemud.com

对接促销算价Alpha->fix

parent 128c0cd3
......@@ -102,6 +102,7 @@ public class CalculationCommonService {
long original = 0L;
//
for (CartGoods.ComboxGoods choice : cartGoods.getProductGroupList()) {
//可选搭配
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial mt = choices.get(choice.getGoodsId());
if (mt == null) {
amount += choice.getAmount() * cartGoods.getQty();
......
......@@ -118,23 +118,24 @@ public class FullSharingService {
if (!mDiscount.isEmpty()) continue;
for (CartGoods.ComboxGoods com : cart.getProductGroupList()) {
Long md = mDiscount.get(com.getGoodsId());
if (md!=null) {
com.setAmount(com.getAmount()+md);
if (md != null) {
com.setAmount(com.getAmount() + md);
cart.setAmount(cart.getAmount() + md);
}
}
}
//固定搭配
if (CollectionUtils.isNotEmpty(cart.getProductComboList())) {
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GroupCombox> groupCom = discountMap.getGroupCombox();
HashMap<String, Long> gDiscount = drawnFullDiscount(groupCom, typeEnums);
if (!gDiscount.isEmpty()) continue;
for (CartGoods.ComboxGoods com : cart.getProductComboList()) {
Long md = gDiscount.get(com.getGoodsId());
if (md!=null) {
com.setAmount(com.getAmount()+md);
}
}
}
//if (CollectionUtils.isNotEmpty(cart.getProductComboList())) {
// List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GroupCombox> groupCom = discountMap.getGroupCombox();
// HashMap<String, Long> gDiscount = drawnFullDiscount(groupCom, typeEnums);
// if (!gDiscount.isEmpty()) continue;
// for (CartGoods.ComboxGoods com : cart.getProductComboList()) {
// Long md = gDiscount.get(com.getGoodsId());
// if (md!=null) {
// com.setAmount(com.getAmount()+md);
// }
// }
//}
}
/**
......
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