|
@@ -0,0 +1,113 @@
|
|
|
+<?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="zhsq_qk.system.mapper.SysCameraMapper">
|
|
|
+
|
|
|
+ <resultMap type="SysCamera" id="SysCameraResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="ascriptionStation" column="ascription_station"/>
|
|
|
+ <result property="address" column="address"/>
|
|
|
+ <result property="longitude" column="longitude"/>
|
|
|
+ <result property="latitude" column="latitude"/>
|
|
|
+ <result property="buildType" column="build_type"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectSysCameraVo">
|
|
|
+ select id, ascription_station, address, longitude, latitude, build_type
|
|
|
+ from sys_camera
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectSysCameraList" parameterType="SysCamera" resultMap="SysCameraResult">
|
|
|
+ <include refid="selectSysCameraVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="ascriptionStation != null and ascriptionStation != ''">
|
|
|
+ and ascription_station = #{ascriptionStation}
|
|
|
+ </if>
|
|
|
+ <if test="address != null and address != ''">
|
|
|
+ and address = #{address}
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null and longitude != ''">
|
|
|
+ and longitude = #{longitude}
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null and latitude != ''">
|
|
|
+ and latitude = #{latitude}
|
|
|
+ </if>
|
|
|
+ <if test="buildType != null and buildType != ''">
|
|
|
+ and build_type = #{buildType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSysCameraById" parameterType="Long"
|
|
|
+ resultMap="SysCameraResult">
|
|
|
+ <include refid="selectSysCameraVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSysCamera" parameterType="SysCamera">
|
|
|
+ insert into sys_camera
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,
|
|
|
+ </if>
|
|
|
+ <if test="ascriptionStation != null">ascription_station,
|
|
|
+ </if>
|
|
|
+ <if test="address != null">address,
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">longitude,
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">latitude,
|
|
|
+ </if>
|
|
|
+ <if test="buildType != null">build_type,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},
|
|
|
+ </if>
|
|
|
+ <if test="ascriptionStation != null">#{ascriptionStation},
|
|
|
+ </if>
|
|
|
+ <if test="address != null">#{address},
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">#{longitude},
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">#{latitude},
|
|
|
+ </if>
|
|
|
+ <if test="buildType != null">#{buildType},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateSysCamera" parameterType="SysCamera">
|
|
|
+ update sys_camera
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="ascriptionStation != null">ascription_station =
|
|
|
+ #{ascriptionStation},
|
|
|
+ </if>
|
|
|
+ <if test="address != null">address =
|
|
|
+ #{address},
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">longitude =
|
|
|
+ #{longitude},
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">latitude =
|
|
|
+ #{latitude},
|
|
|
+ </if>
|
|
|
+ <if test="buildType != null">build_type =
|
|
|
+ #{buildType},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteSysCameraById" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from sys_camera where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteSysCameraByIds" parameterType="String">
|
|
|
+ delete from sys_camera where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|