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

    <resultMap type="cn.cecep.talroad.domain.OdsOnlineOlDgiinfoA" id="OdsOnlineOlDgiinfoAResult">
        <result property="id"    column="id"    />
        <result property="psId"    column="ps_id"    />
        <result property="dgiMn"    column="dgi_mn"    />
        <result property="dgiPwd"    column="dgi_pwd"    />
        <result property="ip"    column="ip"    />
        <result property="port"    column="port"    />
        <result property="simNo"    column="sim_no"    />
        <result property="getter"    column="getter"    />
        <result property="getUnit"    column="get_unit"    />
        <result property="getDate"    column="get_date"    />
        <result property="useDate"    column="use_date"    />
        <result property="intervalTime"    column="interval_time"    />
        <result property="manufactor"    column="manufactor"    />
        <result property="equipmentFactoryNumber"    column="equipment_factory_number"    />
        <result property="equipmentTypeCode"    column="equipment_type_code"    />
        <result property="contact"    column="contact"    />
        <result property="contactPhone"    column="contact_phone"    />
        <result property="checkState"    column="check_state"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="deleteTime"    column="delete_time"    />
        <result property="enableTime"    column="enable_time"    />
        <result property="enable"    column="enable"    />
        <result property="preventFaking"    column="prevent_faking"    />
    </resultMap>


    <sql id="selectOdsOnlineOlDgiinfoAVo">
        select id, ps_id, dgi_mn, dgi_pwd, ip, port, sim_no, getter, get_unit, get_date, use_date, interval_time, manufactor, equipment_factory_number, equipment_type_code, contact, contact_phone, check_state, update_time, create_time, delete_time, enable_time, enable, prevent_faking from ods_online_ol_dgiinfo_a
    </sql>

    <select id="selectOdsOnlineOlDgiinfoAList" parameterType="cn.cecep.talroad.domain.OdsOnlineOlDgiinfoA" resultMap="OdsOnlineOlDgiinfoAResult">
        <include refid="selectOdsOnlineOlDgiinfoAVo"/>
        <where>
            <if test="psId != null  and psId != ''"> and ps_id = #{psId}</if>
            <if test="dgiMn != null  and dgiMn != ''"> and dgi_mn = #{dgiMn}</if>
            <if test="dgiPwd != null  and dgiPwd != ''"> and dgi_pwd = #{dgiPwd}</if>
            <if test="ip != null  and ip != ''"> and ip = #{ip}</if>
            <if test="port != null  and port != ''"> and port = #{port}</if>
            <if test="simNo != null  and simNo != ''"> and sim_no = #{simNo}</if>
            <if test="getter != null  and getter != ''"> and getter = #{getter}</if>
            <if test="getUnit != null  and getUnit != ''"> and get_unit = #{getUnit}</if>
            <if test="getDate != null  and getDate != ''"> and get_date = #{getDate}</if>
            <if test="useDate != null  and useDate != ''"> and use_date = #{useDate}</if>
            <if test="intervalTime != null  and intervalTime != ''"> and interval_time = #{intervalTime}</if>
            <if test="manufactor != null  and manufactor != ''"> and manufactor = #{manufactor}</if>
            <if test="equipmentFactoryNumber != null  and equipmentFactoryNumber != ''"> and equipment_factory_number = #{equipmentFactoryNumber}</if>
            <if test="equipmentTypeCode != null  and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
            <if test="contact != null  and contact != ''"> and contact = #{contact}</if>
            <if test="contactPhone != null  and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
            <if test="checkState != null  and checkState != ''"> and check_state = #{checkState}</if>
            <if test="deleteTime != null  and deleteTime != ''"> and delete_time = #{deleteTime}</if>
            <if test="enableTime != null  and enableTime != ''"> and enable_time = #{enableTime}</if>
            <if test="enable != null  and enable != ''"> and enable = #{enable}</if>
            <if test="preventFaking != null "> and prevent_faking = #{preventFaking}</if>
        </where>
    </select>

</mapper>
