|
@@ -707,10 +707,10 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
|
|
|
}
|
|
|
|
|
|
// 删除支付配置
|
|
|
- redisCacheService.deleteUserPaymentConfig(userId, userPaymentOrder.getOrderType().getCode());
|
|
|
+ redisCacheService.deleteUserPaymentConfig(userId, userPaymentOrder.getOrderNo());
|
|
|
|
|
|
// 删除下单配置
|
|
|
- redisCacheService.deleteUserOrderConfig(userId, userPaymentOrder.getOrderType().getCode());
|
|
|
+ redisCacheService.deleteUserOrderConfig(userId, userPaymentOrder.getOrderNo());
|
|
|
}
|
|
|
|
|
|
// 三方支付失败
|
|
@@ -729,7 +729,22 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
|
|
|
.cancelPayment(UserPaymentOrderWrapper.UserPaymentOrder.from(JSON.toJSONString(userPaymentOrder)), paymentResp);
|
|
|
|
|
|
// 删除本地缓存
|
|
|
- redisCacheService.deleteUserPaymentConfig(userId, userPaymentOrder.getOrderType().getCode());
|
|
|
+ redisCacheService.deleteUserPaymentConfig(userId, userPaymentOrder.getOrderNo());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 三方订单关闭状态
|
|
|
+ if (PaymentStatus.CLOSED == paymentResp.getPaymentStatus() && EPaymentStatus.CLOSED != userPaymentOrder.getStatus()) {
|
|
|
+
|
|
|
+ // 订单关闭流程
|
|
|
+ SpringContextHolder.getBean(UserPaymentCoreService.class)
|
|
|
+ .cancelPayment(UserPaymentOrderWrapper.UserPaymentOrder.from(JSON.toJSONString(userPaymentOrder)), paymentResp);
|
|
|
+
|
|
|
+ // 删除本地缓存
|
|
|
+ redisCacheService.deleteUserPaymentConfig(userId, userPaymentOrder.getOrderNo());
|
|
|
+
|
|
|
+ // 删除下单配置
|
|
|
+ redisCacheService.deleteUserOrderConfig(userId, userPaymentOrder.getOrderNo());
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|