【功能优化】支付:钱包余额变化,增加 @Transactional 注解
This commit is contained in:
parent
a6e5b2880b
commit
639ce7bb31
|
@ -180,7 +180,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
||||||
.setReason("想退钱").setPrice(walletRecharge.getPayPrice()));
|
.setReason("想退钱").setPrice(walletRecharge.getPayPrice()));
|
||||||
|
|
||||||
// 4. 更新充值记录退款单号
|
// 4. 更新充值记录退款单号
|
||||||
// TODO @jaosn:一般新建这种 update 对象,建议是,第一个 set id 属性,容易知道以它为更新
|
|
||||||
walletRechargeMapper.updateById(new PayWalletRechargeDO().setPayRefundId(payRefundId)
|
walletRechargeMapper.updateById(new PayWalletRechargeDO().setPayRefundId(payRefundId)
|
||||||
.setRefundStatus(WAITING.getStatus()).setId(walletRecharge.getId()));
|
.setRefundStatus(WAITING.getStatus()).setId(walletRecharge.getId()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,6 +121,7 @@ public class PayWalletServiceImpl implements PayWalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public PayWalletTransactionDO reduceWalletBalance(Long walletId, Long bizId,
|
public PayWalletTransactionDO reduceWalletBalance(Long walletId, Long bizId,
|
||||||
PayWalletBizTypeEnum bizType, Integer price) {
|
PayWalletBizTypeEnum bizType, Integer price) {
|
||||||
// 1. 获取钱包
|
// 1. 获取钱包
|
||||||
|
@ -158,6 +159,7 @@ public class PayWalletServiceImpl implements PayWalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public PayWalletTransactionDO addWalletBalance(Long walletId, String bizId,
|
public PayWalletTransactionDO addWalletBalance(Long walletId, String bizId,
|
||||||
PayWalletBizTypeEnum bizType, Integer price) {
|
PayWalletBizTypeEnum bizType, Integer price) {
|
||||||
// 1.1 获取钱包
|
// 1.1 获取钱包
|
||||||
|
|
Loading…
Reference in New Issue