| | |
| | | WalletExtendService walletExtendService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Wallet findByUserId(String userId) { |
| | | Wallet wallet = getOne(Wrappers.<Wallet>query().lambda().eq(Wallet::getUserId, userId)); |
| | |
| | | if (!"".equals(partyId) && partyId != null) { |
| | | wallet = saveWalletByPartyId(partyId.toString()); |
| | | } |
| | | |
| | | //资金账户 |
| | | CapitaltWallet capitaltWallet = capitaltWalletMapper.selectOne(new LambdaQueryWrapper<>(CapitaltWallet.class) |
| | | .eq(CapitaltWallet::getUserId, partyId).last(" limit 1 ")); |
| | | money = wallet.getMoney().doubleValue(); |
| | | // 钱包USDT |
| | | money_wallet = wallet.getMoney().doubleValue(); |
| | | money_wallet = wallet.getMoney().doubleValue()+wallet.getFreezeMoney().doubleValue(); |
| | | // 币余额 |
| | | money_coin = this.getMoneyCoin(partyId, realtime_all, list_symbol); |
| | | money_coin = this.getMoneyCoin(partyId, realtime_all, list_symbol)+capitaltWallet.getMoney().doubleValue()+capitaltWallet.getFreezeMoney().doubleValue(); |
| | | money = money + money_coin; |
| | | // 钱包USDT+币余额 |
| | | money_all_coin = money; |
| | |
| | | data.put("money_all_coin", df2.format(money_all_coin)); |
| | | data.put("money_miner", df2.format(money_miner)); |
| | | data.put("money_finance", df2.format(money_finance)); |
| | | data.put("money_contract", df2.format(Arith.add(money_contract, money_contractApply))); |
| | | data.put("money_contract", df2.format(Arith.add(money_contract_deposit, money_contractApply))); |
| | | data.put("money_contract_deposit", df2.format(money_contract_deposit)); |
| | | data.put("money_contract_profit", df2.format(money_contract_profit)); |
| | | data.put("money_futures", df2.format(money_futures)); |
| | |
| | | } |
| | | |
| | | if (realtime != null) { |
| | | money_coin = Arith.add(money_coin, Arith.mul(realtime.getClose().doubleValue(), walletExtend.getAmount())); |
| | | money_coin = Arith.add(money_coin, Arith.mul(realtime.getClose().doubleValue(), walletExtend.getAmount()+walletExtend.getFreezeAmount())); |
| | | } |
| | | } |
| | | } |