package com.cloudcross.ssp.service.impl;

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

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Zone;
import com.cloudcross.ssp.model.ZoneIndustry;
import com.cloudcross.ssp.service.IZoneIndustryService;



@Service
public class ZoneIndustryService implements IZoneIndustryService {
	//private static final Logger LOG = Logger.getLogger(ZoneService.class);	
	@Autowired
	private GenericIBatisDao myBatisDao;
	
	public List<ZoneIndustry> findAll(Long zoneId) {
		return myBatisDao.getList("zoneIndustrySqlMapper.findAll", zoneId);
	}
	
	@Override
	public boolean delete(Zone t) {
		t.setSupdated(new Date());
		myBatisDao.save("zoneIndustrySqlMapper.deleteZoneIndustry",t);
		
		return true;
	}
	
	@Override
	public boolean add(ZoneIndustry t) {
		t.setSupdated(new Date());
		myBatisDao.save("zoneIndustrySqlMapper.addZoneIndustry", t);
		return true;
	}

	@Override
	public boolean edit(ZoneIndustry t) {
		t.setSupdated(new Date());
		myBatisDao.save("zoneIndustrySqlMapper.editZoneIndustry", t);
		return true;
	}

	@Override
	public int countByParams(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return 0;
	}

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

	@Override
	public ZoneIndustry findById(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<ZoneIndustry> findByParams(Map<String, Object> paramMap,
			Pager pager) {
		// TODO Auto-generated method stub
		return null;
	}

}
