解决BUG:生产工单-新建完毕后页面查询不到->修改查询的SQL语句

yun-zuoyi
Dominic_Xiao 5 years ago
parent 760307910a
commit f57be38c2b

@ -580,7 +580,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public int listCount() {
try{
Long count = entityManager.createQuery("select count(model) from " + persistentClass.getName() + " as model",Long.class)
Long count = entityManager.createQuery("select count(0) from " + persistentClass.getName() + " as model", Long.class)
.getSingleResult();
return count == null ? 0 : count.intValue();
}catch(NoResultException e){

Loading…
Cancel
Save