package com.finance.common.core.domain.model;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.finance.common.core.domain.BasePage;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import java.util.Objects;
|
|
@ApiModel("时间范围分页dto")
|
public class TimeRangeQueryBody extends BasePage {
|
|
@ApiModelProperty("开始时间 格式 yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
private Date startTime;
|
|
@ApiModelProperty("结束时间 格式 yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
private Date endTime;
|
|
public String getStartTime() {
|
if (Objects.nonNull(startTime)) {
|
return new SimpleDateFormat("yyyy-MM-dd").format(startTime) + " 00:00:00";
|
}
|
return null;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public String getEndTime() {
|
if (Objects.nonNull(endTime)) {
|
return new SimpleDateFormat("yyyy-MM-dd").format(endTime) + " 23:59:59";
|
}
|
return null;
|
}
|
|
public void setEndTime(Date endTime) {
|
this.endTime = endTime;
|
}
|
|
}
|