package com.cloudcross.ssp.back.service;

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

import com.cloudcross.ssp.back.model.DeliverAnalysis;
import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.common.utils.Pager;


/**
 * 报表服务
 * @author chenyou
 *
 */
public interface IAdReportService extends IGenericService<DeliverAnalysis>{
	
    int findCountForDeliverEffectAnalysis(Map<String, Object> paramMap);
    
    int findCountForDeliverEffectAnalysis2(Map<String, Object> paramMap);
	
	int findCountForLocation(Map<String, Object> paramMap);
	
	int findCountForOs(Map<String, Object> paramMap);
	
	int findCountForScene(Map<String, Object> paramMap);
	

	
	List<DeliverAnalysis> findByTotalReport(Map<String, Object> paramMap, Pager pager);
	
	
	List<DeliverAnalysis> findByTotalReport2(Map<String, Object> paramMap, Pager pager);
	
	
    List<DeliverAnalysis> findByPlaceName(Map<String, Object> paramMap, Pager pager);
    List<DeliverAnalysis> findByLocation(Map<String, Object> paramMap, Pager pager);
    
    List<DeliverAnalysis> findByOs(Map<String, Object> paramMap, Pager pager);

	
	//首页顶部统计数据查询
	Map<String,Object> findCompare(Map<String, Object> paramMap);
	
	//查询首页图表
	List<HashMap<String, Object>> findChart(String startDate, String endDate, Long advertiserId);
	
	int findCountForChart(String startDate, String endDate, Long advertiserId);
	
	List<HashMap<String, Object>> findChart(String startDate, String endDate, Long advertiserId, Pager pager);
	/**
	 * 根据广告主id和时间查询它的总的曝光数和点击数
	 */
	HashMap<String, Object> findTotalImpressionAndClickByAdvertiserId(Map<String, Object> paramMap);
	
	/**
	 * 根据代理商id查询该代理商下的所有广告主的曝光数和点击数的总和
	 */
	HashMap<String, Object> findTotalImpressionAndClickByAgentId(Map<String, Object> paramMap);
	
	/**
	 * 导出excel报表
	 */
	List<DeliverAnalysis> findByTotalReport(Map<String, Object> paramMap);
	
    List<DeliverAnalysis> findByPlaceName(Map<String, Object> paramMap);
    
    List<DeliverAnalysis> findByLocation(Map<String, Object> paramMap);
    
    List<DeliverAnalysis> findByOs(Map<String, Object> paramMap);
}
