From 84913d997c70c2e3cc8406cf23eaba710cd5c9d6 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期一, 14 九月 2026 13:53:47 +0800
Subject: [PATCH] fix(payment): 扫码核销也要确认资金,并补上确认失败的补偿重试
---
talent-card-server/src/main/java/com/talentcard/server/business/order/OrderService.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/talent-card-server/src/main/java/com/talentcard/server/business/order/OrderService.java b/talent-card-server/src/main/java/com/talentcard/server/business/order/OrderService.java
index dc5d96c..1334a9a 100644
--- a/talent-card-server/src/main/java/com/talentcard/server/business/order/OrderService.java
+++ b/talent-card-server/src/main/java/com/talentcard/server/business/order/OrderService.java
@@ -11,6 +11,7 @@
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;
@@ -28,12 +29,14 @@
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
@@ -118,6 +121,8 @@
if (updated != 1) {
throw new BusinessException(ErrorCode.CONFLICT, "订单已核销");
}
+ // 后台核销是第三条核销入口,同样要在核销后把延迟入账的钱确认给商户。
+ fundConfirmation.confirmForOrder(orderId);
return detail(orderNo);
}
--
Gitblit v1.7.1