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

PageInfo重载一个of方法,支持手动指定count返回分页信息 #797

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

yesAnd92
Copy link
Contributor

@yesAnd92 yesAnd92 commented Jan 6, 2024

  1. 业务中有为提高性能需要缓存记录总数的场景,新增一个手动指定总记录数获取分页信息,可以借助PageInfo方便是实现分页。resovle 【功能请求】自定义 count sql 获取 PageInfo 对象请求 #788
    public static <T> PageInfo<T> of(long total, List<? extends T> list) {}

  2. 已经添加方法对应的测试用例。

@abel533
Copy link
Collaborator

abel533 commented Jan 8, 2024

参数调整顺序更一致,但是和另一个使用int参数的容易混淆。

@abel533 abel533 merged commit 4a2ce68 into pagehelper:master Jan 8, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants