|
- <?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.ruoyi.business.mapper.TGisXjxzqMapper">
-
- <resultMap type="TGisXjxzq" id="TGisXjxzqResult">
- <result property="xzqdm" column="xzqdm" />
- <result property="xzqmc" column="xzqmc" />
- <result property="bsm" column="bsm" />
- <result property="ysdm" column="ysdm" />
- <result property="theGeom" column="the_geom" />
- <result property="importCode" column="import_code" />
- <result property="fid" column="fid" />
- </resultMap>
-
- <sql id="selectTGisXjxzqVo">
- select xzqdm, xzqmc, bsm, ysdm, the_geom, import_code, fid from t_gis_xjxzq
- </sql>
-
- <select id="selectTGisXjxzqList" parameterType="TGisXjxzq" resultMap="TGisXjxzqResult">
- <include refid="selectTGisXjxzqVo"/>
- <where>
- <if test="xzqdm != null and xzqdm != ''"> and xzqdm = #{xzqdm}</if>
- <if test="xzqmc != null and xzqmc != ''"> and xzqmc = #{xzqmc}</if>
- <if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%') </if>
- </where>
- </select>
-
- <select id="selectTGisXjxzqByFid" parameterType="Long" resultMap="TGisXjxzqResult">
- <include refid="selectTGisXjxzqVo"/>
- where fid = #{fid}
- </select>
-
- <insert id="insertTGisXjxzq" parameterType="TGisXjxzq" useGeneratedKeys="true" keyProperty="fid">
- insert into t_gis_xjxzq
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="xzqdm != null and xzqdm != ''">xzqdm,</if>
- <if test="xzqmc != null and xzqmc != ''">xzqmc,</if>
- <if test="bsm != null">bsm,</if>
- <if test="ysdm != null">ysdm,</if>
- <if test="theGeom != null">the_geom,</if>
- <if test="importCode != null and importCode != ''">import_code,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="xzqdm != null and xzqdm != ''">#{xzqdm},</if>
- <if test="xzqmc != null and xzqmc != ''">#{xzqmc},</if>
- <if test="bsm != null">#{bsm},</if>
- <if test="ysdm != null">#{ysdm},</if>
- <if test="theGeom != null">#{theGeom},</if>
- <if test="importCode != null and importCode != ''">#{importCode},</if>
- </trim>
- </insert>
-
- <insert id="insertTGisXjxzqBatch" parameterType="list" useGeneratedKeys="true" keyProperty="fid">
- insert into t_gis_xjxzq
- <trim prefix="(" suffix=")" suffixOverrides=",">
- xzqdm,
- xzqmc,
- bsm,
- ysdm,
- the_geom,
- import_code,
- </trim>
- values
- <foreach item="item" collection="list" separator="," >
- <trim prefix="(" suffix=")" suffixOverrides=",">
- #{item.xzqdm},
- #{item.xzqmc},
- #{item.bsm},
- #{item.ysdm},
- #{item.theGeom},
- #{item.importCode},
- </trim>
- </foreach>
- </insert>
-
- <update id="updateTGisXjxzq" parameterType="TGisXjxzq">
- update t_gis_xjxzq
- <trim prefix="SET" suffixOverrides=",">
- <if test="xzqdm != null and xzqdm != ''">xzqdm = #{xzqdm},</if>
- <if test="xzqmc != null and xzqmc != ''">xzqmc = #{xzqmc},</if>
- <if test="bsm != null">bsm = #{bsm},</if>
- <if test="ysdm != null">ysdm = #{ysdm},</if>
- <if test="theGeom != null">the_geom = #{theGeom},</if>
- <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
- </trim>
- where fid = #{fid}
- </update>
-
- <!--批量更新-->
- <update id="updateTGisXjxzqBatch" parameterType="list" >
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update t_gis_xjxzq
- <set>
- <if test="item.xzqdm != null and item.xzqdm != ''">xzqdm = #{item.xzqdm},</if>
- <if test="item.xzqmc != null and item.xzqmc != ''">xzqmc = #{item.xzqmc},</if>
- <if test="item.bsm != null">bsm = #{item.bsm},</if>
- <if test="item.ysdm != null">ysdm = #{item.ysdm},</if>
- <if test="item.theGeom != null">the_geom = #{item.theGeom},</if>
- <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
- </set>
- where fid = #{item.fid}
- </foreach>
- </update>
-
- <delete id="deleteTGisXjxzqByFid" parameterType="Long">
- delete from t_gis_xjxzq where fid = #{fid}
- </delete>
-
- <delete id="deleteTGisXjxzqByFids" parameterType="String">
- delete from t_gis_xjxzq where fid in
- <foreach item="fid" collection="array" open="(" separator="," close=")">
- #{fid}
- </foreach>
- </delete>
- </mapper>
|