package org.yeshi.utils.statistic;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: BaseStatisticQuery
|
* @description: 基础统计查询条件
|
* @date 2021/11/18 18:24
|
*/
|
public class BaseStatisticMySQLTimeQuery implements Serializable {
|
|
private Date startTime;
|
private Date endTime;
|
private String timeFormat;
|
|
public Date getStartTime() {
|
return startTime;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public Date getEndTime() {
|
return endTime;
|
}
|
|
public void setEndTime(Date endTime) {
|
this.endTime = endTime;
|
}
|
|
public String getTimeFormat() {
|
return timeFormat;
|
}
|
|
public void setTimeFormat(String timeFormat) {
|
this.timeFormat = timeFormat;
|
}
|
|
public static BaseStatisticMySQLTimeQuery create(BaseStatisticTimeQuery query) {
|
BaseStatisticMySQLTimeQuery timeQuery = new BaseStatisticMySQLTimeQuery();
|
timeQuery.setEndTime(query.getEndTime());
|
timeQuery.setStartTime(query.getStartTime());
|
timeQuery.setTimeFormat(query.getTimeSpan().getSqlTimeFormat());
|
return timeQuery;
|
}
|
|
}
|