<?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="org.springblade.modules.etl.mapper.EtlAdCdMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="adcdEntityResultMap" type="org.springblade.modules.etl.entity.EtlAdCdEntity">
        <result column="ADCD" property="adcd"/>
        <result column="ADNM" property="adnm"/>
        <result column="LGTD" property="lgtd"/>
        <result column="LTTD" property="lttd"/>
        <result column="SUPERIORADCD" property="superioradcd"/>
        <result column="ADDTYPE" property="addtype"/>

    </resultMap>

    <select id="selectList" resultMap="adcdEntityResultMap">
        SELECT
        d.*
        FROM
        etl_ad_cd_b d
        WHERE 1=1

        <if test="entity.adcd!=null">
            and d.ADCD = #{entity.adcd}
        </if>

        <if test="entity.superioradcd!=null">
            and d.SUPERIORADCD = #{entity.superioradcd}
        </if>

    </select>
</mapper>
