<?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.goldenwater.hzz.mapper.AdTreeMapper">
    <select id="getChildren" resultType="com.goldenwater.hzz.domain.AdInfoDTO">
        SELECT AD_CODE, AD_NAME, AD_GRAD, UP_AD_CODE
        FROM ATT_AD_BASE WHERE EXPR_DATE IS NULL AND UP_AD_CODE = #{adCode} ORDER BY AD_CODE
    </select>
    <select id="getByCode" resultType="com.goldenwater.hzz.domain.AdInfoDTO">
        SELECT AD_CODE, AD_NAME, AD_GRAD, UP_AD_CODE
        FROM ATT_AD_BASE WHERE AD_CODE = #{adCode} AND EXPR_DATE IS NULL
    </select>
</mapper>
