|
|
@ -48,7 +48,7 @@ public class WalletAccountQueryServiceImpl implements WalletAccountQueryService |
|
|
WalletAccount walletAccount = queryByUserId(userId); |
|
|
WalletAccount walletAccount = queryByUserId(userId); |
|
|
if (Objects.nonNull(walletAccount)) { |
|
|
if (Objects.nonNull(walletAccount)) { |
|
|
walletAccountVo = TypeConvertUtils.convert(walletAccount, UserGetWalletAccountVo.class); |
|
|
walletAccountVo = TypeConvertUtils.convert(walletAccount, UserGetWalletAccountVo.class); |
|
|
walletAccountVo.setTotalWithdraw(walletAccountRecordDao.selectList(new LambdaQueryWrapper<WalletAccountRecord>() |
|
|
|
|
|
|
|
|
walletAccountVo.setTotalWithdrawBalance(walletAccountRecordDao.selectList(new LambdaQueryWrapper<WalletAccountRecord>() |
|
|
.eq(WalletAccountRecord::getWalletAccountId, walletAccount.getId()) |
|
|
.eq(WalletAccountRecord::getWalletAccountId, walletAccount.getId()) |
|
|
.eq(WalletAccountRecord::getTradeType, TradeTypeEnum.WITHDRAW)) |
|
|
.eq(WalletAccountRecord::getTradeType, TradeTypeEnum.WITHDRAW)) |
|
|
.stream().map(WalletAccountRecord::getTradeAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); |
|
|
.stream().map(WalletAccountRecord::getTradeAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); |
|
|
|