package com.cloudcross.ssp.back.service.impl;

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

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

import com.cloudcross.ssp.back.model.AdGroupPlace;
import com.cloudcross.ssp.back.service.IAdGroupPlaceService;
import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.common.utils.Pager;

@Service
public class AdGroupPlaceService implements IAdGroupPlaceService {

	@Autowired
	private GenericIBatisDao ibatisDao;
	
	@Override
	public AdGroupPlace findById(Long id) {
		return null;
	}
	
	public List<AdGroupPlace> findAll(Long adGroupId) {
		return ibatisDao.getList("back.adGroupPlaceSqlMapper.findAll", adGroupId);
	}

	@Override
	public int countByParams(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public boolean delete(Long adGroupId) {
		ibatisDao.delete("back.adGroupPlaceSqlMapper.delete", adGroupId);
		return true;
	}
	@Override
	public List<AdGroupPlace> findByParams(Map<String, Object> paramMap, Pager pager) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean add(AdGroupPlace t) {
		ibatisDao.save("back.adGroupPlaceSqlMapper.addPlace", t);
		return true;
	}

	@Override
	public boolean edit(AdGroupPlace t) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean updateStatus(List<Long> idList, int status) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public List<AdGroupPlace> findAllByAdGroupId(Long adGroupId) {
		return ibatisDao.getList("back.adGroupPlaceSqlMapper.findAllByAdGroupId", adGroupId);
	}

	@Override
	public boolean updatedPlaceSupdated(Long adGroupId) {
		// TODO Auto-generated method stub
		ibatisDao.save("back.adGroupPlaceSqlMapper.updatedSupdated", adGroupId);
		return true;
	}

}
