更改项目总数统计逻辑

This commit is contained in:
cyk
2023-07-02 11:46:30 +08:00
parent 25ac23f89a
commit 0441aea3b3
2 changed files with 4 additions and 4 deletions

View File

@@ -54,15 +54,15 @@ public class projectDao {
*
*
*/
public int countAll() {
int count;
public long countAll() {
long count;
projectEntity p;
try {
Connection conn = JdbcUtils.getConnection();
QueryRunner runner = new QueryRunner();
String sql = "select count(*) as num from project";
p = runner.query(conn, sql, new BeanHandler<>(projectEntity.class));
count = p.getProjectId();
count = p.getNum();
conn.close();
} catch (SQLException e) {
throw new RuntimeException(e);

View File

@@ -42,7 +42,7 @@ public class projectService {
*
*
*/
public int countAll() {return projectDao.countAll();}
public long countAll() {return projectDao.countAll();}
/**
* 按照分类检索项目
*