解决方案 »

  1.   

    count(0)不对,你查出来的list不能转为BigInteger,你要某一字段的值就写字段,count(0)算什么
      

  2.   

    总条数是count(stats.某字段名),然后转为list.get(0)才是你要的,但是query.list强转为BigInteger就不对了,你确定你查出来的是BigInteger对象list吗
      

  3.   

    1、sql语句改下,"select count(0) c from from ...",即加一个别名 c
    2、对象接收List<Integer>改为List<Map<String, Object>>
    3、Integer.valueOf(String.valueOf(list.get(0).get("C")));完成
      

  4.   

    query.list返回时个object,但是转换为BigInteger是就报错
      

  5.   

    query.list返回时个object,但是你应该要用List<Map<String, Object>>接收,而不是List<Integer>