package com.cloudcross.ssp.service.impl;




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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.model.AdgroupZone;
import com.cloudcross.ssp.service.IAdgroupZoneService;



@Service
public class AdgroupZoneService implements IAdgroupZoneService {
	@Autowired
	private GenericIBatisDao myBatisDao;
	
	public void saveAdgroupZone(AdgroupZone adgroupZone){
		myBatisDao.save("adgroupZoneSqlMapper.addAdgroupZone",adgroupZone);
	}

	public boolean updateZoneIdByAdgroupId(Map<String,Object>map){
		myBatisDao.save("adgroupZoneSqlMapper.updateAdgroupZoneByAdgroupId",map);
		return true;
	}
	
	public List<Long> queryZoneIdByAdgroupId(Long adgroupId){
		return myBatisDao.getList("adgroupZoneSqlMapper.queryZoneIdByAdgroupId", adgroupId);
	}

}
