Exemple #1
0
 public User login(String username, String pwd) {
   User user = userdao.getEntityByUniqueColumn(User.class, "loginName", username);
   if (pwd.equals(user.getPassword()) || EncryptUtil.md5Encode(pwd).equals(user.getPassword())) {
     logger.info("登录成功:" + username);
     return user;
   }
   return null;
 }
Exemple #2
0
 public PageBean getUsers(Integer pageIndex) {
   return userdao.getUsers(pageIndex);
 }
Exemple #3
0
 public boolean changePwd(User user, String pwd) {
   user.setPassword(EncryptUtil.md5Encode(pwd));
   userdao.saveOrUpdate(user);
   return true;
 }