| | |
| | | return new BigDecimal(0); |
| | | } |
| | | |
| | | if(couponAmount.doubleValue() >= totalAmount.doubleValue()){ |
| | | if(couponAmount.compareTo(totalAmount) >= 0){ |
| | | return price; |
| | | } |
| | | if(isLastOne){//最后的商品使用优惠券剩下的面值 |
| | |
| | | deductAmount = deductAmount.add(a.getDeductAmount()); |
| | | } |
| | | |
| | | o.setTransferTime(LocalDateTime.now()); |
| | | o.update(SecurityUtils.getUserId()); |
| | | |
| | | transferId = "NoNeedRefund"; |
| | | if (deductAmount.doubleValue() > 0) { |
| | | transferId = paymentV3Service.refundOrderSub(o, deductAmount); |
| | | } |
| | | o.setTransferId(transferId); |
| | | o.setTransferTime(LocalDateTime.now()); |
| | | o.update(SecurityUtils.getUserId()); |
| | | orderMapper.updateById(o); |
| | | |
| | | } |
| | | |
| | | public void processLevelDown(OrderReduceDTO dto) { |