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 ChannelReportDetailDto { @ApiModelProperty(value = "渠道编码") private Integer channelCode; @ApiModelProperty(value = "贷款超市Id") private Long supermarketId; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "手机号") private String phone; @ApiModelProperty(value = "所属机构名称") private String mechanismName; @ApiModelProperty(value = "入口渠道代码") private Integer importChannel; @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 ChannelReportDetailDto initDate() { if (this.getStartDate() == null) { this.setStartDate(DateUtil.beginOfDay(new Date())); } if (this.getEndDate() == null) { this.setEndDate(DateUtil.endOfDay(new Date())); } return this; } }