From df35a22aac9b7f025223e2a4f8fbabe005c042a0 Mon Sep 17 00:00:00 2001 From: Dominic_Xiao <1003069915@qq.com> Date: Wed, 28 Oct 2020 15:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3BUG#12121=20=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=B7=A5=E5=8D=95-=20=E6=96=B0=E5=BB=BA=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=E5=90=8E=E9=A1=B5=E9=9D=A2=E6=9F=A5=E8=AF=A2=E4=B8=8D?= =?UTF-8?q?=E5=88=B0:=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E7=9A=84SQL=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java index 7f56701..2ad2a01 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java @@ -580,7 +580,7 @@ public class BaseRepositoryImpl extends SimpleJpaRep @Override public int listCount() { try{ - Long count = entityManager.createQuery("select count(0) from " + persistentClass.getName() + " as model", Long.class) + Long count = entityManager.createQuery("select count(model) from " + persistentClass.getName() + " as model", Long.class) .getSingleResult(); return count == null ? 0 : count.intValue(); }catch(NoResultException e){