记录支付机构

This commit is contained in:
2023-05-22 13:57:12 +08:00
parent ae07c614d0
commit de76a5d456
3 changed files with 37 additions and 1 deletions

View File

@@ -394,6 +394,7 @@ public class OrderService {
.memberId(memberVO.getMemberId())
.actionType(ActionTypeEnum.FORWARD.getValue())
.payMode(PayModeEnum.PAYMENT_OF_BALANCE.getValue())
.paymentInstitutions(PaymentInstitutionsEnum.LOCAL_ACCOUNTS.getValue())
.amount(dto.getPayAmount()) // 单位元
.build();
memberTransactionRecordService.insertSelective(record);
@@ -730,6 +731,7 @@ public class OrderService {
.memberId(memberId)
.actionType(ActionTypeEnum.FORWARD.getValue())
.payMode(PayModeEnum.PAYMENT_OF_WECHATPAY.getValue())
.paymentInstitutions(PaymentInstitutionsEnum.WECHAT_PAY.getValue())
.amount(amount) // 单位元
.outTradeNo(String.valueOf(map.get("out_trade_no")))
.transactionId(String.valueOf(map.get("transaction_id")))

View File

@@ -0,0 +1,32 @@
package com.jsowell.common.enums.ykc;
public enum PaymentInstitutionsEnum {
LOCAL_ACCOUNTS("0", "本地账户支付"),
WECHAT_PAY("1", "微信支付"),
ADAPAY("2", "汇付支付"),
;
private String value;
private String label;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
PaymentInstitutionsEnum(String value, String label) {
this.value = value;
this.label = label;
}
}

View File

@@ -8,6 +8,7 @@ import com.google.common.collect.Maps;
import com.jsowell.common.enums.MemberWalletEnum;
import com.jsowell.common.enums.ykc.ActionTypeEnum;
import com.jsowell.common.enums.ykc.PayModeEnum;
import com.jsowell.common.enums.ykc.PaymentInstitutionsEnum;
import com.jsowell.common.enums.ykc.ScenarioEnum;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
@@ -321,13 +322,14 @@ public class WechatPayServiceImpl implements WechatPayService {
.build();
wxpayRefundCallbackService.insertSelective(record);
// 余额支付订单 记录会员交易流水
// 记录会员交易流水
MemberTransactionRecord memberTransactionRecord = MemberTransactionRecord.builder()
.orderCode(orderCode)
.scenarioType(wxpayCallbackRecord.getPayScenario())
.memberId(memberId)
.actionType(ActionTypeEnum.REVERSE.getValue())
.payMode(PayModeEnum.PAYMENT_OF_WECHATPAY.getValue())
.paymentInstitutions(PaymentInstitutionsEnum.WECHAT_PAY.getValue())
.amount(refundAmount) // 记录会员交易流水,单位元
.outTradeNo(out_trade_no)
.transactionId(transaction_id)