|
@@ -4588,6 +4588,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.LSCX.getTopicName());
|
|
|
// 优惠价格 应该用优惠后的特价价格 乘以 数量
|
|
|
goodsDetailsDto.setDiscountedPrice((retailPrice.subtract(activityPrice)).multiply(new BigDecimal(goodsDetailsDto.getSellVolume())));
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
activityFlag.set(false);
|
|
|
promotionActivityFlag.set(true);
|
|
@@ -4630,6 +4632,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.MZ.getTopicName());
|
|
|
goodsDetailsDto.setGiftNumber(mkActivitiesFullGiftEntity.getGiftNumber());
|
|
|
goodsDetailsDto.setDiscountedPrice(goodsEntity.getRetailPrice());
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
// 添加进商品详情列表
|
|
|
goodsDetailsDtos.add(goodsDetailsDto);
|
|
@@ -4663,6 +4667,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.MZ.getTopicName());
|
|
|
goodsDetailsDto.setGiftNumber(mkActivitiesFullGiftEntity.getGiftNumber());
|
|
|
goodsDetailsDto.setDiscountedPrice(goodsEntity.getRetailPrice());
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
// 添加进商品详情列表
|
|
|
goodsDetailsDtos.add(goodsDetailsDto);
|
|
@@ -4720,6 +4726,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
|
|
|
goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
goodsDetailsDtos.add(goodsDetailsDto);
|
|
|
activityFlag.set(false);
|
|
@@ -4749,6 +4757,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
|
|
|
goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
goodsDetailsDtos.add(goodsDetailsDto);
|
|
|
activityFlag.set(false);
|
|
@@ -4779,6 +4789,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
|
|
|
goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
|
|
|
goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
|
|
|
+ // 不涉及到积分时 其他优惠就是优惠金额
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(goodsDetailsDto.getDiscountedPrice());
|
|
|
goodsDetailsDto.setDeductionPrice(null);
|
|
|
goodsDetailsDtos.add(goodsDetailsDto);
|
|
|
activityFlag.set(false);
|
|
@@ -4806,7 +4818,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
queryGoodsVo.setTotalPrice(good.getActualPaymentAmount().multiply(BigDecimal.valueOf(good.getSellVolume())));
|
|
|
orderTotalPrice = orderTotalPrice.add(good.getRetailPrice().multiply(BigDecimal.valueOf(good.getSellVolume())));// 订单总金额 改为用零售价*数量
|
|
|
// 订单总价 总价减去 优惠活动的优惠价格 后续积分优惠 也从总金额中减去(打补丁操作
|
|
|
- // 这块设计有问题 :后续积分优惠金额 由总金额减去积分抵扣金额 但没有处理其他活动的优惠金额 补丁内容:如果这里有参加其他活动的商品 优惠金额要在这里减去)
|
|
|
+ // 这块设计有问题 :后续积分优惠金额 由总金额减去积分抵扣金额 但没有处理其他活动的优惠金额
|
|
|
+ // 补丁内容:如果这里有参加其他活动的商品 优惠金额要在这里减去)
|
|
|
orderTotalPrice = orderTotalPrice.subtract(good.getDiscountedPrice());
|
|
|
goodsVos.add(queryGoodsVo);
|
|
|
}
|
|
@@ -5099,6 +5112,9 @@ public class OrderServiceImpl implements OrderService {
|
|
|
}
|
|
|
// 设置总优惠金额
|
|
|
goodsDetailsDto.setDiscountedPrice(discountedPrice);
|
|
|
+ // 设置其他优惠金额
|
|
|
+ BigDecimal otherPrice = discountedPrice.subtract(goodsDetailsDto.getDeductionPrice());
|
|
|
+ goodsDetailsDto.setOtherDiscountedPrice(otherPrice);
|
|
|
LOGGER.info("--------------------------------------------------------");
|
|
|
LOGGER.info("【计算优惠价】sku:【{}】,条码:【{}】积分抵扣{}元,抵扣积分{}分", sku, prodBarcode, goodsDetailsDto.getDiscountedPrice(), shareScore.intValue());
|
|
|
LOGGER.info("--------------------------------------------------------");
|