@Override
public List<UserOrder> getUserOrdersByPage(int userId, int pageIndex, int pageSize) {
Query query = getCurrentSession().createQuery("select new UserOrder(id,userId,orderDesc) from UserOrder as uo where uo.userId=?");
return query.setInteger(0, userId).setFirstResult((pageIndex - 1) * pageSize).setMaxResults(pageSize).list();
}