first commit

This commit is contained in:
2026-04-17 10:09:03 +08:00
commit 572ad1205f
325 changed files with 30209 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package com.maibu.utils;
import com.github.pagehelper.PageHelper;
import com.maibu.core.page.PageDomain;
import com.maibu.core.page.TableSupport;
import com.maibu.utils.sql.SqlUtil;
/**
* 分页工具类
*
* @author ruoyi
*/
public class PageUtils extends PageHelper
{
/**
* 设置请求分页数据
*/
public static void startPage()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
Boolean reasonable = pageDomain.getReasonable();
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
}
/**
* 清理分页的线程变量
*/
public static void clearPage()
{
PageHelper.clearPage();
}
}