package com.cloudcross.ssp.service;



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

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.base.web.result.AjaxResult;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Advertiser;

public interface IAdvertiserService extends IGenericService<Advertiser>{
	
	//用状态和搜索条件查找广告主
	public int countByStatus(Map<String, Object> paramMap);
	
	public List<Advertiser> findByStatus(Map<String, Object> paramMap);

	public long findByName(String name);
	
	public List<Advertiser> findByAgentId(Long id);
	//向t_adgroup里面插入Supdated
	public boolean updateSupdated(List<Long> advertiserIdList, int status);
	
	//导出Excel用
	public List<Advertiser> findDeliverEffectAnalysis(Map<String, Object> paramMap);
	
	//文件上传
	public AjaxResult fileUpload(HttpServletRequest request,HttpServletResponse response);
	
	public String selectAdvertiserNameById(Long id);
	
	//更新所有的supdated
	public boolean updateSupdatedAll(List<Long> advertiserIdList, Date date);
	//删除所有（逻辑删除）
	public boolean updateStatusAll(List<Long> advertiserIdList, int status);
	
	public List<Advertiser> findByOperatorOperator(Long operatorId);
	public List<Advertiser> findByParamsBack(Map<String, Object> paramMap,Pager pager);
	public List<Advertiser> findByParamsOperator(Map<String, Object> paramMap,Pager pager);
	public int countByParamsOperator(Map<String, Object> paramMap);
	public boolean addBack(Advertiser t);
	public boolean editOperator(Advertiser t);
	public boolean editBack(Advertiser t);
}
