package com.sandu.common.object;
|
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import java.time.LocalDateTime;
|
|
/**
|
*
|
* @author chenjiantian
|
*/
|
@Data
|
@EqualsAndHashCode(callSuper = false)
|
public class BaseConditionVO {
|
public final static int DEFAULT_PAGE_SIZE = 10;
|
public final static int DEFAULT_PAGE_NO = 1;
|
private Integer pageNo;
|
private Integer pageSize;
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private LocalDateTime startDate;
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private LocalDateTime endDate;
|
|
public int getPageSize() {
|
return (pageSize != null && pageSize > 0) ? pageSize : DEFAULT_PAGE_SIZE;
|
}
|
|
public int getPageNo() {
|
return (pageNo != null && pageNo > 0) ? pageNo : DEFAULT_PAGE_NO;
|
}
|
}
|