feat: 修改pageNumber为page,因为前端组件是这样定义
This commit is contained in:
parent
32b866c974
commit
0bfd1ef217
@ -31,7 +31,7 @@ public class PageConverter {
|
|||||||
*/
|
*/
|
||||||
public static <R> Page<R> convertToMybatis(IPageParam page, Class<R> entityClz) {
|
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);
|
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
|
Page<R> myBatisPage
|
||||||
= new Page<>(current, pageSize);
|
= new Page<>(current, pageSize);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public interface IPageParam {
|
|||||||
String SORT_DESC = OrderEnum.DESC.name();
|
String SORT_DESC = OrderEnum.DESC.name();
|
||||||
String SORT_ASC = OrderEnum.ASC.name();
|
String SORT_ASC = OrderEnum.ASC.name();
|
||||||
|
|
||||||
default Integer getPageNumber() {
|
default Integer getPage() {
|
||||||
return DEFAULT_PAGE_NUMBER;
|
return DEFAULT_PAGE_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user