| | |
| | | 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.RealNameAuthRecordService; |
| | | import com.yami.trading.service.SessionTokenService; |
| | | import com.yami.trading.service.WalletService; |
| | | import com.yami.trading.service.data.DataService; |
| | |
| | | |
| | | @Autowired |
| | | ExchangeLeverOrderService exchangeLeverOrderService; |
| | | @Autowired |
| | | RealNameAuthRecordService realNameAuthRecordService; |
| | | |
| | | /** |
| | | * 开仓页面参数 |
| | |
| | | if (!party.isEnabled()) { |
| | | throw new YamiShopBindException("用户已禁用"); |
| | | } |
| | | validateTradePermission(party); |
| | | realNameAuthRecordService.requireApproved(party, true); |
| | | ExchangeLeverApplyOrder order = new ExchangeLeverApplyOrder(); |
| | | order.setPartyId(SecurityUtils.getCurrentUserId()); |
| | | order.setSymbol(symbol); |
| | |
| | | if (!party.isEnabled()) { |
| | | throw new BusinessException("用户已锁定"); |
| | | } |
| | | validateTradePermission(party); |
| | | // if (!party.getKyc_authority()) { |
| | | // resultObject.setCode("401"); |
| | | // resultObject.setMsg(error); |
| | |
| | | |
| | | } |
| | | |
| | | private void validateTradePermission(User user) { |
| | | if (user == null) { |
| | | throw new YamiShopBindException("用户不存在"); |
| | | } |
| | | // 模拟账户不做二步校验限制 |
| | | if (user.getAccountType() != null && user.getAccountType() == 1) { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |