package com.yihu.wlyy.service.common.area;

import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.repository.address.TownDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by lyr-pc on 2016/11/22.
 */
@Service
public class AreaService extends BaseService {

    @Autowired
    TownDao townDao;

    /**
     * 查询城市城镇
     *
     * @param city
     * @return
     */
    public List<Town> getCityTowns(String city){
        return townDao.findByCityCode(city);
    }
}
