admin
2022-03-25 17055fd8d36504b79a5def28f5d4b4740faf012d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
    }
 
}