package com.cloudcross.ssp.service;

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

import com.cloudcross.ssp.model.AuditBanner;
import com.cloudcross.ssp.model.Banner;
import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.common.utils.Pager;

/**
 * 投放活动对应创意表的服务接口
 * @author chenyou
 *
 */
public interface IBannerService extends IGenericService<Banner> {
	int countByAdGroupId(Long adGroupId);
	//定义复制模板方法
	boolean cloneBanner(Map<String,Object> paramMap);
	boolean edit(Map<String,Object> paramMap);
	boolean updata(Banner t);
	
	public boolean updateSupdated(List<Long> adGroupIdList, Date date);
	public boolean updateSupdatedByOrderId(List<Long> orderIdList, Date date);
	public boolean updateSupdatedByCampaignId(List<Long> campaignIdList,Date date);
	public boolean updateStatusByOrderId(List<Long> orderIdList, int status);
	public boolean updateStatusByCampaignId(List<Long> campaignIdList, int status);
	public boolean updateStatusByAdGroupId(List<Long> adGroupIdList, int status);
	
	int countByParams1(Map<String, Object> paramMap);
	List<Banner> findByParams1(Map<String, Object> paramMap, Pager pager);
	List<Banner> findByParams1(Map<String, Object> paramMap);
	boolean updateStatus1(List<Long> idList, int status);
	
		//定义根据运营商id，搜索框的值，计算素材个数的方法
	int countByOperatorIdandParams(Long operatorId,Map<String, Object> paramMap);
	//定义根据运营商id，搜索框的值，和相应的页码 返回素材列表的方法
	List<AuditBanner> findByOperatorIdandParams(Long operatorId,Map<String, Object> paramMap, Pager pager);
	//新增素材审核
	boolean addOperatorBanner(Long bannerId,int status,Long operatorId);
	//更新素材审核
	boolean updataOperatorBanner(Long bannerId,int status,Long operatorId);
	
	//
	public AuditBanner findByIdOperator(Long id);
	public boolean updateStatusOperator(List<Long> bannerIdList, int checked);
	
}
