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

    <resultMap type="cn.cecep.talroad.domain.OdsOnlineOlPsinfoA" id="OdsOnlineOlPsinfoAResult">
        <result property="id"    column="id"    />
        <result property="psCode"    column="ps_code"    />
        <result property="psName"    column="ps_name"    />
        <result property="psLetter"    column="ps_letter"    />
        <result property="address"    column="address"    />
        <result property="industryCode"    column="industry_code"    />
        <result property="regulationIndustryId"    column="regulation_industry_id"    />
        <result property="regionId"    column="region_id"    />
        <result property="longitude"    column="longitude"    />
        <result property="latitude"    column="latitude"    />
        <result property="contact"    column="contact"    />
        <result property="contactphone"    column="contactphone"    />
        <result property="isHighChimney"    column="is_high_chimney"    />
        <result property="isRubbish"    column="is_rubbish"    />
        <result property="categoryTypeId"    column="category_type_id"    />
        <result property="isPwxk"    column="is_pwxk"    />
        <result property="psState"    column="ps_state"    />
        <result property="enable"    column="enable"    />
        <result property="networkTime"    column="network_time"    />
        <result property="networkStatus"    column="network_status"    />
        <result property="opFlagNetworkTime"    column="op_flag_network_time"    />
        <result property="opFlagNetworkStatus"    column="op_flag_network_status"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="enableTime"    column="enable_time"    />
        <result property="deleteTime"    column="delete_time"    />
        <result property="syProvince"    column="sy_province"    />
        <result property="sySky"    column="sy_sky"    />
        <result property="psType"    column="ps_type"    />
        <result property="psDisposal"    column="ps_disposal"    />
    </resultMap>


    <sql id="selectOdsOnlineOlPsinfoAVo">
        select id, ps_code, ps_name, ps_letter, address, industry_code, regulation_industry_id, region_id, longitude, latitude, contact, contactphone, is_high_chimney, is_rubbish, category_type_id, is_pwxk, ps_state, enable, network_time, network_status, op_flag_network_time, op_flag_network_status, create_time, update_time, enable_time, delete_time, sy_province, sy_sky, ps_type, ps_disposal from ods_online_ol_psinfo_a
    </sql>

    <select id="selectOdsOnlineOlPsinfoAList" parameterType="cn.cecep.talroad.domain.OdsOnlineOlPsinfoA" resultMap="OdsOnlineOlPsinfoAResult">
        <include refid="selectOdsOnlineOlPsinfoAVo"/>
        <where>
            <if test="psCode != null  and psCode != ''"> and ps_code = #{psCode}</if>
            <if test="psName != null  and psName != ''"> and ps_name like concat('%', #{psName}, '%')</if>
            <if test="psLetter != null  and psLetter != ''"> and ps_letter = #{psLetter}</if>
            <if test="address != null  and address != ''"> and address = #{address}</if>
            <if test="industryCode != null  and industryCode != ''"> and industry_code = #{industryCode}</if>
            <if test="regulationIndustryId != null  and regulationIndustryId != ''"> and regulation_industry_id = #{regulationIndustryId}</if>
            <if test="regionId != null  and regionId != ''"> and region_id = #{regionId}</if>
            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
            <if test="contact != null  and contact != ''"> and contact = #{contact}</if>
            <if test="contactphone != null  and contactphone != ''"> and contactphone = #{contactphone}</if>
            <if test="isHighChimney != null  and isHighChimney != ''"> and is_high_chimney = #{isHighChimney}</if>
            <if test="isRubbish != null  and isRubbish != ''"> and is_rubbish = #{isRubbish}</if>
            <if test="categoryTypeId != null  and categoryTypeId != ''"> and category_type_id = #{categoryTypeId}</if>
            <if test="isPwxk != null  and isPwxk != ''"> and is_pwxk = #{isPwxk}</if>
            <if test="psState != null  and psState != ''"> and ps_state = #{psState}</if>
            <if test="enable != null  and enable != ''"> and enable = #{enable}</if>
            <if test="networkTime != null  and networkTime != ''"> and network_time = #{networkTime}</if>
            <if test="networkStatus != null "> and network_status = #{networkStatus}</if>
            <if test="opFlagNetworkTime != null  and opFlagNetworkTime != ''"> and op_flag_network_time = #{opFlagNetworkTime}</if>
            <if test="opFlagNetworkStatus != null "> and op_flag_network_status = #{opFlagNetworkStatus}</if>
            <if test="enableTime != null  and enableTime != ''"> and enable_time = #{enableTime}</if>
            <if test="deleteTime != null  and deleteTime != ''"> and delete_time = #{deleteTime}</if>
            <if test="syProvince != null "> and sy_province = #{syProvince}</if>
            <if test="sySky != null "> and sy_sky = #{sySky}</if>
            <if test="psType != null "> and ps_type = #{psType}</if>
            <if test="psDisposal != null "> and ps_disposal = #{psDisposal}</if>
        </where>
    </select>

</mapper>
