From de76a5d456db0b172ac39a26863d83bd7afd9c9a Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Mon, 22 May 2023 13:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=94=AF=E4=BB=98=E6=9C=BA?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jsowell/service/OrderService.java | 2 ++ .../enums/ykc/PaymentInstitutionsEnum.java | 32 +++++++++++++++++++ .../service/impl/WechatPayServiceImpl.java | 4 ++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 jsowell-common/src/main/java/com/jsowell/common/enums/ykc/PaymentInstitutionsEnum.java diff --git a/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java b/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java index 6e0daca4e..80a0cde34 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java @@ -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"))) diff --git a/jsowell-common/src/main/java/com/jsowell/common/enums/ykc/PaymentInstitutionsEnum.java b/jsowell-common/src/main/java/com/jsowell/common/enums/ykc/PaymentInstitutionsEnum.java new file mode 100644 index 000000000..c4809884d --- /dev/null +++ b/jsowell-common/src/main/java/com/jsowell/common/enums/ykc/PaymentInstitutionsEnum.java @@ -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; + } +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/WechatPayServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/WechatPayServiceImpl.java index 7e95bc1e8..d7d2f5025 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/WechatPayServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/WechatPayServiceImpl.java @@ -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)