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

    <resultMap type="cn.cecep.talroad.domain.BasDeviceZlConfig" id="BasDeviceZlConfigResult">
        <result property="dataId"    column="data_id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="deviceId"    column="device_id"    />
        <result property="fsDeviceId"    column="fs_device_id"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>


    <sql id="selectBasDeviceZlConfigVo">
        select data_id, factory_id, device_id, fs_device_id, create_time from bas_device_zl_config
    </sql>

    <select id="selectBasDeviceZlConfigList" parameterType="cn.cecep.talroad.domain.BasDeviceZlConfig" resultMap="BasDeviceZlConfigResult">
        <include refid="selectBasDeviceZlConfigVo"/>
        <where>
            <if test="factoryId != null  and factoryId != ''"> and factory_id = #{factoryId}</if>
            <if test="deviceId != null  and deviceId != ''"> and device_id = #{deviceId}</if>
            <if test="fsDeviceId != null  and fsDeviceId != ''"> and fs_device_id = #{fsDeviceId}</if>
        </where>
    </select>

</mapper>
