| | |
| | | String accountName = registerUser.getAccountName(); |
| | | R<User> userByPhoneR = remoteCompanyUserService.getUserByPhone(accountName, SecurityConstants.INNER); |
| | | if (R.isError(userByPhoneR)) { |
| | | throw new ServiceException(userByPhoneR.getMsg()); |
| | | throw new RuntimeException(userByPhoneR.getMsg()); |
| | | } |
| | | boolean check = false; |
| | | R<User> userR = new R<>(); |
| | |
| | | if (!check){ |
| | | userR = remoteCompanyUserService.getUserByAccountName(accountName, SecurityConstants.INNER); |
| | | if (R.isError(userR)) { |
| | | throw new ServiceException(userR.getMsg()); |
| | | throw new RuntimeException(userR.getMsg()); |
| | | } |
| | | if (userR.getData() == null) { |
| | | throw new ServiceException("账号不存在"); |
| | | throw new RuntimeException("账号不存在"); |
| | | } |
| | | check = check(userR.getData(), registerUser.getCompanyName(), registerUser.getIdCardNumber()); |
| | | } |
| | | if (!check) { |
| | | throw new ServiceException("账号不存在"); |
| | | throw new RuntimeException("账号不存在"); |
| | | } |
| | | return userR; |
| | | } |