java后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

118 regels
4.9 KiB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.business.mapper.TGisXjxzqMapper">
  6. <resultMap type="TGisXjxzq" id="TGisXjxzqResult">
  7. <result property="xzqdm" column="xzqdm" />
  8. <result property="xzqmc" column="xzqmc" />
  9. <result property="bsm" column="bsm" />
  10. <result property="ysdm" column="ysdm" />
  11. <result property="theGeom" column="the_geom" />
  12. <result property="importCode" column="import_code" />
  13. <result property="fid" column="fid" />
  14. </resultMap>
  15. <sql id="selectTGisXjxzqVo">
  16. select xzqdm, xzqmc, bsm, ysdm, the_geom, import_code, fid from t_gis_xjxzq
  17. </sql>
  18. <select id="selectTGisXjxzqList" parameterType="TGisXjxzq" resultMap="TGisXjxzqResult">
  19. <include refid="selectTGisXjxzqVo"/>
  20. <where>
  21. <if test="xzqdm != null and xzqdm != ''"> and xzqdm = #{xzqdm}</if>
  22. <if test="xzqmc != null and xzqmc != ''"> and xzqmc = #{xzqmc}</if>
  23. <if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%') </if>
  24. </where>
  25. </select>
  26. <select id="selectTGisXjxzqByFid" parameterType="Long" resultMap="TGisXjxzqResult">
  27. <include refid="selectTGisXjxzqVo"/>
  28. where fid = #{fid}
  29. </select>
  30. <insert id="insertTGisXjxzq" parameterType="TGisXjxzq" useGeneratedKeys="true" keyProperty="fid">
  31. insert into t_gis_xjxzq
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="xzqdm != null and xzqdm != ''">xzqdm,</if>
  34. <if test="xzqmc != null and xzqmc != ''">xzqmc,</if>
  35. <if test="bsm != null">bsm,</if>
  36. <if test="ysdm != null">ysdm,</if>
  37. <if test="theGeom != null">the_geom,</if>
  38. <if test="importCode != null and importCode != ''">import_code,</if>
  39. </trim>
  40. <trim prefix="values (" suffix=")" suffixOverrides=",">
  41. <if test="xzqdm != null and xzqdm != ''">#{xzqdm},</if>
  42. <if test="xzqmc != null and xzqmc != ''">#{xzqmc},</if>
  43. <if test="bsm != null">#{bsm},</if>
  44. <if test="ysdm != null">#{ysdm},</if>
  45. <if test="theGeom != null">#{theGeom},</if>
  46. <if test="importCode != null and importCode != ''">#{importCode},</if>
  47. </trim>
  48. </insert>
  49. <insert id="insertTGisXjxzqBatch" parameterType="list" useGeneratedKeys="true" keyProperty="fid">
  50. insert into t_gis_xjxzq
  51. <trim prefix="(" suffix=")" suffixOverrides=",">
  52. xzqdm,
  53. xzqmc,
  54. bsm,
  55. ysdm,
  56. the_geom,
  57. import_code,
  58. </trim>
  59. values
  60. <foreach item="item" collection="list" separator="," >
  61. <trim prefix="(" suffix=")" suffixOverrides=",">
  62. #{item.xzqdm},
  63. #{item.xzqmc},
  64. #{item.bsm},
  65. #{item.ysdm},
  66. #{item.theGeom},
  67. #{item.importCode},
  68. </trim>
  69. </foreach>
  70. </insert>
  71. <update id="updateTGisXjxzq" parameterType="TGisXjxzq">
  72. update t_gis_xjxzq
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="xzqdm != null and xzqdm != ''">xzqdm = #{xzqdm},</if>
  75. <if test="xzqmc != null and xzqmc != ''">xzqmc = #{xzqmc},</if>
  76. <if test="bsm != null">bsm = #{bsm},</if>
  77. <if test="ysdm != null">ysdm = #{ysdm},</if>
  78. <if test="theGeom != null">the_geom = #{theGeom},</if>
  79. <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
  80. </trim>
  81. where fid = #{fid}
  82. </update>
  83. <!--批量更新-->
  84. <update id="updateTGisXjxzqBatch" parameterType="list" >
  85. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  86. update t_gis_xjxzq
  87. <set>
  88. <if test="item.xzqdm != null and item.xzqdm != ''">xzqdm = #{item.xzqdm},</if>
  89. <if test="item.xzqmc != null and item.xzqmc != ''">xzqmc = #{item.xzqmc},</if>
  90. <if test="item.bsm != null">bsm = #{item.bsm},</if>
  91. <if test="item.ysdm != null">ysdm = #{item.ysdm},</if>
  92. <if test="item.theGeom != null">the_geom = #{item.theGeom},</if>
  93. <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
  94. </set>
  95. where fid = #{item.fid}
  96. </foreach>
  97. </update>
  98. <delete id="deleteTGisXjxzqByFid" parameterType="Long">
  99. delete from t_gis_xjxzq where fid = #{fid}
  100. </delete>
  101. <delete id="deleteTGisXjxzqByFids" parameterType="String">
  102. delete from t_gis_xjxzq where fid in
  103. <foreach item="fid" collection="array" open="(" separator="," close=")">
  104. #{fid}
  105. </foreach>
  106. </delete>
  107. </mapper>