fix(退款): 修复旧订单退款商户不一致问题

检查订单创建时间以确定使用新旧商户进行退款。旧订单需使用旧商户退款,若失败则尝试新商户退款。
This commit is contained in:
dzq 2025-06-11 10:19:52 +08:00
parent 40e062933d
commit 0e0eeba3a3
1 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,9 @@ public class ReturnApprovalApplicationService {
// 微信退款
RefundVO refundVO = null;
try {
// 检查订单创建时间是否在2025年6月10日11:05之前
/* 检查订单创建时间是否在2025年6月10日11:05之前
之前的旧订单收款商户和新订单收款商户不一致需要使用旧订单收款商户进行退款
*/
Date cutoffDate = DateUtil.parse("2025-06-10 11:05:00", "yyyy-MM-dd HH:mm:ss");
if (orderModel.getCreateTime().after(cutoffDate)) {
refundVO = paymentApplicationService.refund(
@ -181,6 +183,7 @@ public class ReturnApprovalApplicationService {
paymentOperationLogCommand.initBaseEntity();
paymentOperationLogApplicationService.addPaymentOperationLog(paymentOperationLogCommand);
// 若还是失败使用新订单收款商户进行退款
refundVO = paymentApplicationService.refund(
PayApiConstants.biz_id, PayApiConstants.appkey,
orderModel.getBizOrderId(), orderModel.getUcid(),