<?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="cn.cecep.talroad.mapper.PcAdslMapper">

    <resultMap type="cn.cecep.talroad.domain.PcAdsl" id="PcAdslResult">
        <result property="adslId"    column="adsl_id"    />
        <result property="adslName"    column="adsl_name"    />
        <result property="adslCode"    column="adsl_code"    />
        <result property="adslEnable"    column="adsl_enable"    />
        <result property="sort"    column="sort"    />
    </resultMap>


    <sql id="selectPcAdslVo">
        select adsl_id, adsl_name, adsl_code, adsl_enable, sort from pc_adsl
    </sql>

    <select id="selectPcAdslList" parameterType="cn.cecep.talroad.domain.PcAdsl" resultMap="PcAdslResult">
        <include refid="selectPcAdslVo"/>
        <where>
            <if test="adslName != null  and adslName != ''"> and adsl_name like concat('%', #{adslName}, '%')</if>
            <if test="adslCode != null  and adslCode != ''"> and adsl_code = #{adslCode}</if>
            <if test="adslEnable != null  and adslEnable != ''"> and adsl_enable = #{adslEnable}</if>
        </where>
    </select>

</mapper>
