Skip to content

Commit

Permalink
修复 issue higress-group#434: 分页类中,分页取值取错的问题 (higress-group#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
daidaipianzi authored Feb 21, 2025
1 parent 7326219 commit e75d63e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static <T, V> PaginatedResult<V> createFromFullList(List<T> list, CommonP
if (query != null && query.paginationEnabled()) {
int pageNum = query.getPageNum() != null ? Math.max(1, query.getPageNum()) : 0;
int pageSize =
query.getPageNum() != null && query.getPageNum() > 0 ? query.getPageNum() : DEFAULT_PAGE_SIZE;
query.getPageSize() != null && query.getPageSize() > 0 ? query.getPageSize() : DEFAULT_PAGE_SIZE;
int startIndex = pageNum * pageSize;
data = data.subList(startIndex, startIndex + pageSize);
result.pageNum = pageNum;
Expand Down

0 comments on commit e75d63e

Please sign in to comment.