This commit is contained in:
2023-07-07 11:22:10 +08:00
parent bbaa7aed67
commit 5efbc85804
4 changed files with 27 additions and 3 deletions

View File

@@ -909,6 +909,28 @@ public class OrderService {
// 使用微信支付
payInfo.setPayMode(OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue());
payInfo.setPayModeDesc(OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getLabel());
// 判断是微信支付还是汇付支付
MemberTransactionRecord record = memberTransactionRecordService.selectByOrderCode(orderCode);
if (record != null) {
String paymentInstitutions = record.getPaymentInstitutions();
if (StringUtils.equals(paymentInstitutions, PaymentInstitutionsEnum.WECHAT_PAY.getValue())) {
// 查微信支付回调记录
WxpayCallbackRecord wxpayCallbackRecord = wxpayCallbackRecordService.selectByOrderCode(orderCode);
if (wxpayCallbackRecord != null) {
payInfo.setOutTradeNo(wxpayCallbackRecord.getOutTradeNo());
payInfo.setTransactionId(wxpayCallbackRecord.getTransactionId());
}
} else if (StringUtils.equals(paymentInstitutions, PaymentInstitutionsEnum.ADAPAY.getValue())) {
// 查询汇付支付回调
AdapayCallbackRecord adapayCallbackRecord = adapayCallbackRecordService.selectByOrderCode(orderCode);
if (adapayCallbackRecord != null) {
payInfo.setOutTradeNo(adapayCallbackRecord.getPaymentId());
payInfo.setTransactionId(adapayCallbackRecord.getOutTransId());
}
}
}
// 查微信支付回调记录
WxpayCallbackRecord wxpayCallbackRecord = wxpayCallbackRecordService.selectByOrderCode(orderCode);
if (wxpayCallbackRecord != null) {