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

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.mosty.base.model.entity.yjzl.TbZlXlBxd">
        <id column="id" property="id" />
        <result column="zl_id" property="zlId" />
        <result column="zl_xl_id" property="zlXlId" />
        <result column="bxd_id" property="bxdId" />
        <result column="ss_xfqy_id" property="ssXfqyId" />
        <result column="bxd_mc" property="bxdMc" />
        <result column="bxd_lx" property="bxdLx" />
        <result column="bxdlydm" property="bxdlydm" />
        <result column="bxyy" property="bxyy" />
        <result column="yqkssj" property="yqkssj" />
        <result column="yqjssj" property="yqjssj" />
        <result column="jd" property="jd" />
        <result column="wd" property="wd" />
        <result column="zb" property="zb" typeHandler="com.mosty.base.feign.handle.PointTypeHandler"/>
        <result column="zbhash" property="zbhash" />
        <result column="xzqhdm" property="xzqhdm" />
        <result column="yq_kssj" property="yqKssj" />
        <result column="yq_jssj" property="yqJssj" />
        <result column="yq_tlsc" property="yqTlsc" />
        <result column="yq_sfpc" property="yqSfpc" />
        <result column="yq_pcrysl" property="yqPcrysl" />
        <result column="yq_pcclsl" property="yqPcclsl" />
        <result column="yxq" property="yxq" />
        <result column="sfxl" property="sfxl" />
        <result column="sj_xlcs" property="sjXlcs" />
        <result column="sj_kssj" property="sjKssj" />
        <result column="sj_lksj" property="sjLksj" />
        <result column="sj_tlsc" property="sjTlsc" />
        <result column="sj_pcrysl" property="sjPcrysl" />
        <result column="sj_pcclsl" property="sjPcclsl" />
        <result column="zlwjzt" property="zlwjzt" />
        <result column="zlwjsj" property="zlwjsj" />
        <result column="zlwjsm" property="zlwjsm" />
        <result column="ssbm" property="ssbm" />
        <result column="ssbmdm" property="ssbmdm" />
        <result column="ssbmid" property="ssbmid" />
        <result column="ssxgaj" property="ssxgaj" />
        <result column="ssxgajdm" property="ssxgajdm" />
        <result column="ssxgajid" property="ssxgajid" />
        <result column="sssgaj" property="sssgaj" />
        <result column="sssgajdm" property="sssgajdm" />
        <result column="sssgajid" property="sssgajid" />
        <result column="xt_sjly" property="xtSjly" />
        <result column="xt_sjzt" property="xtSjzt" />
        <result column="xt_scbz" property="xtScbz" />
        <result column="xt_cjip" property="xtCjip" />
        <result column="xt_cjsj" property="xtCjsj" />
        <result column="xt_cjr_id" property="xtCjrId" />
        <result column="xt_cjr" property="xtCjr" />
        <result column="xt_cjbmdm" property="xtCjbmdm" />
        <result column="xt_cjbmmc" property="xtCjbmmc" />
        <result column="xt_zhgxip" property="xtZhgxip" />
        <result column="xt_zhgxsj" property="xtZhgxsj" />
        <result column="xt_zhgxrid" property="xtZhgxrid" />
        <result column="xt_zhgxr" property="xtZhgxr" />
        <result column="xt_zhgxbmdm" property="xtZhgxbmdm" />
        <result column="xt_zhgxbm" property="xtZhgxbm" />
        <result column="bz" property="bz" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, zl_id, zl_xl_id, bxd_id, ss_xfqy_id, bxd_mc, bxd_lx, bxdlydm, bxyy, yqkssj, yqjssj, jd, wd, zb, zbhash, xzqhdm, yq_kssj, yq_jssj, yq_tlsc, yq_sfpc, yq_pcrysl, yq_pcclsl, yxq, sfxl, sj_xlcs, sj_kssj, sj_lksj, sj_tlsc, sj_pcrysl, sj_pcclsl, zlwjzt, zlwjsj, zlwjsm, 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.TbZlXlBxd">
        insert into tb_zl_xl_bxd(<include refid="Base_Column_List"></include>)values (
        #{id},#{ zlId},#{ zlXlId},#{ bxdId},#{ ssXfqyId},#{ bxdMc},#{ bxdLx},#{ bxdlydm},#{ bxyy},#{ yqkssj},
        #{yqjssj},#{ jd},#{ wd},
        ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
        #{zbhash},#{ xzqhdm},#{ yqKssj},#{ yqJssj},#{ yqTlsc},#{ yqSfpc},#{ yqPcrysl},#{ yqPcclsl},#{ yxq},#{ sfxl},#{ sjXlcs},
        #{sjKssj},#{ sjLksj},#{ sjTlsc},#{ sjPcrysl},#{ sjPcclsl},#{ zlwjzt},#{ zlwjsj},#{ zlwjsm},#{ 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.TbZlXlBxd">
        update tb_zl_xl_bxd
        <set>
            <if test="zlId != null and zlId != ''">
                zl_id = #{zlId},
            </if>
            <if test="zlXlId != null and zlXlId != ''">
                zl_xl_id = #{zlXlId},
            </if>
            <if test="bxdId != null and bxdId != ''">
                bxd_id = #{bxdId},
            </if>
            <if test="ssXfqyId != null and ssXfqyId != ''">
                ss_xfqy_id = #{ssXfqyId},
            </if>
            <if test="bxdMc != null and bxdMc != ''">
                bxd_mc = #{bxdMc},
            </if>
            <if test="bxdLx != null and bxdLx != ''">
                bxd_lx = #{bxdLx},
            </if>
            <if test="bxdlydm != null and bxdlydm != ''">
                bxdlydm = #{bxdlydm},
            </if>
            <if test="bxyy != null and bxyy != ''">
                bxyy = #{bxyy},
            </if>
            <if test="yqkssj != null and yqkssj != ''">
                yqkssj = #{yqkssj},
            </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 =   zb = ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PointTypeHandler}),
            </if>
            <if test="zbhash != null and zbhash != ''">
                zbhash = #{zbhash},
            </if>
            <if test="xzqhdm != null and xzqhdm != ''">
                xzqhdm = #{xzqhdm},
            </if>
            <if test="yqKssj != null and yqKssj != ''">
                yq_kssj = #{yqKssj},
            </if>
            <if test="yqJssj != null and yqJssj != ''">
                yq_jssj = #{yqJssj},
            </if>
            <if test="yqTlsc != null and yqTlsc != ''">
                yq_tlsc = #{yqTlsc},
            </if>
            <if test="yqSfpc != null and yqSfpc != ''">
                yq_sfpc = #{yqSfpc},
            </if>
            <if test="yqPcrysl != null and yqPcrysl != ''">
                yq_pcrysl = #{yqPcrysl},
            </if>
            <if test="yqPcclsl != null and yqPcclsl != ''">
                yq_pcclsl = #{yqPcclsl},
            </if>
            <if test="yxq != null and yxq != ''">
                yxq = #{yxq},
            </if>
            <if test="sfxl null and sfxl != ''">
                sfxl = #{sfxl},
            </if>
            <if test="sjKlcs null and sjKlcs != ''">
                sj_xlcs = #{sjXlcs},
            </if>
            <if test="sjKssj null and sjKssj != ''">
                sj_kssj = #{sjKssj},
            </if>
            <if test="sjLksj null and sjLksj != ''">
                sj_lksj = #{sjLksj},
            </if>
            <if test="sjTlsc null and sjTlsc != ''">
                sj_tlsc = #{sjTlsc},
            </if>
            <if test="sjPcrysl null and sjPcrysl != ''">
                sj_pcrysl = #{sjPcrysl},
            </if>
            <if test="sjPcclsl null and sjPcclsl != ''">
                sj_pcclsl = #{sjPcclsl},
            </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="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>
