feat: 修改pageNumber为page,因为前端组件是这样定义

This commit is contained in:
lilong 2024-04-02 15:18:10 +08:00
parent 32b866c974
commit 0bfd1ef217
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class PageConverter {
*/
public static <R> Page<R> convertToMybatis(IPageParam page, Class<R> entityClz) {
int pageSize = Math.min(Optional.ofNullable(page.getPageSize()).orElse(IPageParam.DEFAULT_PAGE_SIZE), IPageParam.MAX_PAGE_SIZE);
Integer current = Optional.ofNullable(page.getPageNumber()).orElse(IPageParam.DEFAULT_PAGE_NUMBER);
Integer current = Optional.ofNullable(page.getPage()).orElse(IPageParam.DEFAULT_PAGE_NUMBER);
Page<R> myBatisPage
= new Page<>(current, pageSize);

View File

@ -15,7 +15,7 @@ public interface IPageParam {
String SORT_DESC = OrderEnum.DESC.name();
String SORT_ASC = OrderEnum.ASC.name();
default Integer getPageNumber() {
default Integer getPage() {
return DEFAULT_PAGE_NUMBER;
}