| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?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.ruoyi.system.mapper.CesiumMapConfigMapper">
- <resultMap type="com.ruoyi.system.domain.CesiumMapConfig" id="CesiumMapConfigResult">
- <result property="configId" column="config_id" />
- <result property="userId" column="user_id" />
- <result property="configName" column="config_name" />
- <result property="baseLayerType" column="base_layer_type" />
- <result property="baseLayerName" column="base_layer_name" />
- <result property="baseLayerUrl" column="base_layer_url" />
- <result property="terrainLayerType" column="terrain_layer_type" />
- <result property="terrainLayerName" column="terrain_layer_name" />
- <result property="terrainLayerUrl" column="terrain_layer_url" />
- <result property="webServices" column="web_services" />
- <result property="loadedModels" column="loaded_models" />
- <result property="loadedCustomServices" column="loaded_custom_services" />
- <result property="isDefault" column="is_default" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectCesiumMapConfigVo">
- select config_id, user_id, config_name, base_layer_type, base_layer_name, base_layer_url,
- terrain_layer_type, terrain_layer_name, terrain_layer_url, web_services, loaded_models, loaded_custom_services,
- is_default, create_by, create_time, update_by, update_time, remark
- from cesium_map_config
- </sql>
- <select id="selectCesiumMapConfigByConfigId" parameterType="Long" resultMap="CesiumMapConfigResult">
- <include refid="selectCesiumMapConfigVo"/>
- where config_id = #{configId}
- </select>
- <select id="selectCesiumMapConfigList" parameterType="com.ruoyi.system.domain.CesiumMapConfig" resultMap="CesiumMapConfigResult">
- <include refid="selectCesiumMapConfigVo"/>
- <where>
- <if test="userId != null"> and user_id = #{userId}</if>
- <if test="configName != null and configName != ''"> and config_name like concat('%', #{configName}, '%')</if>
- <if test="baseLayerType != null and baseLayerType != ''"> and base_layer_type = #{baseLayerType}</if>
- <if test="baseLayerName != null and baseLayerName != ''"> and base_layer_name like concat('%', #{baseLayerName}, '%')</if>
- <if test="terrainLayerType != null and terrainLayerType != ''"> and terrain_layer_type = #{terrainLayerType}</if>
- <if test="terrainLayerName != null and terrainLayerName != ''"> and terrain_layer_name like concat('%', #{terrainLayerName}, '%')</if>
- <if test="isDefault != null"> and is_default = #{isDefault}</if>
- </where>
- order by create_time desc
- </select>
- <select id="selectDefaultConfigByUserId" parameterType="Long" resultMap="CesiumMapConfigResult">
- <include refid="selectCesiumMapConfigVo"/>
- where user_id = #{userId} and is_default = 1
- order by update_time desc
- limit 1
- </select>
- <insert id="insertCesiumMapConfig" parameterType="com.ruoyi.system.domain.CesiumMapConfig" useGeneratedKeys="true" keyProperty="configId">
- insert into cesium_map_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="userId != null">user_id,</if>
- <if test="configName != null and configName != ''">config_name,</if>
- <if test="baseLayerType != null and baseLayerType != ''">base_layer_type,</if>
- <if test="baseLayerName != null and baseLayerName != ''">base_layer_name,</if>
- <if test="baseLayerUrl != null and baseLayerUrl != ''">base_layer_url,</if>
- <if test="terrainLayerType != null and terrainLayerType != ''">terrain_layer_type,</if>
- <if test="terrainLayerName != null and terrainLayerName != ''">terrain_layer_name,</if>
- <if test="terrainLayerUrl != null and terrainLayerUrl != ''">terrain_layer_url,</if>
- <if test="webServices != null and webServices != ''">web_services,</if>
- <if test="loadedModels != null and loadedModels != ''">loaded_models,</if>
- <if test="loadedCustomServices != null and loadedCustomServices != ''">loaded_custom_services,</if>
- <if test="isDefault != null">is_default,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null and updateBy != ''">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null and remark != ''">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="userId != null">#{userId},</if>
- <if test="configName != null and configName != ''">#{configName},</if>
- <if test="baseLayerType != null and baseLayerType != ''">#{baseLayerType},</if>
- <if test="baseLayerName != null and baseLayerName != ''">#{baseLayerName},</if>
- <if test="baseLayerUrl != null and baseLayerUrl != ''">#{baseLayerUrl},</if>
- <if test="terrainLayerType != null and terrainLayerType != ''">#{terrainLayerType},</if>
- <if test="terrainLayerName != null and terrainLayerName != ''">#{terrainLayerName},</if>
- <if test="terrainLayerUrl != null and terrainLayerUrl != ''">#{terrainLayerUrl},</if>
- <if test="webServices != null and webServices != ''">#{webServices},</if>
- <if test="loadedModels != null and loadedModels != ''">#{loadedModels},</if>
- <if test="loadedCustomServices != null and loadedCustomServices != ''">#{loadedCustomServices},</if>
- <if test="isDefault != null">#{isDefault},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- </trim>
- </insert>
- <update id="updateCesiumMapConfig" parameterType="com.ruoyi.system.domain.CesiumMapConfig">
- update cesium_map_config
- <trim prefix="SET" suffixOverrides=",">
- <if test="userId != null">user_id = #{userId},</if>
- <if test="configName != null">config_name = #{configName},</if>
- <if test="baseLayerType != null">base_layer_type = #{baseLayerType},</if>
- <if test="baseLayerName != null">base_layer_name = #{baseLayerName},</if>
- <if test="baseLayerUrl != null">base_layer_url = #{baseLayerUrl},</if>
- <if test="terrainLayerType != null">terrain_layer_type = #{terrainLayerType},</if>
- <if test="terrainLayerType == null">terrain_layer_type = NULL,</if>
- <if test="terrainLayerName != null">terrain_layer_name = #{terrainLayerName},</if>
- <if test="terrainLayerName == null">terrain_layer_name = NULL,</if>
- <if test="terrainLayerUrl != null">terrain_layer_url = #{terrainLayerUrl},</if>
- <if test="terrainLayerUrl == null">terrain_layer_url = NULL,</if>
- <if test="webServices != null">web_services = #{webServices},</if>
- <if test="loadedModels != null">loaded_models = #{loadedModels},</if>
- <if test="loadedCustomServices != null">loaded_custom_services = #{loadedCustomServices},</if>
- <if test="isDefault != null">is_default = #{isDefault},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where config_id = #{configId}
- </update>
- <delete id="deleteCesiumMapConfigByConfigId" parameterType="Long">
- delete from cesium_map_config where config_id = #{configId}
- </delete>
- <delete id="deleteCesiumMapConfigByConfigIds" parameterType="String">
- delete from cesium_map_config where config_id in
- <foreach item="configId" collection="array" open="(" separator="," close=")">
- #{configId}
- </foreach>
- </delete>
- </mapper>
|