package com.pcloud.book.applet.dao;

import java.util.List;
import java.util.Map;

import com.pcloud.book.applet.dto.AppletChartDateDTO;
import com.pcloud.book.applet.dto.ExportClickDTO;
import com.pcloud.book.applet.dto.PvuvDTO;
import com.pcloud.book.applet.entity.AppletLinkClick;
import com.pcloud.common.core.dao.BaseDao;

/**
 * 小程序资讯/券库点击埋点(AppletLinkClick)表数据库访问层
 *
 * @author makejava
 * @since 2020-05-11 11:41:35
 */
public interface AppletLinkClickDao extends BaseDao<AppletLinkClick> {

    /**
     * 趋势图数据
     */
    List<AppletChartDateDTO> mapPVUVByMonth(Integer typeId, Integer recordType, Long newsId);


    /**
     * 点击量浏览量pvuv
     *
     * @author：zhuyajie
     * @date：2020/5/12 10:44 * @param null update: 增加参数intervalDaya(间隔天数) 2020/07/17 pansy
     */
    Map<Long, PvuvDTO> mapPVUV(Integer typeId, Integer recordType, List<Long> fromIds, Integer intervalDaya);

    /**
     * 优惠券使用量
     *
     * @author：zhuyajie
     * @date：2020/5/12 10:44 * @param null
     */
    Map<Long, PvuvDTO> mapCouponUseCount(List<Long> fromIds);

    List<ExportClickDTO> getThirdGroup(Integer count, String startDate, String endDate);

    List<ExportClickDTO> getNormalGroup(Integer count, String startDate, String endDate);

    List<ExportClickDTO> getNews(Integer count, String startDate, String endDate);

}