mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -40,7 +40,9 @@ public class CacheConstants {
|
||||
public static final String PILE_PROGRAM_VERSION = "pile_program_version_";
|
||||
|
||||
// 查询订单回调
|
||||
public static final String QUERY_ORDER_CALLBACK = "query_order_callback:";
|
||||
public static final String QUERY_ORDER_WECHAT_CALLBACK = "query_order_wechat_callback:";
|
||||
|
||||
public static final String QUERY_ORDER_ADAPAY_CALLBACK = "query_order_adapay_callback:";
|
||||
|
||||
// 汇付支付参数
|
||||
public static final String ADAPAY_ORDER_PARAM = "adapay_order_param:";
|
||||
|
||||
@@ -64,7 +64,7 @@ public class AdapayCallbackRecordServiceImpl implements AdapayCallbackRecordServ
|
||||
if (StringUtils.isBlank(orderCode)) {
|
||||
return null;
|
||||
}
|
||||
String redisKey = CacheConstants.QUERY_ORDER_CALLBACK + orderCode;
|
||||
String redisKey = CacheConstants.QUERY_ORDER_ADAPAY_CALLBACK + orderCode;
|
||||
AdapayCallbackRecord record = redisCache.getCacheObject(redisKey);
|
||||
if (record != null) {
|
||||
return record;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class WxpayCallbackRecordServiceImpl implements WxpayCallbackRecordServic
|
||||
if (StringUtils.isBlank(orderCode)) {
|
||||
return null;
|
||||
}
|
||||
String redisKey = CacheConstants.QUERY_ORDER_CALLBACK + orderCode;
|
||||
String redisKey = CacheConstants.QUERY_ORDER_WECHAT_CALLBACK + orderCode;
|
||||
WxpayCallbackRecord wxpayCallbackRecord = redisCache.getCacheObject(redisKey);
|
||||
if (wxpayCallbackRecord != null) {
|
||||
return wxpayCallbackRecord;
|
||||
|
||||
Reference in New Issue
Block a user