分页2
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.sqx.common.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -53,17 +52,6 @@ public class PageUtils implements Serializable {
|
||||
this.totalPage = (int) Math.ceil((double) totalCount / pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public PageUtils(IPage<?> page) {
|
||||
this.list = page.getRecords();
|
||||
this.totalCount = (int) page.getTotal();
|
||||
this.pageSize = (int) page.getSize();
|
||||
this.currPage = (int) page.getCurrent();
|
||||
this.totalPage = (int) page.getPages();
|
||||
}
|
||||
|
||||
public static PageUtils page(PageInfo<?> page) {
|
||||
return page(page,false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user