@PersistenceContext
private EntityManager em;
public Page<Object[]> getByCondition(UserQueryModel u){
String hql = "select o.uuid,o.name from UserModel o where 1=1 and o.uuid=:uuid";
Query q = em.createQuery(hql);
q.setParameter("uuid", u.getUuid());
q.setFirstResult(0);
q.setMaxResults(1);
Page<Object[]> page = new PageImpl<Object[]>(q.getResultList(),new PageRequest(0,1),3);
return page;
}}