From 25ac23f89a90a5370f3eccc541d0dcce68e2a9d1 Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Sun, 2 Jul 2023 11:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B9=E7=9B=AE=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E7=BB=9F=E8=AE=A1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/projectDao.java | 2 +- src/com/hellogithub/entity/projectEntity.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/com/hellogithub/dao/projectDao.java b/src/com/hellogithub/dao/projectDao.java index 0d08ff2..e503890 100644 --- a/src/com/hellogithub/dao/projectDao.java +++ b/src/com/hellogithub/dao/projectDao.java @@ -60,7 +60,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select count(*) as projectId from project"; + String sql = "select count(*) as num from project"; p = runner.query(conn, sql, new BeanHandler<>(projectEntity.class)); count = p.getProjectId(); conn.close(); diff --git a/src/com/hellogithub/entity/projectEntity.java b/src/com/hellogithub/entity/projectEntity.java index 7642e03..4cbb697 100644 --- a/src/com/hellogithub/entity/projectEntity.java +++ b/src/com/hellogithub/entity/projectEntity.java @@ -141,4 +141,14 @@ public class projectEntity { public void setCategoryName(String categoryName) { this.categoryName = categoryName; } + + long num=0; + + public long getNum() { + return num; + } + + public void setNum(long num) { + this.num = num; + } }