|
@@ -214,7 +214,7 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
|
|
|
// 更新用户账户
|
|
// 更新用户账户
|
|
|
SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId(),systemCode);
|
|
SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId(),systemCode);
|
|
|
AssertionUtils.isFail(Objects.isNull(userAccount), "用户账户数据异常!");
|
|
AssertionUtils.isFail(Objects.isNull(userAccount), "用户账户数据异常!");
|
|
|
- AssertionUtils.isFail(audit.getAmount().compareTo(audit.getBalanceAmount()) > 0, "提现金额大于账户余额!");
|
|
|
|
|
|
|
+ AssertionUtils.isFail(audit.getAmount().compareTo(userAccount.getSumAmountUnpaid()) > 0, "提现金额大于账户余额!");
|
|
|
if(userAccount.getSumAmountUnpaid().compareTo(audit.getAmount()) < 0){
|
|
if(userAccount.getSumAmountUnpaid().compareTo(audit.getAmount()) < 0){
|
|
|
log.info("账户金额少于提现金额,请审核账户。 userId=[{}}], userAccount.getSumAmount()=[{}],audit.getAmount()=[{}]",userAccount.getUserId(), userAccount.getSumAmount(), audit.getAmount());
|
|
log.info("账户金额少于提现金额,请审核账户。 userId=[{}}], userAccount.getSumAmount()=[{}],audit.getAmount()=[{}]",userAccount.getUserId(), userAccount.getSumAmount(), audit.getAmount());
|
|
|
throw new SystemException("账户金额少于提现金额,请审核账户");
|
|
throw new SystemException("账户金额少于提现金额,请审核账户");
|