package com.kidgrow.common.model;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.kidgrow.common.constant.CommonConstant;
|
|
import java.io.Serializable;
|
|
/**
|
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
|
*
|
* @Description: DTO基类<br>
|
* @Project: <br>
|
* @CreateDate: Created in 2020/2/3 16:15 <br>
|
* @Author: <a href="4345453@kidgrow.com">liuke</a>
|
*/
|
public class SuperDto implements Serializable {
|
private static final long serialVersionUID = 8575415936281850634L;
|
|
public SuperDto() {
|
this(1, CommonConstant.DEFAULT_PAGE_SIZE);
|
}
|
|
public SuperDto(Integer page, Integer limit) {
|
this.page = page;
|
this.limit = limit;
|
}
|
|
/**
|
* 页号
|
*/
|
private Integer page;
|
/**
|
* 分页大小
|
*/
|
private Integer limit;
|
|
@JsonIgnore
|
public Integer getPage() {
|
if (page == null || page < 1) {
|
return 1;
|
}
|
return page;
|
}
|
|
public void setPage(Integer page) {
|
|
if (page != null && page < 1) {
|
this.page = 1;
|
}
|
this.page = page;
|
}
|
|
@JsonIgnore
|
public Integer getLimit() {
|
if (limit == null || limit < 1) {
|
return 1;
|
}
|
return limit;
|
}
|
|
public void setLimit(Integer limit) {
|
|
if (limit != null && limit < 1) {
|
this.limit = 1;
|
}
|
this.limit = limit;
|
}
|
}
|