package com.cloudcross.ssp.service.impl;

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

import org.apache.commons.lang.ArrayUtils;
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.MapBuilder;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.PlaceClassInformation;
import com.cloudcross.ssp.service.IPlaceClassInformationService;
import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
import com.cloudcross.ssp.web.widget.SelectorController.ISelectorProvider;

@Service
public class PlaceClassInformationService implements IPlaceClassInformationService, ISelectorProvider {
	private static final Logger LOG = Logger.getLogger(PlaceClassInformationService.class);
	
	@Autowired
	private GenericIBatisDao myBatisDao;
	
	@Override
	public PlaceClassInformation findById(Long id) {
		return myBatisDao.get("placeClassInformationSqlMapper.findById", id);
	}

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

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

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

	@Override
	public boolean edit(PlaceClassInformation 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<PlaceClassInformation> findPlaceClassByOperatorId(Long operatorId) {
		return myBatisDao.getList("placeClassInformationSqlMapper.findPlaceClassByOperatorId", operatorId);
	}

	@Override
	public List<PlaceClassInformation> findAll() {
		return myBatisDao.getList("placeClassInformationSqlMapper.findAll");
	}

	@Override
	public Map<String, List<? extends ISelector>> provideData(String[] parentId) {
		List<PlaceClassInformation> placeClassInformationList = findAll();
		return MapBuilder.create(HashMap.class).add("placeClassInformationList", placeClassInformationList)
				.map();
	}

}
