<?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.PcNoiseTypeMapper">

    <resultMap type="cn.cecep.talroad.domain.PcNoiseType" id="PcNoiseTypeResult">
        <result property="id"    column="id"    />
        <result property="noiseTypeName"    column="noise_type_name"    />
        <result property="noiseTypeCode"    column="noise_type_code"    />
    </resultMap>


    <sql id="selectPcNoiseTypeVo">
        select id, noise_type_name, noise_type_code from pc_noise_type
    </sql>

    <select id="selectPcNoiseTypeList" parameterType="cn.cecep.talroad.domain.PcNoiseType" resultMap="PcNoiseTypeResult">
        <include refid="selectPcNoiseTypeVo"/>
        <where>
            <if test="noiseTypeName != null  and noiseTypeName != ''"> and noise_type_name like concat('%', #{noiseTypeName}, '%')</if>
            <if test="noiseTypeCode != null  and noiseTypeCode != ''"> and noise_type_code = #{noiseTypeCode}</if>
        </where>
    </select>

</mapper>
