package com.cloudcross.ssp.service;

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

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

public interface IOrderService extends IGenericService<Order> {

	/**
	 * 按条件查找订单
	 * @param advertiserType
	 * @return
	 */
	public List<Order> findByAdvertiserType(String advertiserType);
	//按advertiserId查找订单
	public List<Order> findByAdvertiserId(Long advertiserId);
	//按订单名查找订单
	public long findByName(String name);
	//按订单状态查找订单
	public List<Order> findByStatus(Map<String, Object> paramMap);
	//导出Excel用
	public List<Order> findDeliverEffectAnalysis(Map<String, Object> paramMap);
	//向t_adgroup里面插入Supdated
	public boolean updateSupdated(List<Long> orderIdList, int status);
	
	public String selectOrderNameById(Long id);
	
	public boolean updateSupdatedAll(List<Long> orderIdList,Date date);
	
	public boolean updateStatusByAdvertiserId(List<Long> AdvertiseIdList, int status);
	
	public boolean updateStatusAll(List<Long> orderIdList, int status);
	
	int countByParamsBack(Map<String, Object> paramMap);
	int countByParamsOperator(Map<String, Object> paramMap);
	
	List<Order> findByParamsOperator(Map<String, Object> paramMap, Pager pager);
	List<Order> findByParamsBack(Map<String, Object> paramMap, Pager pager);
	boolean addBack(Order t);
	
}
