Package net.userSystem.user.domain

Examples of net.userSystem.user.domain.User


   * @throws
   * @since CodingExample Ver 1.1
   */
  public String login() throws Exception
  {
    User luser = userService.login(user);
    if (luser == null)
    {
      message = "用户名或密码错误";
      return ERROR;
    }
    else
    {
      String ip = getRequest().getRemoteAddr();
      luser.setLast_loginip(ip);
      userService.updateUser(luser);
      HttpSession session = getSession();
      session.setAttribute(user.getSESSION_KEY(), luser)
      systemLogService.addSystemLog(SystemLogType.USER_LOGIN, new Date().toLocaleString(), luser.getId(), ip, "用户登录", null, null);
      return SUCCESS;
    }
  }
View Full Code Here


  public String deleteUser() throws Exception
  {
    String[] ids = getRequest().getParameterValues("user.id");
   
    userService.deleteUser(ids);
    User luser=(User) getSession().getAttribute(User.SESSION_KEY);
    systemLogService.addSystemLog(SystemLogType.USER_DELETE, new Date().toLocaleString(), luser.getId(), luser.getLast_loginip(), "删除用户:"+Arrays.deepToString(ids), null, null);
    return SUCCESS;
  }
View Full Code Here

  {
    String id=getRequest().getParameter("id");
    if(id!=null&&!"".equals(id)){
      user=userService.getUserById(id);
    }else{
      user=new User();
    }
    UserRoleService userRoleService=(UserRoleService) SpringContext.getBean("userRoleService");
    UserKindService userKindService=(UserKindService) SpringContext.getBean("userKindService");
    List<Map<String, String>> roleList=userRoleService.getAllUserRole();
    List<Map<String, String>> kindList=userKindService.getAllUserKind();
View Full Code Here

   * @since CodingExample Ver 1.1
   */
  public String updateUser() throws Exception
  {
    userService.updateUser(user);
    User luser = (User) getSession().getAttribute(User.getSESSION_KEY());
    // 如果修改的用户信息是当前登录人
    if (luser.getId().equals(user.getId()))
    {
      getSession().setAttribute(User.getSESSION_KEY(), luser);
      systemLogService.addSystemLog(SystemLogType.USER_UPDATE_INFO, new Date().toLocaleString(), luser.getId(), luser.getLast_loginip(), "更新用户信息", null, null);
      return "default";
    }
    systemLogService.addSystemLog(SystemLogType.USER_UPDATE_INFO, new Date().toLocaleString(), luser.getId(), luser.getLast_loginip(), "管理员更新用户信息:"+user.getId(), null, null);
    return SUCCESS;
  }
View Full Code Here

   * @since  CodingExample Ver 1.1
  */
  public String addUser() throws Exception
  {
    userService.register(user);
    User luser = (User) getSession().getAttribute(User.getSESSION_KEY());
    systemLogService.addSystemLog(SystemLogType.USER_REGISTER, new Date().toLocaleString(),luser.getId(), null, "管理员新增用户:"+user.getId(), null, null);
    return SUCCESS;
  }
View Full Code Here

    this.portalService = portalService;
  }

  public String queryModel()
  {
    User user = (User) getSession().getAttribute(User.SESSION_KEY);
    List<Map<String, String>> list = portalService.queryModel(user.getUser_role_id());
    List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
    // 添加菜单
    for (int i = 0; i < list.size();)
    {
      Map<String, String> map = list.get(i);
View Full Code Here

TOP

Related Classes of net.userSystem.user.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.