package com.reyun.saas.report.data.dao;

import com.reyun.saas.report.vo.ReportParamsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

@Repository
//@Mapper
public interface DataInfoDayMapper {

    int relative(@Param("data") ReportParamsVO reportParamsVO,@Param("params") Map<String,String> params);

    List<Map> dashboardChart(@Param("data")ReportParamsVO reportParamsVO, @Param("params")Map<String,String> params);

    List<Map> dashboardChartForException(@Param("data")ReportParamsVO reportParamsVO);

    List<Map> channelQualityTopChart(@Param("data") ReportParamsVO reportParamsVO,@Param("type") String type);
    /**
     * 查询用户的sdk上报次数
     * @param appkeys appkey
     * @param date 实时离线分割日期 实时大于或者等于昨天  离线小于昨天的时间
     * @param pubDate 用户套餐开通时间
     * @return 用户sdk上报次数
     */
    Long findSDKReportCount(@Param("appkeys")List<String> appkeys ,@Param("date")String date,@Param("pubDate") String pubDate);

    List<Map> channelQualityTopList(@Param("data")ReportParamsVO reportParamsVO);

    int relativeDau(@Param("data")ReportParamsVO reportParamsVO,@Param("params") Map<String,String> params);

    List<Map> dashboardChartDAU(@Param("data")ReportParamsVO reportParamsVO,@Param("params") Map<String,String> params);

    int relativeNew(@Param("data")ReportParamsVO reportParamsVO);

    Map channelQualityTopListTotal(@Param("data")ReportParamsVO reportParamsVO);

    List<Map> statisticAnalysis(@Param("data")ReportParamsVO reportParamsVO,@Param("params")Map<String,String> viewColumnMap);

    Map<String,Object> statisticAnalysisTotal(@Param("data")ReportParamsVO reportParamsVO,@Param("params")Map<String,String> viewColumnMap);

}
