🐛 答题奖励发放失败问题修复

This commit is contained in:
ronger 2021-06-30 17:34:43 +08:00
parent d4d5d8b616
commit ab15640099
3 changed files with 15 additions and 1 deletions

View File

@ -38,4 +38,11 @@ public interface BankAccountService extends Service<BankAccount> {
* @return
*/
BankAccount findSystemBankAccount();
/**
* 查询账号信息
* @param formBankAccount
* @return
*/
BankAccount findInfoByBankAccount(String formBankAccount);
}

View File

@ -74,6 +74,13 @@ public class BankAccountServiceImpl extends AbstractService<BankAccount> impleme
return bankAccountMapper.selectOne(bankAccount);
}
@Override
public BankAccount findInfoByBankAccount(String bankAccount) {
BankAccount searchBankAccount = new BankAccount();
searchBankAccount.setBankAccount(bankAccount);
return bankAccountMapper.selectOne(searchBankAccount);
}
private String nextBankAccount() {
String bankAccount = "600000001";
String maxBankAccount = bankAccountMapper.selectMaxBankAccount();

View File

@ -136,7 +136,7 @@ public class TransactionRecordServiceImpl extends AbstractService<TransactionRec
}
private boolean checkFormAccountStatus(String formBankAccount, BigDecimal money) {
BankAccountDTO bankAccount = bankAccountService.findByBankAccount(formBankAccount);
BankAccount bankAccount = bankAccountService.findInfoByBankAccount(formBankAccount);
if (Objects.nonNull(bankAccount)) {
if (bankAccount.getAccountBalance().compareTo(money) > 0) {
return true;