-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[fix][api]:Fix the issue of unset total page in pagination #15609
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15609 +/- ##
============================================
- Coverage 38.58% 38.56% -0.02%
- Complexity 4784 4785 +1
============================================
Files 1312 1312
Lines 44978 44953 -25
Branches 4819 4820 +1
============================================
- Hits 17355 17338 -17
+ Misses 25733 25723 -10
- Partials 1890 1892 +2 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
public void setPaginationInfo(Integer total, List<T> totalList) { | ||
setTotal(total); | ||
setTotalList(totalList); | ||
if (total != null && total > 0 && this.pageSize > 0) { | ||
this.totalPage = (int) Math.ceil((double) total / this.pageSize); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on why you are doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on why you are doing this?
Cannot paginate, as described in issue #15606
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I just found out that someone was already working on it, and I created a PR #15619 |
Purpose of the pull request
fix #15606 about pagination
I would like to write about the issue of disk usage, but I am not sure if it can be met on different systems
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md