Commit fcb4b766 by ping.wu

优惠计算修改

parent 4091f137
......@@ -381,15 +381,17 @@ public class CalculationServiceImpl {
calculationDiscountGoods.setSmallMaterial(materials);
}
//累加需加入计算的商品
int index;
// 当商品已存在时,需累加数量
if ((index = calculationDiscountGoodsList.indexOf(calculationDiscountGoods)) >= 0 && !GoodsTypeEnum.COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
ActivityCalculationDiscountRequestDto.CalculationDiscountGoods oldCalculationDiscountGoods = calculationDiscountGoodsList.get(index);
oldCalculationDiscountGoods.setGoodsQuantity(oldCalculationDiscountGoods.getGoodsQuantity() + calculationDiscountGoods.getGoodsQuantity());
} else {
calculationDiscountGoodsList.add(calculationDiscountGoods);
}
calculationDiscountGoodsList.add(calculationDiscountGoods);
// //累加需加入计算的商品
// int index;
// // 当商品已存在时,需累加数量
// if ((index = calculationDiscountGoodsList.indexOf(calculationDiscountGoods)) >= 0 && !GoodsTypeEnum.COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
// ActivityCalculationDiscountRequestDto.CalculationDiscountGoods oldCalculationDiscountGoods = calculationDiscountGoodsList.get(index);
// oldCalculationDiscountGoods.setGoodsQuantity(oldCalculationDiscountGoods.getGoodsQuantity() + calculationDiscountGoods.getGoodsQuantity());
// } else {
//
// }
}
......
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