org.onetwo.boot.mybatis.MyBatisUtils Maven / Gradle / Ivy
package org.onetwo.boot.mybatis;
import java.util.List;
import java.util.Optional;
import org.onetwo.easyui.EasyDataGrid;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
public class MyBatisUtils {
public static void setCurrentQueryPage(EasyDataGrid> page){
if(page.isPagination()){
PageHelper.startPage(page.getPage(), page.getPageSize());
}
}
public static Optional> getPage(List rows){
if(Page.class.isInstance(rows)){
Page page = (Page) rows;
return Optional.of(page);
}
return Optional.empty();
}
private MyBatisUtils(){
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy