Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/wangxy/hyp-web/src/commit/052fa1655c306f3f3f2983d3e45e5c4192b6bbb8/hyp-common/src/main/java/com/hyp/common/utils/PageUtils.java You should set ROOT_URL correctly, otherwise the web may not work correctly.
hyp-web/hyp-common/src/main/java/com/hyp/common/utils/PageUtils.java

36 lines
910 B

package com.hyp.common.utils;
import com.github.pagehelper.PageHelper;
import com.hyp.common.core.page.PageDomain;
import com.hyp.common.core.page.TableSupport;
import com.hyp.common.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();
}
}