| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?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.onemap.spatial.mapper.TYztZymlMapper">
- <resultMap type="TYztZyml" id="TYztZymlResult">
- <result property="bsm" column="bsm"/>
- <result property="name" column="name"/>
- <result property="type" column="type"/>
- <result property="pbsm" column="pbsm"/>
- <result property="icon" column="icon"/>
- <result property="url" column="url"/>
- <result property="lev" column="lev"/>
- <result property="sort" column="sort"/>
- <result property="state" column="state"/>
- <result property="parent" column="parent"/>
- <result property="serverType" column="server_type"/>
- <result property="sflssj" column="sflssj"/>
- <result property="sfdbfx" column="sfdbfx"/>
- <result property="sfjl" column="sfjl"/>
- <result property="sfcx" column="sfcx"/>
- <result property="sftj" column="sftj"/>
- <result property="epsg" column="epsg"/>
- <result property="year" column="year"/>
- <result property="sjlx" column="sjlx"/>
- <result property="sde" column="sde"/>
- <result property="gltj" column="gltj"/>
- <result property="sjly" column="sjly"/>
- <result property="legend" column="legend"/>
- <result property="ywlx" column="ywlx"/>
- </resultMap>
- <sql id="selectTYztZymlVo">
- 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
- </sql>
- <select id="getDbLayersMSN" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
- SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type"
- from T_YZT_DB_LAYER t
- left join t_yzt_zyml ml
- on ml.sde = t.id
- where ml.sde is null
- </select>
- <select id="getDbLayers" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
- SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type", t.source as "remark"
- from T_YZT_DB_LAYER t
- </select>
- <select id="getDbLayerName" parameterType="java.lang.String" resultType="java.lang.String">
- SELECT t.layeralias
- from T_YZT_DB_LAYER t where id = #{dblayer}
- </select>
- <select id="selectTYztZymlList" parameterType="TYztZyml" resultMap="TYztZymlResult">
- <include refid="selectTYztZymlVo"/>
- <where>
- <if test="bsm != null and bsm != ''">and bsm = #{bsm}</if>
- <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
- <if test="type != null and type != ''">and type = #{type}</if>
- <if test="pbsm != null and pbsm != ''">and pbsm = #{pbsm}</if>
- <if test="icon != null and icon != ''">and icon = #{icon}</if>
- <if test="url != null and url != ''">and url = #{url}</if>
- <if test="lev != null ">and lev = #{lev}</if>
- <if test="sort != null ">and sort = #{sort}</if>
- <if test="state != null ">and state = #{state}</if>
- <if test="parent != null ">and parent = #{parent}</if>
- <if test="serverType != null and serverType != ''">and server_type = #{serverType}</if>
- <if test="sflssj != null ">and sflssj = #{sflssj}</if>
- <if test="sfdbfx != null ">and sfdbfx = #{sfdbfx}</if>
- <if test="sfjl != null ">and sfjl = #{sfjl}</if>
- <if test="sfcx != null ">and sfcx = #{sfcx}</if>
- <if test="sftj != null ">and sftj = #{sftj}</if>
- <if test="epsg != null and epsg != ''">and epsg = #{epsg}</if>
- <if test="year != null and year != ''">and year = #{year}</if>
- <if test="sjlx != null and sjlx != ''">and sjlx = #{sjlx}</if>
- <if test="sde != null and sde != ''">and sde = #{sde}</if>
- <if test="gltj != null and gltj != ''">and gltj = #{gltj}</if>
- <if test="sjly != null and sjly != ''">and sjly = #{sjly}</if>
- <if test="legend != null and legend != ''">and legend = #{legend}</if>
- <if test="ywlx != null and ywlx != ''">and ywlx = #{ywlx}</if>
- </where>
- order by sort
- </select>
- <select id="selectTYztZymlByBsm" parameterType="String" resultMap="TYztZymlResult">
- <include refid="selectTYztZymlVo"/>
- where bsm = #{bsm}
- </select>
- <insert id="insertTYztZyml" parameterType="TYztZyml">
- insert into t_yzt_zyml
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="bsm != null and bsm != ''">bsm,</if>
- <if test="name != null">name,</if>
- <if test="type != null">type,</if>
- <if test="pbsm != null">pbsm,</if>
- <if test="icon != null">icon,</if>
- <if test="url != null">url,</if>
- <if test="lev != null">lev,</if>
- <if test="sort != null">sort,</if>
- <if test="state != null">state,</if>
- <if test="parent != null">parent,</if>
- <if test="serverType != null">server_type,</if>
- <if test="sflssj != null">sflssj,</if>
- <if test="sfdbfx != null">sfdbfx,</if>
- <if test="sfjl != null">sfjl,</if>
- <if test="sfcx != null">sfcx,</if>
- <if test="sftj != null">sftj,</if>
- <if test="epsg != null">epsg,</if>
- <if test="year != null">year,</if>
- <if test="sjlx != null">sjlx,</if>
- <if test="sde != null">sde,</if>
- <if test="gltj != null">gltj,</if>
- <if test="sjly != null">sjly,</if>
- <if test="legend != null">legend,</if>
- <if test="ywlx != null">ywlx,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="bsm != null and bsm != ''">#{bsm},</if>
- <if test="name != null">#{name},</if>
- <if test="type != null">#{type},</if>
- <if test="pbsm != null">#{pbsm},</if>
- <if test="icon != null">#{icon},</if>
- <if test="url != null">#{url},</if>
- <if test="lev != null">#{lev},</if>
- <if test="sort != null">#{sort},</if>
- <if test="state != null">#{state},</if>
- <if test="parent != null">#{parent},</if>
- <if test="serverType != null">#{serverType},</if>
- <if test="sflssj != null">#{sflssj},</if>
- <if test="sfdbfx != null">#{sfdbfx},</if>
- <if test="sfjl != null">#{sfjl},</if>
- <if test="sfcx != null">#{sfcx},</if>
- <if test="sftj != null">#{sftj},</if>
- <if test="epsg != null">#{epsg},</if>
- <if test="year != null">#{year},</if>
- <if test="sjlx != null">#{sjlx},</if>
- <if test="sde != null">#{sde},</if>
- <if test="gltj != null">#{gltj},</if>
- <if test="sjly != null">#{sjly},</if>
- <if test="legend != null">#{legend},</if>
- <if test="ywlx != null">#{ywlx},</if>
- </trim>
- </insert>
- <update id="updateTYztZyml" parameterType="TYztZyml">
- update t_yzt_zyml
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="type != null">type = #{type},</if>
- <if test="pbsm != null">pbsm = #{pbsm},</if>
- <if test="icon != null">icon = #{icon},</if>
- <if test="url != null">url = #{url},</if>
- <if test="lev != null">lev = #{lev},</if>
- <if test="sort != null">sort = #{sort},</if>
- <if test="state != null">state = #{state},</if>
- <if test="parent != null">parent = #{parent},</if>
- <if test="serverType != null">server_type = #{serverType},</if>
- <if test="sflssj != null">sflssj = #{sflssj},</if>
- <if test="sfdbfx != null">sfdbfx = #{sfdbfx},</if>
- <if test="sfjl != null">sfjl = #{sfjl},</if>
- <if test="sfcx != null">sfcx = #{sfcx},</if>
- <if test="sftj != null">sftj = #{sftj},</if>
- <if test="epsg != null">epsg = #{epsg},</if>
- <if test="year != null">year = #{year},</if>
- <if test="sjlx != null">sjlx = #{sjlx},</if>
- <if test="sde != null">sde = #{sde},</if>
- <if test="gltj != null">gltj = #{gltj},</if>
- <if test="sjly != null">sjly = #{sjly},</if>
- <if test="legend != null">legend = #{legend},</if>
- <if test="ywlx != null">ywlx = #{ywlx},</if>
- </trim>
- where bsm = #{bsm}
- </update>
- <delete id="deleteTYztZymlByBsm" parameterType="String">
- delete from t_yzt_zyml where bsm = #{bsm}
- </delete>
- <delete id="deleteTYztZymlByBsms" parameterType="String">
- delete from t_yzt_zyml where bsm in
- <foreach item="bsm" collection="array" open="(" separator="," close=")">
- #{bsm}
- </foreach>
- </delete>
- </mapper>
|