package com.centreproject.system.mapper.sync.ods;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.centreproject.system.domain.sync.ods.DailyCampaignStats;
import com.centreproject.system.domain.sync.ods.OdsEmarsys;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * @author zhonglei.xu
 */
public interface OdsEmarsysMapper extends BaseMapper<OdsEmarsys> {

    /**
     * 按天统计campaign的发送、打开、点击数据
     * @param startDate
     * @param endDate
     * @return
     */
    List<DailyCampaignStats> selectDailyCampaignStats(@Param("startDate") LocalDate startDate,
                                                      @Param("endDate") LocalDate endDate);

    /**
     * 按天统计不同campaign的数量
     * @param startDate
     * @param endDate
     * @return
     */
    List<DailyCampaignStats> selectDailyCampaignCounts(@Param("startDate") LocalDate startDate,
                                                       @Param("endDate") LocalDate endDate);


}
