123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?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.business.slfh.manager.observationtowermanager.mapper.TResObservationtowerMapper">
-
- <resultMap type="TResObservationtower" id="TResObservationtowerResult">
- <result property="id" column="id" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- <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="name" column="name" />
- <result property="height" column="height" />
- <result property="longitude" column="longitude" />
- <result property="latitude" column="latitude" />
- <result property="image" column="image" />
- <result property="radius" column="radius" />
- <result property="size" column="size" />
- <result property="volume" column="volume" />
- <result property="supermapId" column="supermap_id" />
- <result property="deptId" column="dept_id" />
- <result property="deptName" column="dept_name" />
- <result property="createUserId" column="create_user_id" />
- </resultMap>
- <sql id="selectTResObservationtowerVo">
- select t.dept_id,
- (select dept_name from sys_dept where dept_id=t.dept_id) dept_name,
- t.create_user_id, t.supermap_id, t.id, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.name, t.height, t.longitude, t.latitude, t.image, t.radius, t.size, t.volume,(select name from t_res_camera a where a.id = t.remark) cameraLabel from t_res_observationtower t
- </sql>
- <select id="selectTResObservationtowerList" parameterType="TResObservationtower" resultMap="TResObservationtowerResult">
- <include refid="selectTResObservationtowerVo"/>
- <where>
- 1=1
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="supermapId != null and supermapId != ''"> and supermap_id = #{supermapId}</if>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="height != null "> and height = #{height}</if>
- <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
- <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
- <if test="image != null and image != ''"> and image = #{image}</if>
- <if test="radius != null "> and radius = #{radius}</if>
- <if test="size != null "> and size = #{size}</if>
- <if test="volume != null "> and volume = #{volume}</if>
- <if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
- <if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId}</if>
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTResObservationtowerById" parameterType="String" resultMap="TResObservationtowerResult">
- <include refid="selectTResObservationtowerVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTResObservationtower" parameterType="TResObservationtower">
- insert into t_res_observationtower
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">id,</if>
- <if test="status != null">status,</if>
- <if test="supermapId != null">supermap_id,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="name != null">name,</if>
- <if test="height != null">height,</if>
- <if test="longitude != null">longitude,</if>
- <if test="latitude != null">latitude,</if>
- <if test="image != null">image,</if>
- <if test="radius != null">radius,</if>
- <if test="size != null">size,</if>
- <if test="volume != null">volume,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="createUserId != null">create_user_id,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">#{id},</if>
- <if test="status != null">#{status},</if>
- <if test="supermapId != null">#{supermapId},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="name != null">#{name},</if>
- <if test="height != null">#{height},</if>
- <if test="longitude != null">#{longitude},</if>
- <if test="latitude != null">#{latitude},</if>
- <if test="image != null">#{image},</if>
- <if test="radius != null">#{radius},</if>
- <if test="size != null">#{size},</if>
- <if test="volume != null">#{volume},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="createUserId != null">#{createUserId},</if>
- </trim>
- </insert>
- <update id="updateTResObservationtower" parameterType="TResObservationtower">
- update t_res_observationtower
- <trim prefix="SET" suffixOverrides=",">
- <if test="status != null">status = #{status},</if>
- <if test="supermapId != null">supermap_id = #{supermapId},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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="name != null">name = #{name},</if>
- <if test="height != null">height = #{height},</if>
- <if test="longitude != null">longitude = #{longitude},</if>
- <if test="latitude != null">latitude = #{latitude},</if>
- <if test="image != null">image = #{image},</if>
- <if test="radius != null">radius = #{radius},</if>
- <if test="size != null">size = #{size},</if>
- <if test="volume != null">volume = #{volume},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="createUserId != null">create_user_id = #{createUserId},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTResObservationtowerById" parameterType="String">
- delete from t_res_observationtower where id = #{id}
- </delete>
- <delete id="deleteTResObservationtowerByIds" parameterType="String">
- delete from t_res_observationtower where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|