<?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.ycl.platform.mapper.TMonitorVideoMapper">
|
|
<resultMap type="com.ycl.platform.domain.entity.TMonitorVideo" id="TMonitorVideoResult">
|
<result property="id" column="id" />
|
<result property="serialNumber" column="serial_number" />
|
<result property="name" column="name" />
|
<result property="macAddr" column="mac_addr" />
|
<result property="ip" column="ip" />
|
<result property="longitude" column="longitude" />
|
<result property="latitude" column="latitude" />
|
<result property="onState" column="on_state" />
|
<result property="civilCode" column="civil_code" />
|
<result property="address" column="address" />
|
<result property="installedTime" column="installed_time" />
|
<result property="managementUnit" column="management_unit" />
|
<result property="muContactInfo" column="mu_contact_info" />
|
<result property="storageDays" column="storage_days" />
|
<result property="reason" column="reason" />
|
<result property="defaultOrder" column="default_order" />
|
<result property="recovery" column="recovery" />
|
<result property="recoveryTime" column="recovery_time" />
|
<result property="tag" column="tag" />
|
<result property="region" column="region" />
|
<result property="sipDelay" column="sipDelay" />
|
<result property="videoDelay" column="videoDelay" />
|
<result property="iframeDelay" column="iframeDelay" />
|
</resultMap>
|
|
<sql id="selectTMonitorVideoVo">
|
select id, serial_number, name, mac_addr, ip, longitude, latitude, on_state, civil_code, address, installed_time, management_unit, mu_contact_info, storage_days, reason, default_order, recovery, recovery_time, tag, region, sipDelay, videoDelay, iframeDelay from t_monitor_video
|
</sql>
|
|
<select id="selectTMonitorVideoList" resultMap="TMonitorVideoResult">
|
<include refid="selectTMonitorVideoVo"/>
|
<where>
|
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="macAddr != null and macAddr != ''"> and mac_addr = #{macAddr}</if>
|
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
|
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
<if test="onState != null "> and on_state = #{onState}</if>
|
<if test="civilCode != null and civilCode != ''"> and civil_code = #{civilCode}</if>
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
<if test="installedTime != null "> and installed_time = #{installedTime}</if>
|
<if test="managementUnit != null and managementUnit != ''"> and management_unit = #{managementUnit}</if>
|
<if test="muContactInfo != null and muContactInfo != ''"> and mu_contact_info = #{muContactInfo}</if>
|
<if test="storageDays != null "> and storage_days = #{storageDays}</if>
|
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
<if test="defaultOrder != null "> and default_order = #{defaultOrder}</if>
|
<if test="recovery != null "> and recovery = #{recovery}</if>
|
<if test="recoveryTime != null "> and recovery_time = #{recoveryTime}</if>
|
<if test="tag != null and tag !=''"> and tag = #{tag}</if>
|
<if test="region != null and region != ''"> and region = #{region}</if>
|
<if test="sipDelay != null "> and sipDelay = #{sipDelay}</if>
|
<if test="videoDelay != null "> and videoDelay = #{videoDelay}</if>
|
<if test="iframeDelay != null "> and iframeDelay = #{iframeDelay}</if>
|
</where>
|
</select>
|
|
<select id="selectTMonitorVideoById" parameterType="Long" resultMap="TMonitorVideoResult">
|
<include refid="selectTMonitorVideoVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertTMonitorVideo" useGeneratedKeys="true" keyProperty="id">
|
insert into t_monitor_video
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="serialNumber != null">serial_number,</if>
|
<if test="name != null">name,</if>
|
<if test="macAddr != null">mac_addr,</if>
|
<if test="ip != null">ip,</if>
|
<if test="longitude != null">longitude,</if>
|
<if test="latitude != null">latitude,</if>
|
<if test="onState != null">on_state,</if>
|
<if test="civilCode != null">civil_code,</if>
|
<if test="address != null">address,</if>
|
<if test="installedTime != null">installed_time,</if>
|
<if test="managementUnit != null">management_unit,</if>
|
<if test="muContactInfo != null">mu_contact_info,</if>
|
<if test="storageDays != null">storage_days,</if>
|
<if test="reason != null">reason,</if>
|
<if test="defaultOrder != null">default_order,</if>
|
<if test="recovery != null">recovery,</if>
|
<if test="recoveryTime != null">recovery_time,</if>
|
<if test="tag != null and tag !=''">tag,</if>
|
<if test="region != null">region,</if>
|
<if test="sipDelay != null">sipDelay,</if>
|
<if test="videoDelay != null">videoDelay,</if>
|
<if test="iframeDelay != null">iframeDelay,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="serialNumber != null">#{serialNumber},</if>
|
<if test="name != null">#{name},</if>
|
<if test="macAddr != null">#{macAddr},</if>
|
<if test="ip != null">#{ip},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="onState != null">#{onState},</if>
|
<if test="civilCode != null">#{civilCode},</if>
|
<if test="address != null">#{address},</if>
|
<if test="installedTime != null">#{installedTime},</if>
|
<if test="managementUnit != null">#{managementUnit},</if>
|
<if test="muContactInfo != null">#{muContactInfo},</if>
|
<if test="storageDays != null">#{storageDays},</if>
|
<if test="reason != null">#{reason},</if>
|
<if test="defaultOrder != null">#{defaultOrder},</if>
|
<if test="recovery != null">#{recovery},</if>
|
<if test="recoveryTime != null">#{recoveryTime},</if>
|
<if test="tag != null and tag !=''">#{tag},</if>
|
<if test="region != null">#{region},</if>
|
<if test="sipDelay != null">#{sipDelay},</if>
|
<if test="videoDelay != null">#{videoDelay},</if>
|
<if test="iframeDelay != null">#{iframeDelay},</if>
|
</trim>
|
</insert>
|
|
<update id="updateTMonitorVideo" >
|
update t_monitor_video
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
<if test="name != null">name = #{name},</if>
|
<if test="macAddr != null">mac_addr = #{macAddr},</if>
|
<if test="ip != null">ip = #{ip},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="onState != null">on_state = #{onState},</if>
|
<if test="civilCode != null">civil_code = #{civilCode},</if>
|
<if test="address != null">address = #{address},</if>
|
<if test="installedTime != null">installed_time = #{installedTime},</if>
|
<if test="managementUnit != null">management_unit = #{managementUnit},</if>
|
<if test="muContactInfo != null">mu_contact_info = #{muContactInfo},</if>
|
<if test="storageDays != null">storage_days = #{storageDays},</if>
|
<if test="reason != null">reason = #{reason},</if>
|
<if test="defaultOrder != null">default_order = #{defaultOrder},</if>
|
<if test="recovery != null">recovery = #{recovery},</if>
|
<if test="recoveryTime != null">recovery_time = #{recoveryTime},</if>
|
<if test="tag != null and tag !=''">tag = #{tag},</if>
|
<if test="region != null">region = #{region},</if>
|
<if test="sipDelay != null">sipDelay = #{sipDelay},</if>
|
<if test="videoDelay != null">videoDelay = #{videoDelay},</if>
|
<if test="iframeDelay != null">iframeDelay = #{iframeDelay},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteTMonitorVideoById" parameterType="Long">
|
delete from t_monitor_video where id = #{id}
|
</delete>
|
|
<delete id="deleteTMonitorVideoByIds" parameterType="String">
|
delete from t_monitor_video where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|