nianqrzhanghw
HeartInHand
2017-11-11 01:26

QueryRunner query()为何返回多余空对象?

  • queryrunner
  • c3p0
QueryRunner qr = new QueryRunner(C3P0Util.getDataSource());
        List<UnitCN> list = qr.query("select unit,cap_score from t_risk_unit_cn " +
                "where t_time between to_date('2017-11-8 18:00:00','yyyy-mm-dd hh24:mi:ss') " +
                "and to_date('2017-11-8 19:00:00','yyyy-mm-dd hh24:mi:ss')", new BeanListHandler<UnitCN>(UnitCN.class));

集合list中有空值:图片说明
数据库执行该sql语句返回4条结果:图片说明
这是怎么回事呢?求大家帮忙解答

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐