Commit 51e3855c by xiaoer.li@freemud.com

对接促销算价Alpha->fix

parent 2d01bd54
......@@ -102,12 +102,13 @@ public class FullSharingService {
//小料
if (CollectionUtils.isNotEmpty(cart.getProductMaterialList())) {
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> materialDiscount = discountMap.getSmallMaterial();
HashMap<String, Long> mDiscount = drawnFullDiscount(materialDiscount, typeEnums,1);
if (!mDiscount.isEmpty()) continue;
for (CartGoods.MaterialGoods mt : cart.getProductMaterialList()) {
Long md = mDiscount.get(mt.getSpuId());
if (md!=null) {
mt.setAmount(mt.getAmount()+md);
HashMap<String, Long> mDiscount = drawnFullDiscount(materialDiscount, typeEnums, 1);
if (!mDiscount.isEmpty()) {
for (CartGoods.MaterialGoods mt : cart.getProductMaterialList()) {
Long md = mDiscount.get(mt.getSpuId());
if (md != null) {
mt.setAmount(mt.getAmount() + md);
}
}
}
}
......@@ -115,12 +116,13 @@ public class FullSharingService {
if (CollectionUtils.isNotEmpty(cart.getProductGroupList())) {
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> materialDiscount = discountMap.getSmallMaterial();
HashMap<String, Long> mDiscount = drawnFullDiscount(materialDiscount, typeEnums, 2);
if (!mDiscount.isEmpty()) continue;
for (CartGoods.ComboxGoods com : cart.getProductGroupList()) {
Long md = mDiscount.get(com.getGoodsId());
if (md != null) {
com.setAmount(com.getAmount() + md);
cart.setAmount(cart.getAmount() + md);
if (!mDiscount.isEmpty()) {
for (CartGoods.ComboxGoods com : cart.getProductGroupList()) {
Long md = mDiscount.get(com.getGoodsId());
if (md != null) {
com.setAmount(com.getAmount() + md);
cart.setAmount(cart.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