示例#1
0
 public Account createAccount(Account acount) throws AuthServerException {
   try {
     Account account = acount;
     account.setStatus("2");
     account.setId(nextSequenceNumber());
     Account accountd = authRepository.Authbyemail(acount.getEmail(), "1");
     if (accountd != null) {
       throw new AuthServerException("该邮箱账号已被激活使用,请检查修改!");
     }
     authRepository.insertAuth(account);
     return account;
   } catch (AuthServerException e) {
     throw new AuthServerException(e.getMessage());
   } catch (Exception e) {
     throw new AuthServerException("创建账号失败!");
   }
 }