pageInfo.getList() 没有值

weir2016 发布于 2016/10/21 11:51
阅读 1K+
收藏 0

@Liuzh_533 你好,想跟你请教个问题:

PageHelper.startPage(nowpage, size);
List<Member> members = memberMapper.selectMember(map);
PageInfo<Member> pageInfo = new PageInfo<Member>(members);
queryResult.setTotalRecord((int)pageInfo.getTotal());
queryResult.setResultList(pageInfo.getList());

pageInfo.getList()  没有值

这是为什么?

加载中
0
w
weir2016
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@389eec35] was not registered for synchronization because synchronization is not active
Fri Oct 21 11:52:21 GMT+08:00 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@2ce17d47] will not be managed by Spring
==>  Preparing: SELECT count(0) FROM es_member WHERE uname LIKE CONCAT(?, '%') 
==> Parameters: weixin2(String)
<==    Columns: count(0)
<==        Row: 108
<==      Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@389eec35]

807

打印结果是这样的



0
Liuzh_533
Liuzh_533
members 有结果吗??最主要的是你的sql查询有结果吗?如果count=0,就不会执行查询。
Augus胜
Augus胜
@Liuzh_533 回复@Liuzh_533 : 好的 谢谢
Liuzh_533
Liuzh_533
回复 @宠爱是一种习惯 : 注释分页方法看看执行结果对不对。
Augus胜
Augus胜
您好,这个问题怎么解决呀 为什么没有值?我试了 查询是有值得
0
凤凰涅槃
同样的问题,求解,sql查出来是有结果的
0
hollowJ丶
hollowJ丶
你查询的数据在members里面List members = memberMapper.selectMember(map);
0
Augus胜
Augus胜

您好  您这个问题解决了吗? 我也碰到了

0
w
weir2016

没有再用这个plus了

返回顶部
顶部