Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

查询分页的问题 #561

Open
gqipan opened this issue Aug 15, 2017 · 2 comments
Open

查询分页的问题 #561

gqipan opened this issue Aug 15, 2017 · 2 comments

Comments

@gqipan
Copy link
Contributor

gqipan commented Aug 15, 2017

请教一个问题,列表查询,count算出来的分多少页,但是数据又经过来的代码规则的筛选,实际没那么多数据,就造成了数据夹杂在各个页面之间。 这种问题怎么处理 。
示例:
image

@wayss000
Copy link
Contributor

我的想法是,把计算共多少条和筛选逻辑放到一个地方操作。
即,一种是在sql中,查询时做同时做好筛选,另一种是假分页,全查出来,再筛选,再计算分页。
其他同学有好的想法也欢迎comment。

@yangyangxu2016
Copy link
Contributor

参考下mybats分页插件的源码:https://github.com/pagehelper/Mybatis-PageHelper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants