| | |
| | | import com.mzl.flower.mapper.supplier.StationMapper; |
| | | import com.mzl.flower.mapper.system.UserWechatMapper; |
| | | import com.mzl.flower.mapper.warehouse.WarehouseLocationMapper; |
| | | import com.mzl.flower.pay.SybPayService; |
| | | import com.mzl.flower.service.BaseService; |
| | | import com.mzl.flower.service.comment.FlowerCommentService; |
| | | import com.mzl.flower.service.coupon.CouponRecordService; |
| | |
| | | |
| | | @Autowired |
| | | private UserPaymentV3Service paymentV3Service; |
| | | |
| | | @Autowired |
| | | private UserPaymentSybService paymentSybService; |
| | | |
| | | @Autowired |
| | | private SequenceNo sequenceNo; |
| | |
| | | } |
| | | totalAmount = totalAmount.add(p.getPacking()).add(transportFee); |
| | | if(totalAmount.doubleValue() <= 0){//假如总价小于等于0,则支付0.01元 |
| | | totalAmount = new BigDecimal(0.01); |
| | | totalAmount = new BigDecimal("0.01"); |
| | | } |
| | | order.setTotalAmount(totalAmount); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | Map map = paymentSybService.prepay(order); |
| | | Map map = paymentV3Service.wxPrepay(order); |
| | | map.put("_testV2OrderId", order.getId()); |
| | | |
| | | return map; |
| | | } |
| | | |
| | |
| | | |
| | | transferId = "NoNeedRefund"; |
| | | if (deductAmount.doubleValue() > 0) { |
| | | transferId = paymentSybService.refundOrderSub(o, deductAmount); |
| | | transferId = paymentV3Service.refundOrderSub(o, deductAmount); |
| | | } |
| | | o.setTransferId(transferId); |
| | | orderMapper.updateById(o); |
| | |
| | | } |
| | | |
| | | BigDecimal amount = dto.getAmount(); |
| | | transferId = paymentSybService.refundOrderSub(o, amount); |
| | | transferId = paymentV3Service.refundOrderSub(o, amount); |
| | | o.setTransferId(transferId); |
| | | o.setTransferTime(LocalDateTime.now()); |
| | | o.update(SecurityUtils.getUserId()); |