From 639ce7bb31ce747b1c5ef8d23ff2dc4fcb67577c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 17 Sep 2024 15:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E6=94=AF=E4=BB=98=EF=BC=9A=E9=92=B1=E5=8C=85=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E5=8F=98=E5=8C=96=EF=BC=8C=E5=A2=9E=E5=8A=A0=20@Trans?= =?UTF-8?q?actional=20=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/pay/service/wallet/PayWalletRechargeServiceImpl.java | 1 - .../yudao/module/pay/service/wallet/PayWalletServiceImpl.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java index 98e32ec79..7e9e58840 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java @@ -180,7 +180,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { .setReason("想退钱").setPrice(walletRecharge.getPayPrice())); // 4. 更新充值记录退款单号 - // TODO @jaosn:一般新建这种 update 对象,建议是,第一个 set id 属性,容易知道以它为更新 walletRechargeMapper.updateById(new PayWalletRechargeDO().setPayRefundId(payRefundId) .setRefundStatus(WAITING.getStatus()).setId(walletRecharge.getId())); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java index b844e3769..e24e788b2 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java @@ -121,6 +121,7 @@ public class PayWalletServiceImpl implements PayWalletService { } @Override + @Transactional(rollbackFor = Exception.class) public PayWalletTransactionDO reduceWalletBalance(Long walletId, Long bizId, PayWalletBizTypeEnum bizType, Integer price) { // 1. 获取钱包 @@ -158,6 +159,7 @@ public class PayWalletServiceImpl implements PayWalletService { } @Override + @Transactional(rollbackFor = Exception.class) public PayWalletTransactionDO addWalletBalance(Long walletId, String bizId, PayWalletBizTypeEnum bizType, Integer price) { // 1.1 获取钱包