🎨 优化代码
This commit is contained in:
parent
16ad1d32e6
commit
0abc97d64f
@ -2,7 +2,6 @@ package com.rymcu.forest.lucene.util;
|
|||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.rymcu.forest.lucene.model.ArticleLucene;
|
|
||||||
import com.rymcu.forest.lucene.model.PortfolioLucene;
|
import com.rymcu.forest.lucene.model.PortfolioLucene;
|
||||||
import org.apache.lucene.document.Document;
|
import org.apache.lucene.document.Document;
|
||||||
import org.apache.lucene.document.Field;
|
import org.apache.lucene.document.Field;
|
||||||
|
@ -26,8 +26,6 @@ import java.util.Objects;
|
|||||||
@Service
|
@Service
|
||||||
public class BankAccountServiceImpl extends AbstractService<BankAccount> implements BankAccountService {
|
public class BankAccountServiceImpl extends AbstractService<BankAccount> implements BankAccountService {
|
||||||
|
|
||||||
private static String DEFAULT_ACCOUNT_TYPE = "0";
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
BankAccountMapper bankAccountMapper;
|
BankAccountMapper bankAccountMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@ -35,15 +33,15 @@ public class BankAccountServiceImpl extends AbstractService<BankAccount> impleme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BankAccountDTO> findBankAccounts(BankAccountSearchDTO bankAccountSearchDTO) {
|
public List<BankAccountDTO> findBankAccounts(BankAccountSearchDTO bankAccountSearchDTO) {
|
||||||
List<BankAccountDTO> bankAccounts = bankAccountMapper.selectBankAccounts(bankAccountSearchDTO.getBankName(), bankAccountSearchDTO.getAccountOwnerName(), bankAccountSearchDTO.getBankAccount());
|
return bankAccountMapper.selectBankAccounts(bankAccountSearchDTO.getBankName(), bankAccountSearchDTO.getAccountOwnerName(), bankAccountSearchDTO.getBankAccount());
|
||||||
return bankAccounts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BankAccountDTO findBankAccountByIdUser(Integer idUser) {
|
public BankAccountDTO findBankAccountByIdUser(Integer idUser) {
|
||||||
BankAccount bankAccount = new BankAccount();
|
BankAccount bankAccount = new BankAccount();
|
||||||
bankAccount.setAccountOwner(idUser);
|
bankAccount.setAccountOwner(idUser);
|
||||||
bankAccount.setAccountType(DEFAULT_ACCOUNT_TYPE);
|
String defaultAccountType = "0";
|
||||||
|
bankAccount.setAccountType(defaultAccountType);
|
||||||
List<BankAccount> bankAccounts = bankAccountMapper.select(bankAccount);
|
List<BankAccount> bankAccounts = bankAccountMapper.select(bankAccount);
|
||||||
BankAccountDTO bankAccountDTO;
|
BankAccountDTO bankAccountDTO;
|
||||||
if (Objects.nonNull(bankAccounts) && bankAccounts.size() > 0) {
|
if (Objects.nonNull(bankAccounts) && bankAccounts.size() > 0) {
|
||||||
@ -68,8 +66,7 @@ public class BankAccountServiceImpl extends AbstractService<BankAccount> impleme
|
|||||||
startDate = LocalDateTimeUtil.format(now.minus(30, ChronoUnit.DAYS), "yyyy-MM-dd");
|
startDate = LocalDateTimeUtil.format(now.minus(30, ChronoUnit.DAYS), "yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
// 查询交易记录
|
// 查询交易记录
|
||||||
List<TransactionRecordDTO> records = transactionRecordService.findTransactionRecords(bankAccount, startDate, endDate);
|
return transactionRecordService.findTransactionRecords(bankAccount, startDate, endDate);
|
||||||
return records;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user