<?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.mosty.yjzl.mapper.TbZlYjSjMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.mosty.base.model.entity.yjzl.TbZlYjSj">
        <id column="id" property="id" jdbcType="VARCHAR"/>
        <result column="zl_id" property="zlId" jdbcType="VARCHAR"/>
        <result column="yj_id" property="yjId" jdbcType="VARCHAR"/>
        <result column="yj_sjid" property="yjSjid" jdbcType="VARCHAR"/>
        <result column="yj_gzyid" property="yjGzyid" jdbcType="VARCHAR"/>
        <result column="sj_fl" property="sjFl" jdbcType="VARCHAR"/>
        <result column="sj_flmc" property="sjFlmc" jdbcType="VARCHAR"/>
        <result column="yj_jb" property="yjJb" jdbcType="VARCHAR"/>
        <result column="zldj" property="zldj" jdbcType="VARCHAR"/>
        <result column="yj_fssj" property="yjFssj" jdbcType="TIMESTAMP"/>
        <result column="yj_sj" property="yjSj" jdbcType="TIMESTAMP"/>
        <result column="zlfsrq" property="zlfsrq" jdbcType="TIMESTAMP"/>
        <result column="zlfssj" property="zlfssj" jdbcType="TIMESTAMP"/>
        <result column="zl_bt" property="zlBt" jdbcType="VARCHAR"/>
        <result column="zl_nr" property="zlNr" jdbcType="VARCHAR"/>
        <result column="jd" property="jd" jdbcType="NUMERIC"/>
        <result column="wd" property="wd" jdbcType="NUMERIC"/>
        <result column="zb" property="zb" typeHandler="com.mosty.base.feign.handle.PointTypeHandler"/>
        <result column="zbhash" property="zbhash" jdbcType="VARCHAR"/>
        <result column="yj_dzxzqh" property="yjDzxzqh" jdbcType="VARCHAR"/>
        <result column="yj_dz" property="yjDz" jdbcType="VARCHAR"/>
        <result column="tp_id" property="tpId" jdbcType="VARCHAR"/>
        <result column="zlfqr_id" property="zlfqrId" jdbcType="VARCHAR"/>
        <result column="zlfqr" property="zlfqr" jdbcType="VARCHAR"/>
        <result column="zlfqr_sfzh" property="zlfqrSfzh" jdbcType="VARCHAR"/>
        <result column="zlfqr_dh" property="zlfqrDh" jdbcType="VARCHAR"/>
        <result column="qszt" property="qszt" jdbcType="VARCHAR"/>
        <result column="qssj" property="qssj" jdbcType="TIMESTAMP"/>
        <result column="ddxczt" property="ddxczt" jdbcType="VARCHAR"/>
        <result column="ddxcsj" property="ddxcsj" jdbcType="TIMESTAMP"/>
        <result column="zlwjzt" property="zlwjzt" jdbcType="VARCHAR"/>
        <result column="zlwjsj" property="zlwjsj" jdbcType="TIMESTAMP"/>
        <result column="zlwjsm" property="zlwjsm" jdbcType="VARCHAR"/>
        <result column="zlzxzt" property="zlzxzt" jdbcType="VARCHAR"/>
        <result column="czqk" property="czqk" jdbcType="VARCHAR"/>
        <result column="ssbm" property="ssbm" jdbcType="VARCHAR"/>
        <result column="ssbmdm" property="ssbmdm" jdbcType="VARCHAR"/>
        <result column="ssbmid" property="ssbmid" jdbcType="VARCHAR"/>
        <result column="ssxgaj" property="ssxgaj" jdbcType="VARCHAR"/>
        <result column="ssxgajdm" property="ssxgajdm" jdbcType="VARCHAR"/>
        <result column="ssxgajid" property="ssxgajid" jdbcType="VARCHAR"/>
        <result column="sssgaj" property="sssgaj" jdbcType="VARCHAR"/>
        <result column="sssgajdm" property="sssgajdm" jdbcType="VARCHAR"/>
        <result column="sssgajid" property="sssgajid" jdbcType="VARCHAR"/>
        <result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
        <result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
        <result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
        <result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
        <result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
        <result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
        <result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
        <result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
        <result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
        <result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
        <result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
        <result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
        <result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
        <result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
        <result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
        <result property="bz" column="bz" jdbcType="VARCHAR"/>
        <result property="qsyxsj" column="qsyxsj" jdbcType="TIMESTAMP"/>
        <result property="ddxcyxsj" column="ddxcyxsj" jdbcType="TIMESTAMP"/>
        <result property="zlwjyxsj" column="zlwjyxsj" jdbcType="TIMESTAMP"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, zl_id, yj_id, yj_sjid, yj_gzyid, sj_fl,sj_flmc, yj_jb, zldj, yj_fssj, yj_sj, zlfsrq, zlfssj,qsyxsj,ddxcyxsj,zlwjyxsj,
        zl_bt, zl_nr, jd, wd, zb, zbhash, yj_dzxzqh, yj_dz, tp_id, zlfqr_id, zlfqr, zlfqr_sfzh,
        zlfqr_dh, qszt, qssj, ddxczt, ddxcsj, zlwjzt, zlwjsj, zlwjsm, zlzxzt, czqk, ssbm, ssbmdm,
        ssbmid, ssxgaj, ssxgajdm, ssxgajid, sssgaj, sssgajdm, sssgajid, xt_sjly, xt_sjzt, xt_scbz,
        xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
        xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
    </sql>


    <insert id="insertEntity" parameterType="com.mosty.base.model.entity.yjzl.TbZlYjSj">
        insert into tb_zl_yj_sj(<include refid="Base_Column_List">
    </include>)values (
        #{id},#{ zlId},#{ yjId},#{ yjSjid},#{ yjGzyid},#{ sjFl},#{ sjFlmc},#{ yjJb},#{ zldj},#{ yjFssj},#{ yjSj},#{ zlfsrq},#{ zlfssj},
        #{qsyxsj},#{ddxcyxsj},#{zlwjyxsj},
        #{zlBt},#{ zlNr},#{ jd},#{ wd},
        ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
        #{zbhash},#{ yjDzxzqh},#{ yjDz},#{ tpId},#{ zlfqrId},#{ zlfqr},#{ zlfqrSfzh},#{ zlfqrDh},#{ qszt},#{ qssj},#{ ddxczt},
        #{ddxcsj},#{ zlwjzt},#{ zlwjsj},#{ zlwjsm},#{ zlzxzt},#{ czqk},#{ ssbm},#{ ssbmdm},#{ ssbmid},#{ ssxgaj},#{ ssxgajdm},
        #{ssxgajid},#{ sssgaj},#{ sssgajdm},#{ sssgajid},
        #{ xtSjly},#{xtSjzt},#{ xtScbz},#{ xtCjip},#{ xtCjsj},#{ xtCjrId},#{ xtCjr},#{ xtCjbmdm},#{ xtCjbmmc},
        #{ xtZhgxip},#{ xtZhgxsj},#{ xtZhgxrid},#{xtZhgxr},#{ xtZhgxbmdm},#{ xtZhgxbm},#{ bz}
        )
    </insert>

    <update id="updateEntity" parameterType="com.mosty.base.model.entity.yjzl.TbZlYjSj">
        update tb_zl_yj_sj
        <set>
            <if test="zlId != null and zlId != ''">
                zl_id = #{zlId},
            </if>
            <if test="yjId != null and yjId != ''">
                yj_id = #{yjId},
            </if>
            <if test="yjSjid != null and yjSjid != ''">
                yj_sjid = #{yjSjid},
            </if>
            <if test="yjGzyid != null and yjGzyid != ''">
                yj_gzyid = #{yjGzyid},
            </if>
            <if test="sjFl != null and sjFl != ''">
                sj_fl = #{sjFl},
            </if>
            <if test="yjJb != null and yjJb != ''">
                yj_jb = #{yjJb},
            </if>
            <if test="zldj != null and zldj != ''">
                zldj = #{zldj},
            </if>
            <if test="yjFssj != null and yjFssj != ''">
                yj_fssj = #{yjFssj},
            </if>
            <if test="yjSj != null and yjSj != ''">
                yj_sj = #{yjSj},
            </if>
            <if test="zlfsrq != null and zlfsrq != ''">
                zlfsrq = #{zlfsrq},
            </if>
            <if test="zlfssj != null and zlfssj != ''">
                zlfssj = #{zlfssj},
            </if>
            <if test="zlBt != null and zlBt != ''">
                zl_bt = #{zlBt},
            </if>
            <if test="zlNr != null and zlNr != ''">
                zl_nr = #{zlNr},
            </if>
            <if test="jd != null and jd != ''">
                jd = #{jd},
            </if>
            <if test="wd != null and wd != ''">
                wd = #{wd},
            </if>
            <if test="zb != null and zb != ''">
                zb = ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PointTypeHandler}),
            </if>
            <if test="zbhash != null and zbhash != ''">
                zbhash = #{zbhash},
            </if>
            <if test="yjDzxzqh != null and yjDzxzqh != ''">
                yj_dzxzqh = #{yjDzxzqh},
            </if>
            <if test="yjDz != null and yjDz != ''">
                yj_dz = #{yjDz},
            </if>
            <if test="tpId != null and tpId != ''">
                tp_id = #{tpId},
            </if>
            <if test="zlfqrId != null and zlfqrId != ''">
                zlfqr_id = #{zlfqrId},
            </if>
            <if test="zlfqr != null and zlfqr != ''">
                zlfqr = #{zlfqr},
            </if>
            <if test="zlfqrSfzh != null and zlfqrSfzh != ''">
                zlfqr_sfzh = #{zlfqrSfzh},
            </if>
            <if test="zlfqrDh != null and zlfqrDh != ''">
                zlfqr_dh = #{zlfqrDh},
            </if>
            <if test="qszt != null and qszt != ''">
                qszt = #{qszt},
            </if>
            <if test="qssj != null and qssj != ''">
                qssj = #{qssj},
            </if>
            <if test="ddxczt != null and ddxczt != ''">
                ddxczt = #{ddxczt},
            </if>
            <if test="ddxcsj != null and ddxcsj != ''">
                ddxcsj = #{ddxcsj},
            </if>
            <if test="zlwjzt != null and zlwjzt != ''">
                zlwjzt = #{zlwjzt},
            </if>
            <if test="zlwjsj != null and zlwjsj != ''">
                zlwjsj = #{zlwjsj},
            </if>
            <if test="zlwjsm != null and zlwjsm != ''">
                zlwjsm = #{zlwjsm},
            </if>
            <if test="zlzxzt != null and zlzxzt != ''">
                zlzxzt = #{zlzxzt},
            </if>
            <if test="czqk != null and czqk != ''">
                czqk = #{czqk},
            </if>
            <if test="ssbm != null and ssbm != ''">
                ssbm = #{ssbm},
            </if>
            <if test="ssbmdm != null and ssbmdm != ''">
                ssbmdm = #{ssbmdm},
            </if>
            <if test="ssbmid != null and ssbmid != ''">
                ssbmid = #{ssbmid},
            </if>
            <if test="ssxgaj != null and ssxgaj != ''">
                ssxgaj = #{ssxgaj},
            </if>
            <if test="ssxgajdm != null and ssxgajdm != ''">
                ssxgajdm = #{ssxgajdm},
            </if>
            <if test="ssxgajid != null and ssxgajid != ''">
                ssxgajid = #{ssxgajid},
            </if>
            <if test="sssgaj != null and sssgaj != ''">
                sssgaj = #{sssgaj},
            </if>
            <if test="sssgajdm != null and sssgajdm != ''">
                sssgajdm = #{sssgajdm},
            </if>
            <if test="sssgajid != null and sssgajid != ''">
                sssgajid = #{sssgajid},
            </if>
            <if test="xtSjly != null and xtSjly != ''">
                xt_sjly = #{xtSjly},
            </if>
            <if test="xtSjzt != null and xtSjzt != ''">
                xt_sjzt = #{xtSjzt},
            </if>
            <if test="xtScbz != null and xtScbz != ''">
                xt_scbz = #{xtScbz},
            </if>
            <if test="xtCjip != null and xtCjip != ''">
                xt_cjip = #{xtCjip},
            </if>
            <if test="xtCjsj != null">
                xt_cjsj = #{xtCjsj},
            </if>
            <if test="xtCjrId != null and xtCjrId != ''">
                xt_cjr_id = #{xtCjrId},
            </if>
            <if test="xtCjr != null and xtCjr != ''">
                xt_cjr = #{xtCjr},
            </if>
            <if test="xtCjbmdm != null and xtCjbmdm != ''">
                xt_cjbmdm = #{xtCjbmdm},
            </if>
            <if test="xtCjbmmc != null and xtCjbmmc != ''">
                xt_cjbmmc = #{xtCjbmmc},
            </if>
            <if test="xtZhgxip != null and xtZhgxip != ''">
                xt_zhgxip = #{xtZhgxip},
            </if>
            <if test="xtZhgxsj != null">
                xt_zhgxsj = #{xtZhgxsj},
            </if>
            <if test="xtZhgxrid != null and xtZhgxrid != ''">
                xt_zhgxrid = #{xtZhgxrid},
            </if>
            <if test="xtZhgxr != null and xtZhgxr != ''">
                xt_zhgxr = #{xtZhgxr},
            </if>
            <if test="xtZhgxbmdm != null and xtZhgxbmdm != ''">
                xt_zhgxbmdm = #{xtZhgxbmdm},
            </if>
            <if test="xtZhgxbm != null and xtZhgxbm != ''">
                xt_zhgxbm = #{xtZhgxbm},
            </if>
            <if test="bz != null and bz != ''">
                bz = #{bz}
            </if>
        </set>
        where id = #{id}
    </update>
</mapper>
