| | |
| | | import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
|
| | | import com.xcong.excoin.modules.member.entity.MemberWalletContractEntity;
|
| | | import com.xcong.excoin.modules.platform.dao.PlatformCnyUsdtExchangeDao;
|
| | | import com.xcong.excoin.utils.CoinTypeConvert;
|
| | | import com.xcong.excoin.utils.MessageSourceUtils;
|
| | | import com.xcong.excoin.utils.RedisUtils;
|
| | |
|
| | | import cn.hutool.core.collection.CollUtil;
|
| | | import cn.hutool.core.util.ObjectUtil;
|
| | | import cn.hutool.core.util.StrUtil;
|
| | |
| | | MemberAccountMoneyChangeDao memberAccountMoneyChangeDao;
|
| | | @Resource
|
| | | MemberWalletAgentDao memberWalletAgentDao;
|
| | | @Resource
|
| | | RedisUtils redisUtils;
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | | walletCoin.setTotalBalance(totalCny.setScale(4, BigDecimal.ROUND_DOWN));
|
| | | } else {
|
| | | BigDecimal amount = walletCoin.getAvailableBalance().add(walletCoin.getFrozenBalance());
|
| | | BigDecimal closePrice = new BigDecimal("10.0000");
|
| | | // 获取最新价
|
| | | BigDecimal closePrice = new BigDecimal(redisUtils.getString(CoinTypeConvert.convertToKey(walletCoin.getWalletCode()+"/USDT")));
|
| | | BigDecimal totalUsdt = BigDecimal.ZERO;
|
| | | //Double closePrice = symbolsService.getCloseSymbolsBySymbolsName(walletCoin.getWalletCode()+"/USDT");
|
| | | totalUsdt = totalUsdt.add(amount.multiply(closePrice));
|
| | |
| | | memberWalletCoinInfoVo.setTotalBalance(total.multiply(cnyUsdt).setScale(4, BigDecimal.ROUND_DOWN));
|
| | |
|
| | | } else {
|
| | | BigDecimal closePrice = new BigDecimal("10.0000");
|
| | | BigDecimal closePrice = new BigDecimal(redisUtils.getString(CoinTypeConvert.convertToKey(symbol+"/USDT")));
|
| | | //Double closePrice = symbolsService.getCloseSymbolsBySymbolsName(wallet.getCode()+"/USDT");
|
| | | memberWalletCoinInfoVo.setTotalBalance(total.multiply(closePrice).multiply(cnyUsdt).setScale(4, BigDecimal.ROUND_DOWN));
|
| | | }
|