CityManagerImpl.java 1.16 KB
package com.diligrp.website.manager.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.diligrp.website.dao.CityDao;
import com.diligrp.website.domain.City;
import com.diligrp.website.manager.CityManager;

@Component("cityManager")
public class CityManagerImpl implements CityManager {

	@Resource
	private CityDao cityDao;

	public List<City> getCityListByParentId(Integer pid) {
		return cityDao.getCityListByParentId(pid);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.diligrp.website.manager.CityManager#getParentCityListById(java.lang
	 * .Integer)
	 */
	@Override
	public List<City> getParentCityListById(Integer pid) {
		List<City> list = cityDao.getParentCityListById(pid);
		return list;
	}

	@Override
	public List<City> getCityByText(String cityName, int cityLevel) {
		return cityDao.getCityByText(cityName, cityLevel);
	}

	@Override
	public List<City> getCityListByCityIds(List cityIds) {
		List<City> list = cityDao.getCityListByCityIds(cityIds);
		return list;
	}

	@Override
	public List<City> getCityListByCountryId(Long countryId) {
		return this.cityDao.getCityListByCountryId(countryId);
	}
}