|
@@ -0,0 +1,100 @@
|
|
|
+<?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.qdtl.mapper.TlMonitorMapper">
|
|
|
+
|
|
|
+ <resultMap type="TlMonitor" id="TlMonitorResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="channel" column="channel" />
|
|
|
+ <result property="areaId" column="area_id" />
|
|
|
+ <result property="lnglat" column="lnglat" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTlMonitorVo">
|
|
|
+ select id, name, channel, area_id, lnglat,status, remark, del_flag, create_by, create_time, update_by, update_time from tl_monitor
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTlMonitorList" parameterType="TlMonitor" resultMap="TlMonitorResult">
|
|
|
+ <include refid="selectTlMonitorVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="channel != null and channel != ''"> and channel = #{channel}</if>
|
|
|
+ <if test="areaId != null "> and area_id = #{areaId}</if>
|
|
|
+ <if test="lnglat != null and lnglat != ''"> and lnglat = #{lnglat}</if>
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTlMonitorById" parameterType="Long" resultMap="TlMonitorResult">
|
|
|
+ <include refid="selectTlMonitorVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTlMonitor" parameterType="TlMonitor" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into tl_monitor
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="channel != null">channel,</if>
|
|
|
+ <if test="areaId != null">area_id,</if>
|
|
|
+ <if test="lnglat != null">lnglat,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="status != null">status,</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>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="channel != null">#{channel},</if>
|
|
|
+ <if test="areaId != null">#{areaId},</if>
|
|
|
+ <if test="lnglat != null">#{lnglat},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="status != null">#{status},</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>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTlMonitor" parameterType="TlMonitor">
|
|
|
+ update tl_monitor
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="channel != null">channel = #{channel},</if>
|
|
|
+ <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
+ <if test="lnglat != null">lnglat = #{lnglat},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="status != null">status = #{status},</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>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTlMonitorById" parameterType="Long">
|
|
|
+ delete from tl_monitor where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTlMonitorByIds" parameterType="String">
|
|
|
+ delete from tl_monitor where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|