This commit is contained in:
2025-01-02 20:59:32 +08:00
parent e8a986e476
commit 2025b4c397
9 changed files with 25 additions and 40 deletions

View File

@@ -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);
}