| | |
| | | import com.yami.trading.common.util.ThreadUtils; |
| | | import com.yami.trading.security.common.util.SecurityUtils; |
| | | import com.yami.trading.service.MarketOpenChecker; |
| | | import com.yami.trading.service.RealNameAuthRecordService; |
| | | import com.yami.trading.service.SessionTokenService; |
| | | import com.yami.trading.service.WalletService; |
| | | import com.yami.trading.service.contract.ContractApplyOrderService; |
| | |
| | | private SessionTokenService sessionTokenService; |
| | | @Autowired |
| | | TipService tipService; |
| | | @Autowired |
| | | private RealNameAuthRecordService realNameAuthRecordService; |
| | | // @Autowired |
| | | // private ExchangeRateService exchangeRateService; |
| | | |
| | |
| | | throw new YamiShopBindException("用户已锁定"); |
| | | } |
| | | validateTradePermission(user); |
| | | realNameAuthRecordService.requireApproved(user, true); |
| | | |
| | | Syspara syspara = sysparaService.find("stop_user_internet"); |
| | | String stopUserInternet = syspara.getSvalue(); |
| | |
| | | order.setPartyId(partyId); |
| | | order.setSymbol(closeAction.getSymbol()); |
| | | order.setDirection(closeAction.getDirection()); |
| | | order.setOffset(ContractApplyOrder.OFFSET_OPEN); |
| | | order.setOffset(ContractApplyOrder.OFFSET_CLOSE); |
| | | order.setVolume(closeAction.getAmount()); |
| | | order.setVolumeOpen(closeAction.getAmount()); |
| | | order.setPrice(closeAction.getPrice()); |
| | |
| | | // 模拟账户不做二步校验限制 |
| | | if (user.getAccountType() != null && user.getAccountType() == 1) { |
| | | return; |
| | | } |
| | | if (!user.isGoogleAuthBind() || StringUtils.isEmptyString(user.getSafePassword())) { |
| | | throw new YamiShopBindException("请先完成两步认证并设置资金密码后再交易"); |
| | | } |
| | | } |
| | | } |