更改项目总数统计逻辑
This commit is contained in:
@@ -54,15 +54,15 @@ public class projectDao {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public int countAll() {
|
public long countAll() {
|
||||||
int count;
|
long count;
|
||||||
projectEntity p;
|
projectEntity p;
|
||||||
try {
|
try {
|
||||||
Connection conn = JdbcUtils.getConnection();
|
Connection conn = JdbcUtils.getConnection();
|
||||||
QueryRunner runner = new QueryRunner();
|
QueryRunner runner = new QueryRunner();
|
||||||
String sql = "select count(*) as num from project";
|
String sql = "select count(*) as num from project";
|
||||||
p = runner.query(conn, sql, new BeanHandler<>(projectEntity.class));
|
p = runner.query(conn, sql, new BeanHandler<>(projectEntity.class));
|
||||||
count = p.getProjectId();
|
count = p.getNum();
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
@@ -42,7 +42,7 @@ public class projectService {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public int countAll() {return projectDao.countAll();}
|
public long countAll() {return projectDao.countAll();}
|
||||||
/**
|
/**
|
||||||
* 按照分类检索项目
|
* 按照分类检索项目
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user