修改支付逻辑

This commit is contained in:
牛叉闪闪 2024-08-27 09:45:03 +08:00
parent 6705689d34
commit 2461e5d808
1 changed files with 3 additions and 0 deletions

View File

@ -594,6 +594,9 @@ public class PayService {
return Result.fail(CodeEnum.MEMBERINSUFFICIENTFUNDS);
}
if(ObjectUtil.isEmpty(payAmount)||ObjectUtil.isNull(payAmount)){
payAmount=orderInfo.getOrderAmount();
}
user.setAmount(user.getAmount().subtract(payAmount));
user.setConsumeAmount(user.getConsumeAmount().add(payAmount));
user.setConsumeNumber(user.getConsumeNumber() + 1);