
com.github.hdy.jdbcplus.result.PageUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbc-plus-boot-starter Show documentation
Show all versions of jdbc-plus-boot-starter Show documentation
基于springboot的jdbcTemplate简单封装
package com.github.hdy.jdbcplus.result;
import com.github.hdy.jdbcplus.util.TypeConvert;
public class PageUtil {
private int pageNumber;
private int pageSize;
public int getPageNumber() {
return pageNumber;
}
public void setPageNumber(int pageNumber) {
this.pageNumber = pageNumber;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public PageUtil(Integer pageNumber, Integer pageSize) {
int pageN = TypeConvert.isNull(pageNumber) ? 1 : pageNumber;
int pageS = TypeConvert.isNull(pageSize) ? 10 : pageSize;
this.pageNumber = (pageN - 1) * pageS;
this.pageSize = pageS;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy