CesiumGeojsonMapper.xml 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.system.mapper.CesiumGeojsonMapper">
  6. <resultMap type="com.ruoyi.system.domain.CesiumGeojson" id="CesiumGeojsonResult">
  7. <result property="id" column="id" />
  8. <result property="userId" column="user_id" />
  9. <result property="layerName" column="layer_name" />
  10. <result property="fileName" column="file_name" />
  11. <result property="geojsonUrl" column="geojson_url" />
  12. <result property="originalData" column="original_data" />
  13. <result property="createBy" column="create_by" />
  14. <result property="createTime" column="create_time" />
  15. <result property="updateBy" column="update_by" />
  16. <result property="updateTime" column="update_time" />
  17. <result property="remark" column="remark" />
  18. </resultMap>
  19. <sql id="selectCesiumGeojsonVo">
  20. select id, user_id, layer_name, file_name, geojson_url, original_data,
  21. create_by, create_time, update_by, update_time, remark
  22. from cesium_geojson
  23. </sql>
  24. <select id="selectCesiumGeojsonById" parameterType="Long" resultMap="CesiumGeojsonResult">
  25. <include refid="selectCesiumGeojsonVo"/>
  26. where id = #{id}
  27. </select>
  28. <select id="selectCesiumGeojsonList" parameterType="com.ruoyi.system.domain.CesiumGeojson" resultMap="CesiumGeojsonResult">
  29. <include refid="selectCesiumGeojsonVo"/>
  30. <where>
  31. <if test="userId != null"> and user_id = #{userId}</if>
  32. <if test="layerName != null and layerName != ''"> and layer_name like concat('%', #{layerName}, '%')</if>
  33. <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
  34. </where>
  35. order by create_time desc
  36. </select>
  37. <insert id="insertCesiumGeojson" parameterType="com.ruoyi.system.domain.CesiumGeojson" useGeneratedKeys="true" keyProperty="id">
  38. insert into cesium_geojson
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="userId != null">user_id,</if>
  41. <if test="layerName != null and layerName != ''">layer_name,</if>
  42. <if test="fileName != null and fileName != ''">file_name,</if>
  43. <if test="geojsonUrl != null and geojsonUrl != ''">geojson_url,</if>
  44. <if test="originalData != null">original_data,</if>
  45. <if test="createBy != null and createBy != ''">create_by,</if>
  46. <if test="createTime != null">create_time,</if>
  47. <if test="updateBy != null and updateBy != ''">update_by,</if>
  48. <if test="updateTime != null">update_time,</if>
  49. <if test="remark != null and remark != ''">remark,</if>
  50. </trim>
  51. <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
  52. <if test="userId != null">#{userId},</if>
  53. <if test="layerName != null and layerName != ''">#{layerName},</if>
  54. <if test="fileName != null and fileName != ''">#{fileName},</if>
  55. <if test="geojsonUrl != null and geojsonUrl != ''">#{geojsonUrl},</if>
  56. <if test="originalData != null">#{originalData},</if>
  57. <if test="createBy != null and createBy != ''">#{createBy},</if>
  58. <if test="createTime != null">#{createTime},</if>
  59. <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
  60. <if test="updateTime != null">#{updateTime},</if>
  61. <if test="remark != null and remark != ''">#{remark},</if>
  62. </trim>
  63. </insert>
  64. <update id="updateCesiumGeojson" parameterType="com.ruoyi.system.domain.CesiumGeojson">
  65. update cesium_geojson
  66. <trim prefix="SET" suffixOverrides=",">
  67. <if test="layerName != null and layerName != ''">layer_name = #{layerName},</if>
  68. <if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
  69. <if test="geojsonUrl != null and geojsonUrl != ''">geojson_url = #{geojsonUrl},</if>
  70. <if test="originalData != null">original_data = #{originalData},</if>
  71. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  72. <if test="updateTime != null">update_time = #{updateTime},</if>
  73. <if test="remark != null and remark != ''">remark = #{remark},</if>
  74. </trim>
  75. where id = #{id}
  76. </update>
  77. <delete id="deleteCesiumGeojsonById" parameterType="Long">
  78. delete from cesium_geojson where id = #{id}
  79. </delete>
  80. <delete id="deleteCesiumGeojsonByIds" parameterType="Long">
  81. delete from cesium_geojson where id in
  82. <foreach item="id" collection="array" open="(" separator="," close=")">
  83. #{id}
  84. </foreach>
  85. </delete>
  86. </mapper>