【同步】BOOT 和 CLOUD 的功能

This commit is contained in:
YunaiV
2026-01-18 19:01:29 +08:00
parent 2e317b165b
commit 304b2f102a
75 changed files with 3249 additions and 155 deletions

View File

@@ -174,7 +174,11 @@ public class PayWalletServiceImpl implements PayWalletService {
}
// 3. 生成钱包流水
Integer afterBalance = payWallet.getBalance() - price;
// 情况一充值退款balance 在冻结时已扣updateWhenRechargeRefund 只扣 freeze_price所以 afterBalance 不变。https://t.zsxq.com/OJk9m
// 情况二消费支付updateWhenConsumption 从 balance 扣,所以 afterBalance = balance - price
Integer afterBalance = bizType == PayWalletBizTypeEnum.RECHARGE_REFUND
? payWallet.getBalance()
: payWallet.getBalance() - price;
WalletTransactionCreateReqBO bo = new WalletTransactionCreateReqBO().setWalletId(payWallet.getId())
.setPrice(-price).setBalance(afterBalance).setBizId(String.valueOf(bizId))
.setBizType(bizType.getType()).setTitle(bizType.getDescription());