Exemplo n.º 1
0
  /** 错误代码 5300 两次输入密码不相同 5400 用户名已注册 */
  @Override
  public boolean registerValidate(String username, String password1, String password2) {
    if (!password1.equals(password2)) throw new RuntimeException("5300");

    Admin adminObj = adminDao.getAdminByAdminname(username);
    if (null != adminObj) throw new RuntimeException("5400");
    return true;
  }
Exemplo n.º 2
0
 @Override
 public void save(String username, String password) {
   admin = new Admin(null, username, password, null, 1);
   adminDao.save(admin);
 }