Air
2024-11-04 cb3b3801255082c53145bd752230339eae5d3e5a
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
package com.nova.sankuai.domain.dto;
 
import cn.hutool.core.date.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.util.Date;
 
/**
 * @author weikangdi
 * @create 2021/11/25
 */
@ApiModel(value = "渠道统计报表查询条件")
@Data
public class ChannelReportDto {
 
    @ApiModelProperty(value = "渠道编码")
    private Integer channelCode;
 
    @ApiModelProperty(value = "开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;
 
    @ApiModelProperty(value = "结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;
 
 
    public ChannelReportDto initDate() {
        if (this.getStartDate() == null) {
            this.setStartDate(DateUtil.beginOfDay(new Date()));
        }
        if (this.getEndDate() == null) {
            this.setEndDate(DateUtil.endOfDay(new Date()));
        }
        return this;
    }
}