<?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.cloud.user.dao.CameraDao">
|
<resultMap id="BaseResultMap" type="com.cloud.model.sys.Camera">
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="orgId" jdbcType="INTEGER" property="orgId" />
|
<result column="deviceName" jdbcType="VARCHAR" property="deviceName" />
|
<result column="deviceSn" jdbcType="VARCHAR" property="deviceSn" />
|
<result column="ip" jdbcType="VARCHAR" property="ip" />
|
<result column="port" jdbcType="VARCHAR" property="port" />
|
<result column="netProtocol" jdbcType="VARCHAR" property="netProtocol" />
|
<result column="interfaceProtocol" jdbcType="VARCHAR" property="interfaceProtocol" />
|
<result column="timeThreshold" jdbcType="INTEGER" property="timeThreshold" />
|
<result column="rosolution" jdbcType="VARCHAR" property="rosolution" />
|
<result column="ptzProtocol" jdbcType="VARCHAR" property="ptzProtocol" />
|
<result column="ptzPort" jdbcType="VARCHAR" property="ptzPort" />
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
<result column="password" jdbcType="VARCHAR" property="password" />
|
<result column="showOrder" jdbcType="INTEGER" property="showOrder" />
|
<result column="deviceType" jdbcType="VARCHAR" property="deviceType" />
|
<result column="state" jdbcType="INTEGER" property="state" />
|
<result column="rtmpUrl" jdbcType="VARCHAR" property="rtmpUrl" />
|
<result column="videoUrl" jdbcType="VARCHAR" property="videoUrl" />
|
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
|
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
|
<result column="cameraArea" jdbcType="VARCHAR" property="cameraArea" />
|
<result column="createBy" jdbcType="VARCHAR" property="createBy" />
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="updateBy" jdbcType="INTEGER" property="updateBy" />
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="delFlag" jdbcType="VARCHAR" property="delFlag" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, orgId, deviceName,deviceSn, ip, port, netProtocol, interfaceProtocol, timeThreshold,
|
rosolution, ptzProtocol, ptzPort, username, password, showOrder, deviceType, state,
|
rtmpUrl, videoUrl, longitude, latitude, cameraArea, createBy, createTime, updateBy,
|
updateTime, delFlag
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from camera
|
where id = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="com.cloud.model.sys.Camera">
|
delete from camera
|
where id = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="com.cloud.model.sys.Camera">
|
insert into camera (id, orgId, deviceName,
|
deviceSn, ip, port,
|
netProtocol, interfaceProtocol, timeThreshold,
|
rosolution, ptzProtocol, ptzPort,
|
username, password, showOrder,
|
deviceType, state, rtmpUrl,
|
videoUrl, longitude, latitude,
|
cameraArea, createBy, createTime,
|
updateBy, updateTime, delFlag
|
)
|
values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR},
|
#{deviceSn,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR},
|
#{netProtocol,jdbcType=VARCHAR}, #{interfaceProtocol,jdbcType=VARCHAR}, #{timeThreshold,jdbcType=INTEGER},
|
#{rosolution,jdbcType=VARCHAR}, #{ptzProtocol,jdbcType=VARCHAR}, #{ptzPort,jdbcType=VARCHAR},
|
#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{showOrder,jdbcType=INTEGER},
|
#{deviceType,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{rtmpUrl,jdbcType=VARCHAR},
|
#{videoUrl,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
|
#{cameraArea,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
#{updateBy,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.cloud.model.sys.Camera">
|
insert into camera
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="orgId != null">
|
orgId,
|
</if>
|
<if test="deviceName != null">
|
deviceName,
|
</if>
|
<if test="deviceSn != null">
|
deviceSn,
|
</if>
|
<if test="ip != null">
|
ip,
|
</if>
|
<if test="port != null">
|
port,
|
</if>
|
<if test="netProtocol != null">
|
netProtocol,
|
</if>
|
<if test="interfaceProtocol != null">
|
interfaceProtocol,
|
</if>
|
<if test="timeThreshold != null">
|
timeThreshold,
|
</if>
|
<if test="rosolution != null">
|
rosolution,
|
</if>
|
<if test="ptzProtocol != null">
|
ptzProtocol,
|
</if>
|
<if test="ptzPort != null">
|
ptzPort,
|
</if>
|
<if test="username != null">
|
username,
|
</if>
|
<if test="password != null">
|
password,
|
</if>
|
<if test="showOrder != null">
|
showOrder,
|
</if>
|
<if test="deviceType != null">
|
deviceType,
|
</if>
|
<if test="state != null">
|
state,
|
</if>
|
<if test="rtmpUrl != null">
|
rtmpUrl,
|
</if>
|
<if test="videoUrl != null">
|
videoUrl,
|
</if>
|
<if test="longitude != null">
|
longitude,
|
</if>
|
<if test="latitude != null">
|
latitude,
|
</if>
|
<if test="cameraArea != null">
|
cameraArea,
|
</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="delFlag != null">
|
delFlag,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=INTEGER},
|
</if>
|
<if test="orgId != null">
|
#{orgId,jdbcType=INTEGER},
|
</if>
|
<if test="deviceName != null">
|
#{deviceName,jdbcType=VARCHAR},
|
</if>
|
<if test="deviceSn != null">
|
#{deviceSn,jdbcType=VARCHAR},
|
</if>
|
<if test="ip != null">
|
#{ip,jdbcType=VARCHAR},
|
</if>
|
<if test="port != null">
|
#{port,jdbcType=VARCHAR},
|
</if>
|
<if test="netProtocol != null">
|
#{netProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="interfaceProtocol != null">
|
#{interfaceProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="timeThreshold != null">
|
#{timeThreshold,jdbcType=INTEGER},
|
</if>
|
<if test="rosolution != null">
|
#{rosolution,jdbcType=VARCHAR},
|
</if>
|
<if test="ptzProtocol != null">
|
#{ptzProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="ptzPort != null">
|
#{ptzPort,jdbcType=VARCHAR},
|
</if>
|
<if test="username != null">
|
#{username,jdbcType=VARCHAR},
|
</if>
|
<if test="password != null">
|
#{password,jdbcType=VARCHAR},
|
</if>
|
<if test="showOrder != null">
|
#{showOrder,jdbcType=INTEGER},
|
</if>
|
<if test="deviceType != null">
|
#{deviceType,jdbcType=VARCHAR},
|
</if>
|
<if test="state != null">
|
#{state,jdbcType=INTEGER},
|
</if>
|
<if test="rtmpUrl != null">
|
#{rtmpUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="videoUrl != null">
|
#{videoUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="longitude != null">
|
#{longitude,jdbcType=VARCHAR},
|
</if>
|
<if test="latitude != null">
|
#{latitude,jdbcType=VARCHAR},
|
</if>
|
<if test="cameraArea != null">
|
#{cameraArea,jdbcType=VARCHAR},
|
</if>
|
<if test="createBy != null">
|
#{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null">
|
#{updateBy,jdbcType=INTEGER},
|
</if>
|
<if test="updateTime != null">
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="delFlag != null">
|
#{delFlag,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.cloud.model.sys.Camera">
|
update camera
|
<set>
|
<if test="orgId != null">
|
orgId = #{orgId,jdbcType=INTEGER},
|
</if>
|
<if test="deviceName != null">
|
deviceName = #{deviceName,jdbcType=VARCHAR},
|
</if>
|
<if test="deviceSn != null">
|
deviceSn = #{deviceSn,jdbcType=VARCHAR},
|
</if>
|
<if test="ip != null">
|
ip = #{ip,jdbcType=VARCHAR},
|
</if>
|
<if test="port != null">
|
port = #{port,jdbcType=VARCHAR},
|
</if>
|
<if test="netProtocol != null">
|
netProtocol = #{netProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="interfaceProtocol != null">
|
interfaceProtocol = #{interfaceProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="timeThreshold != null">
|
timeThreshold = #{timeThreshold,jdbcType=INTEGER},
|
</if>
|
<if test="rosolution != null">
|
rosolution = #{rosolution,jdbcType=VARCHAR},
|
</if>
|
<if test="ptzProtocol != null">
|
ptzProtocol = #{ptzProtocol,jdbcType=VARCHAR},
|
</if>
|
<if test="ptzPort != null">
|
ptzPort = #{ptzPort,jdbcType=VARCHAR},
|
</if>
|
<if test="username != null">
|
username = #{username,jdbcType=VARCHAR},
|
</if>
|
<if test="password != null">
|
password = #{password,jdbcType=VARCHAR},
|
</if>
|
<if test="showOrder != null">
|
showOrder = #{showOrder,jdbcType=INTEGER},
|
</if>
|
<if test="deviceType != null">
|
deviceType = #{deviceType,jdbcType=VARCHAR},
|
</if>
|
<if test="state != null">
|
state = #{state,jdbcType=INTEGER},
|
</if>
|
<if test="rtmpUrl != null">
|
rtmpUrl = #{rtmpUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="videoUrl != null">
|
videoUrl = #{videoUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="longitude != null">
|
longitude = #{longitude,jdbcType=VARCHAR},
|
</if>
|
<if test="latitude != null">
|
latitude = #{latitude,jdbcType=VARCHAR},
|
</if>
|
<if test="cameraArea != null">
|
cameraArea = #{cameraArea,jdbcType=VARCHAR},
|
</if>
|
<if test="createBy != null">
|
createBy = #{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null">
|
updateBy = #{updateBy,jdbcType=INTEGER},
|
</if>
|
<if test="updateTime != null">
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="delFlag != null">
|
delFlag = #{delFlag,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.cloud.model.sys.Camera">
|
update camera
|
set orgId = #{orgId,jdbcType=INTEGER},
|
deviceName = #{deviceName,jdbcType=VARCHAR},
|
deviceSn = #{deviceSn,jdbcType=VARCHAR},
|
ip = #{ip,jdbcType=VARCHAR},
|
port = #{port,jdbcType=VARCHAR},
|
netProtocol = #{netProtocol,jdbcType=VARCHAR},
|
interfaceProtocol = #{interfaceProtocol,jdbcType=VARCHAR},
|
timeThreshold = #{timeThreshold,jdbcType=INTEGER},
|
rosolution = #{rosolution,jdbcType=VARCHAR},
|
ptzProtocol = #{ptzProtocol,jdbcType=VARCHAR},
|
ptzPort = #{ptzPort,jdbcType=VARCHAR},
|
username = #{username,jdbcType=VARCHAR},
|
password = #{password,jdbcType=VARCHAR},
|
showOrder = #{showOrder,jdbcType=INTEGER},
|
deviceType = #{deviceType,jdbcType=VARCHAR},
|
state = #{state,jdbcType=INTEGER},
|
rtmpUrl = #{rtmpUrl,jdbcType=VARCHAR},
|
videoUrl = #{videoUrl,jdbcType=VARCHAR},
|
longitude = #{longitude,jdbcType=VARCHAR},
|
latitude = #{latitude,jdbcType=VARCHAR},
|
cameraArea = #{cameraArea,jdbcType=VARCHAR},
|
createBy = #{createBy,jdbcType=VARCHAR},
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
updateBy = #{updateBy,jdbcType=INTEGER},
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
delFlag = #{delFlag,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
|
<select id="getCameraInputList" parameterType="String" resultType="map">
|
select id,description from camera where orgId = #{orgId}
|
</select>
|
</mapper>
|