更改项目总数统计逻辑

This commit is contained in:
cyk
2023-07-02 11:37:10 +08:00
parent 818ffd8ffe
commit 25ac23f89a
2 changed files with 11 additions and 1 deletions

View File

@@ -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();

View File

@@ -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;
}
}