| | |
| | | import com.talentcard.server.business.MoneyUtils; |
| | | import com.talentcard.server.business.merchant.MerchantPaymentReadinessService; |
| | | import com.talentcard.server.business.payment.HuifuRefundService; |
| | | import com.talentcard.server.business.payment.PaymentFundConfirmationService; |
| | | import com.talentcard.server.business.PageResult; |
| | | import com.talentcard.server.common.BusinessException; |
| | | import com.talentcard.server.common.ErrorCode; |
| | |
| | | private final HuifuRefundService refundService; |
| | | private final MerchantPaymentReadinessService merchantPaymentReadinessService; |
| | | private final OrderFundBoundaryService orderFundBoundary; |
| | | private final PaymentFundConfirmationService fundConfirmation; |
| | | |
| | | public OrderService(JdbcTemplate jdbcTemplate, HuifuRefundService refundService, MerchantPaymentReadinessService merchantPaymentReadinessService, OrderFundBoundaryService orderFundBoundary) { |
| | | public OrderService(JdbcTemplate jdbcTemplate, HuifuRefundService refundService, MerchantPaymentReadinessService merchantPaymentReadinessService, OrderFundBoundaryService orderFundBoundary, PaymentFundConfirmationService fundConfirmation) { |
| | | this.jdbcTemplate = jdbcTemplate; |
| | | this.refundService = refundService; |
| | | this.merchantPaymentReadinessService = merchantPaymentReadinessService; |
| | | this.orderFundBoundary = orderFundBoundary; |
| | | this.fundConfirmation = fundConfirmation; |
| | | } |
| | | |
| | | @Transactional |
| | |
| | | if (updated != 1) { |
| | | throw new BusinessException(ErrorCode.CONFLICT, "订单已核销"); |
| | | } |
| | | // 后台核销是第三条核销入口,同样要在核销后把延迟入账的钱确认给商户。 |
| | | fundConfirmation.confirmForOrder(orderId); |
| | | return detail(orderNo); |
| | | } |
| | | |