From f652169cc5d6501511eece5df57b7b396fd7a7ab Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Tue, 02 Jun 2026 09:51:34 +0800
Subject: [PATCH] 优化
---
ard-modules/ard-modules-work/src/main/resources/mapper/device/ArdChannelMapper.xml | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/ard-modules/ard-modules-work/src/main/resources/mapper/device/ArdChannelMapper.xml b/ard-modules/ard-modules-work/src/main/resources/mapper/device/ArdChannelMapper.xml
index 807e51d..8c3d4d5 100644
--- a/ard-modules/ard-modules-work/src/main/resources/mapper/device/ArdChannelMapper.xml
+++ b/ard-modules/ard-modules-work/src/main/resources/mapper/device/ArdChannelMapper.xml
@@ -10,11 +10,15 @@
<result property="chanNo" column="chan_no"/>
<result property="videoCode" column="video_code"/>
<result property="deviceId" column="device_id"/>
- <result property="rtspUrl" column="rtsp_url"/>
+ <result property="type" column="type"/>
+ <result property="liveAddress" column="live_address"/>
+ <result property="snapUrl" column="snap_url"/>
+ <result property="mediaServerId" column="media_server_id"/>
+ <result property="streamKey" column="stream_key"/>
</resultMap>
<sql id="selectArdChannelVo">
- select id, name, chan_no, video_code, device_id
+ select id, name, chan_no, video_code, device_id, type, live_address, snap_url, media_server_id, stream_key
from ard_channel
</sql>
@@ -24,6 +28,14 @@
<if test="deviceId!=null">device_id=#{deviceId}</if>
</where>
order by chan_no
+ </select>
+
+ <select id="queryByIds" resultMap="ArdChannelResult">
+ <include refid="selectArdChannelVo"/>
+ where id in
+ <foreach item="id" collection="startArdChannelIdList" open="(" separator="," close=")">
+ #{id}
+ </foreach>
</select>
<select id="selectArdChannelById" parameterType="String" resultMap="ArdChannelResult">
@@ -48,7 +60,11 @@
<if test="chanNo != null">chan_no,</if>
<if test="videoCode != null">video_code,</if>
<if test="deviceId != null">device_id,</if>
- <if test="rtspUrl != null">rtsp_url,</if>
+ <if test="liveAddress != null">live_address,</if>
+ <if test="snapUrl != null">snap_url,</if>
+ <if test="type != null">type,</if>
+ <if test="mediaServerId != null">media_server_id,</if>
+ <if test="streamKey != null">stream_key,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -56,7 +72,11 @@
<if test="chanNo != null">#{chanNo},</if>
<if test="videoCode != null">#{videoCode},</if>
<if test="deviceId != null">#{deviceId},</if>
- <if test="rtspUrl != null">#{rtspUrl},</if>
+ <if test="liveAddress != null">#{liveAddress},</if>
+ <if test="snapUrl != null">#{snapUrl},</if>
+ <if test="type != null">#{type},</if>
+ <if test="mediaServerId != null">#{mediaServerId},</if>
+ <if test="streamKey != null">#{streamKey},</if>
</trim>
</insert>
@@ -67,7 +87,11 @@
<if test="chanNo != null">chan_no = #{chanNo},</if>
<if test="videoCode != null">video_code = #{videoCode},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
- <if test="rtspUrl != null">rtsp_url = #{rtspUrl},</if>
+ <if test="liveAddress != null">live_address = #{liveAddress},</if>
+ <if test="snapUrl != null">snap_url = #{snapUrl},</if>
+ <if test="type != null">type = #{type},</if>
+ <if test="mediaServerId != null">media_server_id = #{mediaServerId},</if>
+ <if test="streamKey != null">stream_key = #{streamKey},</if>
</trim>
where id = #{id}
</update>
--
Gitblit v1.9.3