| | |
| | | import com.yami.trading.bean.exchange.ExchangeApplyOrder; |
| | | import com.yami.trading.bean.exchange.dto.ExchangeSymbolDto; |
| | | import com.yami.trading.bean.exchange.dto.SumEtfDto; |
| | | import com.yami.trading.bean.model.RealNameAuthRecord; |
| | | import com.yami.trading.bean.model.User; |
| | | import com.yami.trading.bean.model.Wallet; |
| | | import com.yami.trading.bean.model.WalletExtend; |
| | | import com.yami.trading.bean.model.*; |
| | | import com.yami.trading.bean.purchasing.dto.ExchangeLock; |
| | | import com.yami.trading.bean.syspara.domain.Syspara; |
| | | import com.yami.trading.common.domain.Result; |
| | |
| | | import com.yami.trading.common.util.StringUtils; |
| | | import com.yami.trading.common.util.ThreadUtils; |
| | | import com.yami.trading.security.common.util.SecurityUtils; |
| | | import com.yami.trading.service.CapitaltWalletService; |
| | | import com.yami.trading.service.RealNameAuthRecordService; |
| | | import com.yami.trading.service.SessionTokenService; |
| | | import com.yami.trading.service.WalletService; |
| | |
| | | RealNameAuthRecordService realNameAuthRecordService; |
| | | @Autowired |
| | | ItemService itemService; |
| | | @Autowired |
| | | CapitaltWalletService capitaltWalletService; |
| | | |
| | | /** |
| | | * 兑换币 如果是使用usdt兑换其他币种,则直接执行正常买币open流程 如果是其他币种--》usdt 则是直接卖币流程 |
| | |
| | | public Result openview() { |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | String partyId = SecurityUtils.getUser().getUserId(); |
| | | Wallet wallet = walletService.saveWalletByPartyId(partyId); |
| | | // Wallet wallet = walletService.saveWalletByPartyId(partyId); |
| | | CapitaltWallet userIdWallet = capitaltWalletService.getUserIdWallet(partyId); |
| | | // 账户剩余资金 |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | df.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | data.put("volume", df.format(wallet.getMoney())); |
| | | data.put("volume", df.format(userIdWallet.getMoney())); |
| | | String session_token = sessionTokenService.savePut(partyId); |
| | | data.put("session_token", session_token); |
| | | data.put("fee", sysparaService.find("exchange_apply_order_buy_fee").getSvalue()); |