问题描述
- DbUtils 获取 count(*)值的问题;
- DbUtils获取不到count(*)的值
sql:SELECT r.superm_id d.department_name COUNT(*) AS count_smsun FROM rsd rdpt d WHERE r.superm_id=d.department_id AND rsd_status='已复核' GROUP BY r.superm_id ORDER BY r.superm_id DESC ;
java代码:
DbUtils
Report_result_list = runner.query(conn sb.toString() new BeanListHandler<Report_result>(Report_result.class) list.toArray());
javaBean:
Report_result类://部门id private int superm_id; //部门名称 private String department_name; //合计 private int count;
前面两个都可以获取到值,就是合计count获取不到呀,大神帮帮忙啊,怎么搞才能获取到count(*)的值。DbUtils还能用吗?
解决方案
http://www.oschina.net/question/107044_17114?sort=time
解决方案二:
http://coolszy.iteye.com/blog/456172
时间: 2024-10-27 20:33:11