|
|
@@ -259,7 +259,6 @@ public class WalletService {
|
|
|
// 3. 更新余额
|
|
|
BigDecimal newBalance = userWallet.getBalanceWallet().add(amount);
|
|
|
if (behalfAmount != null) {
|
|
|
- newBalance = newBalance.subtract(BigDecimal.valueOf(behalfAmount));
|
|
|
//该订单存在冻结金额,解冻金额
|
|
|
long blockedCount = billingService.count(new LambdaQueryWrapper<UserBilling>().eq(UserBilling::getUserId, userId).eq(UserBilling::getDdId, billing.getDdId()).eq(UserBilling::getType, "4"));
|
|
|
if (blockedCount > 0) {
|
|
|
@@ -336,7 +335,7 @@ public class WalletService {
|
|
|
throw new ServiceException(MessageUtils.message("no.user.wallet.not.exist"));
|
|
|
}
|
|
|
// 3. 更新余额
|
|
|
- BigDecimal newBalance = userWallet.getBalanceWallet().add(amount).subtract(behalfAmount);
|
|
|
+ BigDecimal newBalance = userWallet.getBalanceWallet().add(amount);
|
|
|
|
|
|
// 4. 乐观锁更新钱包
|
|
|
LambdaUpdateWrapper<UserWallet> updateQuery = new LambdaUpdateWrapper<>();
|