| | |
| | | if (!isPhone) { |
| | | throw new ServiceException("以下帐号格式不正确:", I18nKeyConstant.ACCOUNT_FORMAT_ERROR,new Object[]{exportOperationsUserVo.getPhoneNumber()}); |
| | | } |
| | | // 判断账号是否已存在 |
| | | long count = this.count(Wrappers.lambdaQuery(XpOperationsUser.class) |
| | | .eq(XpOperationsUser::getPhoneNumber, exportOperationsUserVo.getPhoneNumber())); |
| | | if (count > 0) { |
| | | throw new ServiceException("以下帐号已存在:", I18nKeyConstant.ACCOUNT_EXIST,new Object[]{exportOperationsUserVo.getPhoneNumber()}); |
| | | } |
| | | xpOperationsUser.setPhoneNumber(exportOperationsUserVo.getPhoneNumber()); |
| | | xpOperationsUser.setPassword(SecurityUtils.encryptPassword("a123456")); |
| | | xpOperationsUser.setRemarks(exportOperationsUserVo.getRemarks()); |