Package com.sfpay.histran.domain

Examples of com.sfpay.histran.domain.User


  @Resource
  private IUserDao userDao;

  @Test
  public void testUserDao() {
    User user = new User();
    user.setUsername("11");
    user.setPassword("22");
    if (logger.isDebugEnabled()) {
      logger.debug(userDao.login(user).toString());
    }
  }
View Full Code Here


  @Resource
  IUserService userService;
 
  @Test
  public void testUserService() throws NoSuchAlgorithmException{
    User user = new User();
    user.setUsername("sf");
    user.setPassword("888888");
    if (logger.isDebugEnabled()) {
      logger.debug(userService.login(user).toString());
    }
  }
View Full Code Here

  public String login(HttpServletRequest request, HttpServletResponse response) throws NoSuchAlgorithmException,
      IOException {
    request.setCharacterEncoding("UTF-8");
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    User user = new User();
    user.setUsername(username);
    user.setPassword(password);
    if (userService.login(user)) {
      request.getSession().setAttribute("user", user);
      response.sendRedirect("/portal/histran/index");
      return null;
    }
View Full Code Here

      request.setCharacterEncoding("UTF-8");
    } catch (UnsupportedEncodingException e1) {
      e1.printStackTrace();
    }

    User u0 = (User) request.getSession().getAttribute("user");
    if (null == u0) {
      return "histran/login";
    }

    String area = request.getParameter("area");
View Full Code Here

      return false;
    }
    user.setUsername(username.trim());
    user.setPassword(MD5.getMD5Str(MD5.getMD5Str(password.trim())));

    User u = userDao.login(user);
    if (u == null || u.getAval() != 1) {
      return false;
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of com.sfpay.histran.domain.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.