TYztZymlMapper.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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.onemap.spatial.mapper.TYztZymlMapper">
  6. <resultMap type="TYztZyml" id="TYztZymlResult">
  7. <result property="bsm" column="bsm"/>
  8. <result property="name" column="name"/>
  9. <result property="type" column="type"/>
  10. <result property="pbsm" column="pbsm"/>
  11. <result property="icon" column="icon"/>
  12. <result property="url" column="url"/>
  13. <result property="lev" column="lev"/>
  14. <result property="sort" column="sort"/>
  15. <result property="state" column="state"/>
  16. <result property="parent" column="parent"/>
  17. <result property="serverType" column="server_type"/>
  18. <result property="sflssj" column="sflssj"/>
  19. <result property="sfdbfx" column="sfdbfx"/>
  20. <result property="sfjl" column="sfjl"/>
  21. <result property="sfcx" column="sfcx"/>
  22. <result property="sftj" column="sftj"/>
  23. <result property="epsg" column="epsg"/>
  24. <result property="year" column="year"/>
  25. <result property="sjlx" column="sjlx"/>
  26. <result property="sde" column="sde"/>
  27. <result property="gltj" column="gltj"/>
  28. <result property="sjly" column="sjly"/>
  29. <result property="legend" column="legend"/>
  30. <result property="ywlx" column="ywlx"/>
  31. </resultMap>
  32. <sql id="selectTYztZymlVo">
  33. select bsm, name, type, pbsm, icon, url, lev, sort, state, parent, server_type, sflssj, sfdbfx, sfjl, sfcx, sftj, epsg, year, sjlx, sde, gltj, sjly, legend, ywlx from t_yzt_zyml
  34. </sql>
  35. <select id="getDbLayersMSN" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
  36. SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type"
  37. from T_YZT_DB_LAYER t
  38. left join t_yzt_zyml ml
  39. on ml.sde = t.id
  40. where ml.sde is null
  41. </select>
  42. <select id="getDbLayers" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
  43. SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type", t.source as "remark"
  44. from T_YZT_DB_LAYER t
  45. </select>
  46. <select id="getDbLayerName" parameterType="java.lang.String" resultType="java.lang.String">
  47. SELECT t.layeralias
  48. from T_YZT_DB_LAYER t where id = #{dblayer}
  49. </select>
  50. <select id="selectTYztZymlList" parameterType="TYztZyml" resultMap="TYztZymlResult">
  51. <include refid="selectTYztZymlVo"/>
  52. <where>
  53. <if test="bsm != null and bsm != ''">and bsm = #{bsm}</if>
  54. <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
  55. <if test="type != null and type != ''">and type = #{type}</if>
  56. <if test="pbsm != null and pbsm != ''">and pbsm = #{pbsm}</if>
  57. <if test="icon != null and icon != ''">and icon = #{icon}</if>
  58. <if test="url != null and url != ''">and url = #{url}</if>
  59. <if test="lev != null ">and lev = #{lev}</if>
  60. <if test="sort != null ">and sort = #{sort}</if>
  61. <if test="state != null ">and state = #{state}</if>
  62. <if test="parent != null ">and parent = #{parent}</if>
  63. <if test="serverType != null and serverType != ''">and server_type = #{serverType}</if>
  64. <if test="sflssj != null ">and sflssj = #{sflssj}</if>
  65. <if test="sfdbfx != null ">and sfdbfx = #{sfdbfx}</if>
  66. <if test="sfjl != null ">and sfjl = #{sfjl}</if>
  67. <if test="sfcx != null ">and sfcx = #{sfcx}</if>
  68. <if test="sftj != null ">and sftj = #{sftj}</if>
  69. <if test="epsg != null and epsg != ''">and epsg = #{epsg}</if>
  70. <if test="year != null and year != ''">and year = #{year}</if>
  71. <if test="sjlx != null and sjlx != ''">and sjlx = #{sjlx}</if>
  72. <if test="sde != null and sde != ''">and sde = #{sde}</if>
  73. <if test="gltj != null and gltj != ''">and gltj = #{gltj}</if>
  74. <if test="sjly != null and sjly != ''">and sjly = #{sjly}</if>
  75. <if test="legend != null and legend != ''">and legend = #{legend}</if>
  76. <if test="ywlx != null and ywlx != ''">and ywlx = #{ywlx}</if>
  77. </where>
  78. order by sort
  79. </select>
  80. <select id="selectTYztZymlByBsm" parameterType="String" resultMap="TYztZymlResult">
  81. <include refid="selectTYztZymlVo"/>
  82. where bsm = #{bsm}
  83. </select>
  84. <insert id="insertTYztZyml" parameterType="TYztZyml">
  85. insert into t_yzt_zyml
  86. <trim prefix="(" suffix=")" suffixOverrides=",">
  87. <if test="bsm != null and bsm != ''">bsm,</if>
  88. <if test="name != null">name,</if>
  89. <if test="type != null">type,</if>
  90. <if test="pbsm != null">pbsm,</if>
  91. <if test="icon != null">icon,</if>
  92. <if test="url != null">url,</if>
  93. <if test="lev != null">lev,</if>
  94. <if test="sort != null">sort,</if>
  95. <if test="state != null">state,</if>
  96. <if test="parent != null">parent,</if>
  97. <if test="serverType != null">server_type,</if>
  98. <if test="sflssj != null">sflssj,</if>
  99. <if test="sfdbfx != null">sfdbfx,</if>
  100. <if test="sfjl != null">sfjl,</if>
  101. <if test="sfcx != null">sfcx,</if>
  102. <if test="sftj != null">sftj,</if>
  103. <if test="epsg != null">epsg,</if>
  104. <if test="year != null">year,</if>
  105. <if test="sjlx != null">sjlx,</if>
  106. <if test="sde != null">sde,</if>
  107. <if test="gltj != null">gltj,</if>
  108. <if test="sjly != null">sjly,</if>
  109. <if test="legend != null">legend,</if>
  110. <if test="ywlx != null">ywlx,</if>
  111. </trim>
  112. <trim prefix="values (" suffix=")" suffixOverrides=",">
  113. <if test="bsm != null and bsm != ''">#{bsm},</if>
  114. <if test="name != null">#{name},</if>
  115. <if test="type != null">#{type},</if>
  116. <if test="pbsm != null">#{pbsm},</if>
  117. <if test="icon != null">#{icon},</if>
  118. <if test="url != null">#{url},</if>
  119. <if test="lev != null">#{lev},</if>
  120. <if test="sort != null">#{sort},</if>
  121. <if test="state != null">#{state},</if>
  122. <if test="parent != null">#{parent},</if>
  123. <if test="serverType != null">#{serverType},</if>
  124. <if test="sflssj != null">#{sflssj},</if>
  125. <if test="sfdbfx != null">#{sfdbfx},</if>
  126. <if test="sfjl != null">#{sfjl},</if>
  127. <if test="sfcx != null">#{sfcx},</if>
  128. <if test="sftj != null">#{sftj},</if>
  129. <if test="epsg != null">#{epsg},</if>
  130. <if test="year != null">#{year},</if>
  131. <if test="sjlx != null">#{sjlx},</if>
  132. <if test="sde != null">#{sde},</if>
  133. <if test="gltj != null">#{gltj},</if>
  134. <if test="sjly != null">#{sjly},</if>
  135. <if test="legend != null">#{legend},</if>
  136. <if test="ywlx != null">#{ywlx},</if>
  137. </trim>
  138. </insert>
  139. <update id="updateTYztZyml" parameterType="TYztZyml">
  140. update t_yzt_zyml
  141. <trim prefix="SET" suffixOverrides=",">
  142. <if test="name != null">name = #{name},</if>
  143. <if test="type != null">type = #{type},</if>
  144. <if test="pbsm != null">pbsm = #{pbsm},</if>
  145. <if test="icon != null">icon = #{icon},</if>
  146. <if test="url != null">url = #{url},</if>
  147. <if test="lev != null">lev = #{lev},</if>
  148. <if test="sort != null">sort = #{sort},</if>
  149. <if test="state != null">state = #{state},</if>
  150. <if test="parent != null">parent = #{parent},</if>
  151. <if test="serverType != null">server_type = #{serverType},</if>
  152. <if test="sflssj != null">sflssj = #{sflssj},</if>
  153. <if test="sfdbfx != null">sfdbfx = #{sfdbfx},</if>
  154. <if test="sfjl != null">sfjl = #{sfjl},</if>
  155. <if test="sfcx != null">sfcx = #{sfcx},</if>
  156. <if test="sftj != null">sftj = #{sftj},</if>
  157. <if test="epsg != null">epsg = #{epsg},</if>
  158. <if test="year != null">year = #{year},</if>
  159. <if test="sjlx != null">sjlx = #{sjlx},</if>
  160. <if test="sde != null">sde = #{sde},</if>
  161. <if test="gltj != null">gltj = #{gltj},</if>
  162. <if test="sjly != null">sjly = #{sjly},</if>
  163. <if test="legend != null">legend = #{legend},</if>
  164. <if test="ywlx != null">ywlx = #{ywlx},</if>
  165. </trim>
  166. where bsm = #{bsm}
  167. </update>
  168. <delete id="deleteTYztZymlByBsm" parameterType="String">
  169. delete from t_yzt_zyml where bsm = #{bsm}
  170. </delete>
  171. <delete id="deleteTYztZymlByBsms" parameterType="String">
  172. delete from t_yzt_zyml where bsm in
  173. <foreach item="bsm" collection="array" open="(" separator="," close=")">
  174. #{bsm}
  175. </foreach>
  176. </delete>
  177. </mapper>