| | |
| | | if (!party.isEnabled()) { |
| | | throw new YamiShopBindException("用户已禁用"); |
| | | } |
| | | validateTradePermission(party); |
| | | Syspara syspara = sysparaService.find("stop_user_internet"); |
| | | String stopUserInternet = syspara.getSvalue(); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(stopUserInternet)) { |
| | |
| | | if (!party.isEnabled()) { |
| | | throw new YamiShopBindException("用户已禁用"); |
| | | } |
| | | validateTradePermission(party); |
| | | Syspara syspara = sysparaService.find("stop_user_internet"); |
| | | String stopUserInternet = syspara.getSvalue(); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(stopUserInternet)) { |
| | |
| | | this.sessionTokenService.del(session_token); |
| | | if ((!partyId.equals(object))) { |
| | | log.info("sessionToken{}", object); |
| | | System.out.println("sessionToken " + object); |
| | | throw new YamiShopBindException("请稍后再试"); |
| | | } |
| | | User party = userService.getById(partyId); |
| | | if (!party.isEnabled()) { |
| | | throw new YamiShopBindException("用户已禁用!"); |
| | | } |
| | | validateTradePermission(party); |
| | | symbol = itemService.getCleanSymbol(symbol); |
| | | symbol_to = itemService.getCleanSymbol(symbol_to); |
| | | String relation_order_no = UUID.randomUUID().toString(); |
| | |
| | | |
| | | //=============================================闪兑END================================================================ |
| | | |
| | | private void validateTradePermission(User user) { |
| | | if (user == null) { |
| | | throw new YamiShopBindException("用户不存在"); |
| | | } |
| | | // 模拟账户不做二步校验限制 |
| | | if (user.getAccountType() != null && user.getAccountType() == 1) { |
| | | return; |
| | | } |
| | | if (!user.isGoogleAuthBind() || StringUtils.isEmptyString(user.getSafePassword())) { |
| | | throw new YamiShopBindException("请先完成两步认证并设置资金密码后再交易"); |
| | | } |
| | | } |
| | | |
| | | } |