<?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.miaxis.traffic.mapper.TrafficSignMapper">

    <resultMap type="TrafficSign" id="TrafficSignResult">
        <result property="id"    column="id"    />
        <result property="signName"    column="sign_name"    />
        <result property="seq"    column="seq"    />
        <result property="signUrl"    column="sign_url"    />
        <result property="parentId"    column="parent_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>

    <sql id="selectTrafficSignVo">
        select * from traffic_sign
    </sql>

    <select id="selectTrafficSignList" parameterType="TrafficSign" resultMap="TrafficSignResult">
        <include refid="selectTrafficSignVo"/>
        <where>
            <if test="signName != null  and signName != ''"> and sign_name like concat('%', #{signName}, '%')</if>
            <if test="seq != null "> and seq = #{seq}</if>
            <if test="signUrl != null  and signUrl != ''"> and sign_url = #{signUrl}</if>
            <if test="parentId != null "> and parent_id = #{parentId}</if>
        </where>
    </select>

</mapper>
