记得上下班打卡 | git大法好,push需谨慎

Commit 5f6cd7d7 authored by 胡佳晨's avatar 胡佳晨

修改 优惠券纪录

parent b2aca26e
......@@ -503,7 +503,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (item.getStoreOrder().getPriceVoucher().compareTo(BigDecimal.ZERO) > 0) {
if (preParam.getStoreSpuIds().size() > 0 || preParam.getPlatformSpuIds().size() > 0) {//指定范围商品券
if (preParam.getStoreSpuIds().contains(orderSku.getSpuId()) || preParam.getPlatformSpuIds().contains(orderSku.getSpuId())) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if (restVoucherPrice.compareTo(BigDecimal.ZERO) < 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
}
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice());
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
......@@ -515,7 +517,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
} else {//全部商品券
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if (restVoucherPrice.compareTo(BigDecimal.ZERO) < 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
}
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice());
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
......
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