java后端
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

121 Zeilen
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.TGisXjqyMapper">
  6. <resultMap type="TGisXjqy" id="TGisXjqyResult">
  7. <result property="XJQYDM" column="XJQYDM" />
  8. <result property="XJQYMC" column="XJQYMC" />
  9. <result property="theGeom" column="the_geom" />
  10. <result property="BSM" column="BSM" />
  11. <result property="YSDM" column="YSDM" />
  12. <result property="fid" column="fid" />
  13. <result property="importCode" column="import_code" />
  14. </resultMap>
  15. <sql id="selectTGisXjqyVo">
  16. select XJQYDM, XJQYMC, the_geom, BSM, YSDM, fid, import_code from t_gis_xjqy
  17. </sql>
  18. <select id="selectTGisXjqyList" parameterType="TGisXjqy" resultMap="TGisXjqyResult">
  19. <include refid="selectTGisXjqyVo"/>
  20. <where>
  21. <if test="XJQYDM != null and XJQYDM != ''"> and XJQYDM = #{XJQYDM}</if>
  22. <if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if>
  23. </where>
  24. </select>
  25. <select id="selectTGisXjqyByXJQYDM" parameterType="String" resultMap="TGisXjqyResult">
  26. <include refid="selectTGisXjqyVo"/>
  27. where XJQYDM = #{XJQYDM}
  28. </select>
  29. <insert id="insertTGisXjqy" parameterType="TGisXjqy">
  30. insert into t_gis_xjqy
  31. <trim prefix="(" suffix=")" suffixOverrides=",">
  32. <if test="XJQYDM != null">XJQYDM,</if>
  33. <if test="XJQYMC != null and XJQYMC != ''">XJQYMC,</if>
  34. <if test="theGeom != null and theGeom != ''">the_geom,</if>
  35. <if test="BSM != null">BSM,</if>
  36. <if test="YSDM != null">YSDM,</if>
  37. <if test="fid != null">fid,</if>
  38. <if test="importCode != null and importCode != ''">import_code,</if>
  39. </trim>
  40. <trim prefix="values (" suffix=")" suffixOverrides=",">
  41. <if test="XJQYDM != null">#{XJQYDM},</if>
  42. <if test="XJQYMC != null and XJQYMC != ''">#{XJQYMC},</if>
  43. <if test="theGeom != null and theGeom != ''">#{theGeom},</if>
  44. <if test="BSM != null">#{BSM},</if>
  45. <if test="YSDM != null">#{YSDM},</if>
  46. <if test="fid != null">#{fid},</if>
  47. <if test="importCode != null and importCode != ''">#{importCode},</if>
  48. </trim>
  49. </insert>
  50. <insert id="insertTGisXjqyBatch" parameterType="list" >
  51. insert into t_gis_xjqy
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. XJQYDM,
  54. XJQYMC,
  55. the_geom,
  56. BSM,
  57. YSDM,
  58. fid,
  59. import_code,
  60. </trim>
  61. values
  62. <foreach item="item" collection="list" separator="," >
  63. <trim prefix="(" suffix=")" suffixOverrides=",">
  64. #{item.XJQYDM},
  65. #{item.XJQYMC},
  66. #{item.theGeom},
  67. #{item.BSM},
  68. #{item.YSDM},
  69. #{item.fid},
  70. #{item.importCode},
  71. </trim>
  72. </foreach>
  73. </insert>
  74. <update id="updateTGisXjqy" parameterType="TGisXjqy">
  75. update t_gis_xjqy
  76. <trim prefix="SET" suffixOverrides=",">
  77. <if test="XJQYMC != null and XJQYMC != ''">XJQYMC = #{XJQYMC},</if>
  78. <if test="theGeom != null and theGeom != ''">the_geom = #{theGeom},</if>
  79. <if test="BSM != null">BSM = #{BSM},</if>
  80. <if test="YSDM != null">YSDM = #{YSDM},</if>
  81. <if test="fid != null">fid = #{fid},</if>
  82. <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
  83. </trim>
  84. where XJQYDM = #{XJQYDM}
  85. </update>
  86. <!--批量更新-->
  87. <update id="updateTGisXjqyBatch" parameterType="list" >
  88. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  89. update t_gis_xjqy
  90. <set>
  91. <if test="item.XJQYMC != null and item.XJQYMC != ''">XJQYMC = #{item.XJQYMC},</if>
  92. <if test="item.theGeom != null and item.theGeom != ''">the_geom = #{item.theGeom},</if>
  93. <if test="item.BSM != null">BSM = #{item.BSM},</if>
  94. <if test="item.YSDM != null">YSDM = #{item.YSDM},</if>
  95. <if test="item.fid != null">fid = #{item.fid},</if>
  96. <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
  97. </set>
  98. where XJQYDM = #{item.XJQYDM}
  99. </foreach>
  100. </update>
  101. <delete id="deleteTGisXjqyByXJQYDM" parameterType="String">
  102. delete from t_gis_xjqy where XJQYDM = #{XJQYDM}
  103. </delete>
  104. <delete id="deleteTGisXjqyByXJQYDMs" parameterType="String">
  105. delete from t_gis_xjqy where XJQYDM in
  106. <foreach item="XJQYDM" collection="array" open="(" separator="," close=")">
  107. #{XJQYDM}
  108. </foreach>
  109. </delete>
  110. </mapper>