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

Commit 145e2287 authored by 胡佳晨's avatar 胡佳晨

提交 正在下单用券bug

parent 5a77f434
...@@ -513,10 +513,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -513,10 +513,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
} }
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) { if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice()); restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if(restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) { if (restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice()); orderSku.setPriceVoucher(orderSku.getSkuPrice());
}else{ } else {
orderSku.setPriceVoucher(restVoucherPrice); orderSku.setPriceVoucher(restVoucherPrice.add(orderSku.getSkuPrice()));
} }
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice()); BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
orderSku.setSkuPriceActual(skuPriceActual.compareTo(BigDecimal.ZERO) > 0 ? skuPriceActual : BigDecimal.ZERO); orderSku.setSkuPriceActual(skuPriceActual.compareTo(BigDecimal.ZERO) > 0 ? skuPriceActual : BigDecimal.ZERO);
...@@ -536,10 +536,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -536,10 +536,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
} }
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) { if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice()); restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if(restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) { if (restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice()); orderSku.setPriceVoucher(orderSku.getSkuPrice());
}else{ } else {
orderSku.setPriceVoucher(restVoucherPrice); orderSku.setPriceVoucher(restVoucherPrice.add(orderSku.getSkuPrice()));
} }
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice()); BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
orderSku.setSkuPriceActual(skuPriceActual.compareTo(BigDecimal.ZERO) > 0 ? skuPriceActual : BigDecimal.ZERO); orderSku.setSkuPriceActual(skuPriceActual.compareTo(BigDecimal.ZERO) > 0 ? skuPriceActual : BigDecimal.ZERO);
......
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