public List getMessByTimeAndUser(String beginTme, String endTime,
			String username,String rescueStatus) {
		
		if(beginTme!=null&&!beginTme.trim().equals("")){
			if(endTime!=null&&!endTime.trim().equals("")){
				String hql = "from Rescueapply r where r.applytime >=:beginTime and r.applytime <=:endTime and r.applyperson=:applyperson" + rescueStatus;
				return this.sessionFactory.getCurrentSession().createQuery(hql).setParameter("beginTime",beginTme).setParameter("endTime",endTime).setParameter("applyperson", username).list();			}
			else{
				
				String hql = "from Rescueapply r where r.applytime >=:beginTime and r.applyperson=:applyperson" + rescueStatus;
				return this.sessionFactory.getCurrentSession().createQuery(hql).setParameter("beginTime",beginTme).setParameter("applyperson", username).list();
			}
		}else{
			if(endTime!=null&&!endTime.trim().equals("")){
				String hql = "from Rescueapply r where r.applytime <=:endTime and r.applyperson=:applyperson" + rescueStatus;
				return this.sessionFactory.getCurrentSession().createQuery(hql).setParameter("endTime",endTime).setParameter("applyperson", username).list();
			}else{
				return null;
			}
		}

	}