更改项目总数统计逻辑

This commit is contained in:
User_cyk committed 2023-07-02 11:46:30 +08:00
1 parent 25ac23f89a
commit 0441aea3b3
2 files changed
+4 -4

No files matched your search

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