@RequestMapping("/login")
	public String login(String username, String password, HttpServletRequest request){
		String error = "";
		if(MeiJiaUtils.isEmpty(username) || MeiJiaUtils.isEmpty(password)){
			error = "用户名或密码不能为空！";
			request.setAttribute("error", error);
			return "login";
		}
		Map<Object, Object> map = new HashMap<Object, Object>();
		map.put("username", username);
		map.put("password", password);
		Staff staff = staffService.selectByUsernameAndPassword(map);
		if(staff == null){
			error = "用户名或密码错误！";
			request.setAttribute("error", error);
			request.setAttribute("username", username);
			return "login";
		}
		if(staff.getStatus().equals(0)){
			error = "该账号已经失效！";
			request.setAttribute("error", error);
			return "login";
		}
		
		staff.setLasttime(new Date());
		staffService.updateStaff(staff);
		
		request.getSession().setAttribute("sessionStaff", staff);

		request.setAttribute("staff", staff);
		return "main";
	}