<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.backendsys.modules.system.dao.SysCityDao">

    <select id="selectCityList" resultType="com.backendsys.modules.system.entity.SysCity">
        SELECT code, name, parent_code, full_name
        FROM sys_city
        <where>
            <if test="code != null and code != ''">
                AND code = #{code}
            </if>
            <if test="parent_code != null and parent_code != ''">
                AND parent_code = #{parent_code}
            </if>
        </where>
    </select>

</mapper>