package com.dsh.course.util; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.util.StringUtils; /** * BootStrap Table默认的分页参数创建 * * @author fengshuonan * @date 2017-04-05 22:25 */ public class PageFactory { public Page defaultPage(Integer limit, Integer offset, String sort, String order) { if (StringUtils.isEmpty(sort)) { Page page = new Page<>((offset / limit + 1), limit); return page; } else { Page page = new Page((offset / limit + 1), limit); if ("asc".equals(order)) { } else { } return page; } } }