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

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

提交 正在下单用券bug

parent 5a77f434
......@@ -502,7 +502,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderSku orderSku = item.getOrderSkuList().get(i);
if (item.getStoreOrder().getPriceVoucher().compareTo(BigDecimal.ZERO) > 0) {
if (preParam.getStoreSpuIds().size() > 0 || preParam.getPlatformSpuIds().size() > 0) {//指定范围商品券
String spuId = orderSku.getSpuId();
String spuId = orderSku.getSpuId();
String pre = GoblinStatusConst.MarketPreStatus.getPre(spuId);
if (pre != null) {
spuId = spuId.split(pre)[0];
......@@ -513,10 +513,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if(restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
if (restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice());
}else{
orderSku.setPriceVoucher(restVoucherPrice);
} else {
orderSku.setPriceVoucher(restVoucherPrice.add(orderSku.getSkuPrice()));
}
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
orderSku.setSkuPriceActual(skuPriceActual.compareTo(BigDecimal.ZERO) > 0 ? skuPriceActual : BigDecimal.ZERO);
......@@ -536,10 +536,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
if (restVoucherPrice.compareTo(BigDecimal.ZERO) > 0) {
restVoucherPrice = restVoucherPrice.subtract(orderSku.getSkuPrice());
if(restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
if (restVoucherPrice.compareTo(BigDecimal.ZERO) >= 0) {
orderSku.setPriceVoucher(orderSku.getSkuPrice());
}else{
orderSku.setPriceVoucher(restVoucherPrice);
} else {
orderSku.setPriceVoucher(restVoucherPrice.add(orderSku.getSkuPrice()));
}
BigDecimal skuPriceActual = orderSku.getSkuPrice().subtract(orderSku.getSkuPrice());
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