liuzhihu2016
liuzhihu2016
2016-08-04 02:03

ibatis中的select count(*) sql执行了,但是没有返回结果

java代码:

    @Override
    public int selectUserAll() {
    return (int)getSqlMapClientTemplate().queryForObject(
                "lz_user.ibatorgenerated_selectCount");
    }

sql:

  <select id="ibatorgenerated_selectCount" resultClass="int">
    select count(*) 
    FROM lz_user user,
         lz_user_info userinfo,
         lz_user_vip userVip 
  </select>

返回值:
DEBUG 2016-08-04 10:02:00 [java.sql.Connection] - {conn-100003} Connection
DEBUG 2016-08-04 10:02:00 [java.sql.Connection] - {conn-100003} Preparing Statement: select count(*) FROM lz_user user, lz_user_info userinfo, lz_user_vip userVip

DEBUG 2016-08-04 10:02:00 [java.sql.PreparedStatement] - {pstm-100004} Executing Statement: select count(*) FROM lz_user user, lz_user_info userinfo, lz_user_vip userVip

DEBUG 2016-08-04 10:02:00 [java.sql.PreparedStatement] - {pstm-100004} Parameters: []
DEBUG 2016-08-04 10:02:00 [java.sql.PreparedStatement] - {pstm-100004} Types: []
DEBUG 2016-08-04 10:02:00 [java.sql.ResultSet] - {rset-100005} ResultSet

拜求,这个是怎么回事儿,谢谢。

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

2条回答