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

Commit a03fe10e authored by 胡佳晨's avatar 胡佳晨

增加逻辑 如果支付金额 低于快递费 则 需要支付快递费金额

parent 2d25206a
......@@ -355,6 +355,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
storeOrder.setPriceTotal(storeTotalPrice.add(storeOrder.getPriceExpress()));
BigDecimal priceActual = storeOrder.getPriceTotal().subtract(voucherPrice).subtract(storeVoucherPrice);
if(priceActual.compareTo(storeOrder.getPriceExpress())<0){
priceActual = storeOrder.getPriceExpress();
}
storeOrder.setPriceActual(priceActual.compareTo(BigDecimal.ZERO)<0?BigDecimal.ZERO:priceActual);
storeOrder.setPriceRefund(BigDecimal.ZERO);
storeOrder.setPriceCoupon(voucherPrice);
......
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