package com.cloudcross.ssp.service;



import java.io.File;
import java.io.IOException;
import java.util.*;

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


/**
 * 创意服务模板表服务接口
 * @author chenyou
 *
 */

public interface IBannerTemplateService extends IGenericService<BannerTemplate> {
	/**
	 * 编辑新增创意信息
	 * @param bannerTemplate
	 * @param targetParamsMap
	 * @return 
	 */
	boolean save(BannerTemplate bannerTemplate, Map<String, Object> targetParamsMap);
	 
	public boolean alterName(Map<String, Object> paramMap);

	int countByParams2(Map<String, Object> paramMap);
	
	int countByParams3(Map<String, Object> paramMap);

	List<BannerTemplate> findByParams2(Map<String, Object> paramMap, Pager pager);
	
	List<BannerTemplate> findByParams4(Map<String, Object> paramMap, Pager pager);

	boolean updataIds(BannerTemplate t);

	boolean deleteUpdata(List<Long> idList, int status);
	/**
	 * 上传创意方法
	 * @author djp
	 * */
	
	public String resetName(String uploadName);
	public String getLocalFilePath(String fileName);
	public String replacePath(String path);
	public int judgeType(String fileType);
	//生成缩略图
	public void compressPicture(File localFile,String pathNew,int width,int height) throws IOException;
	//匹配广告为宽高，用取平方差最小
	public BannerTemplate suitSize(int width,int height,BannerTemplate bannerTemplate);
}
