package com.ekexiu.portal.service;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import org.jfw.apt.annotation.Autowrie;
import org.jfw.apt.annotation.Nullable;
import org.jfw.apt.web.annotation.Path;
import org.jfw.apt.web.annotation.operate.Get;
import org.jfw.apt.web.annotation.param.JdbcConn;

import com.ekexiu.portal.dao.DictCityDao;
import com.ekexiu.portal.po.DictCity;

@Path("/dictCity")
public class DictCityService {
	@Autowrie
	private DictCityDao dictCityDao;
	public DictCityDao getDictCityDao() {
		return dictCityDao;
	}
	public void setDictCityDao(DictCityDao dictCityDao) {
		this.dictCityDao = dictCityDao;
	}
	
	@Get
	@Path("/qaCity")
	public List<DictCity> queryCity(@JdbcConn Connection con, @Nullable String parentCode) throws SQLException {
		if(parentCode == null){parentCode = "0";}
		return this.dictCityDao.queryCity(con, parentCode);
	}
}
