示例#1
0
  public String login() throws Exception {

    user = new User();
    user.setUsername(userInfo.getUsername());
    user.setPassword(userInfo.getPassword1());
    if (userService.login(user)) {
      session.put("username", user.getUsername());
      session.put("userId", userService.listOne(user.getUsername()).getId());
      return "loginSuccess";
    }
    return "loginFail";
  }
示例#2
0
 public String update() {
   user = userService.listOne((String) session.get("username"));
   user.setUsername(userInfo.getUsername());
   user.setAddress(userInfo.getAddress());
   user.setAnswer(userInfo.getAnswer());
   user.setEmail(userInfo.getEmail());
   user.setIdiograph(userInfo.getIdiograph());
   user.setIsOpen(userInfo.getIsopen());
   user.setPassword(userInfo.getPassword1());
   user.setQq(userInfo.getQq());
   user.setQuestion(userInfo.getQuestion());
   user.setRealname(userInfo.getRealname());
   user.setSex(userInfo.getSex());
   user.setBirthday(userInfo.getBirthday());
   userService.update(user);
   session.put("username", user.getUsername());
   return "update";
 }
示例#3
0
 public String updateInput() {
   user = userService.listOne((String) session.get("username"));
   return "updateInput";
 }