From 73bc82f63cecf23b74cbf59ebb8bdfb40fe6e5b0 Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Mon, 01 Dec 2025 11:25:28 +0800
Subject: [PATCH] 2025-12-01 zwy 多路直播,将外接相机直播地址插入设备列表中。数据库增加字段“cameraWebrtcUrl”,实体增加cameraWebrtcUrl字段。

---
 ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml |   63 +++++++++++++++++++++++--------
 1 files changed, 47 insertions(+), 16 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml b/ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml
index 4bd8f5e..ae58db9 100644
--- a/ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml
+++ b/ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml
@@ -4,7 +4,7 @@
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ard.work.mapper.ArdServerInfoMapper">
     
-    <resultMap type="ArdServerInfo" id="ArdServerManagementResult">
+    <resultMap type="ArdServerInfo" id="ArdServerInfoResult">
         <result property="id"    column="id"    />
         <result property="serverName"    column="server_name"    />
         <result property="host"    column="host"    />
@@ -20,7 +20,24 @@
         <result property="serverStatus"    column="server_status"    />
     </resultMap>
 
-    <sql id="selectArdServerManagementVo">
+    <sql id="selectArdServerInfoVoNo">
+        select id,
+               server_name,
+               host,
+               tcp_port,
+               http_port,
+               access_key_id,
+               access_key_secret,
+               longitude,
+               latitude,
+               altitude,
+               user_id,
+               dept_id,
+               server_status
+        from ard_server
+    </sql>
+
+    <sql id="selectArdServerInfoVo">
         select c.id,
                c.server_name,
                c.host,
@@ -34,16 +51,16 @@
                c.user_id,
                c.dept_id,
                c.server_status
-        from ard_server_info c
+        from ard_server c
                  left join sys_dept d on d.dept_id = c.dept_id
                  left join sys_user u on u.user_id = c.user_id
     </sql>
 
-    <select id="selectArdServerManagementList" parameterType="ArdServerInfo" resultMap="ArdServerManagementResult">
-        <include refid="selectArdServerManagementVo"/>
+    <select id="selectArdServerInfoList" parameterType="ArdServerInfo" resultMap="ArdServerInfoResult">
+        <include refid="selectArdServerInfoVo"/>
         <where>
             <if test="id != null and id != ''"> and c.id = #{id}</if>
-            <if test="serverName != null and serverName != ''"> and server_name like c.concat('%', #{serverName}, '%')</if>
+            <if test="serverName != null and serverName != ''"> and c.server_name like concat('%', #{serverName}, '%')</if>
             <if test="accessKeyId != null and accessKeyId != ''"> and c.access_key_id = #{accessKeyId}</if>
             <if test="accessKeySecret != null and accessKeySecret != ''"> and c.access_key_secret = #{accessKeySecret}</if>
             <if test="serverStatus != null and serverStatus != ''"> and c.server_status = #{serverStatus}</if>
@@ -55,13 +72,13 @@
         </where>
     </select>
     
-    <select id="selectArdServerManagementById" parameterType="String" resultMap="ArdServerManagementResult">
-        <include refid="selectArdServerManagementVo"/>
+    <select id="selectArdServerInfoById" parameterType="String" resultMap="ArdServerInfoResult">
+        <include refid="selectArdServerInfoVo"/>
         where c.id = #{id}
     </select>
 
-    <insert id="insertArdServerManagement" parameterType="ArdServerInfo">
-        insert into ard_server_info
+    <insert id="insertArdServerInfo" parameterType="ArdServerInfo">
+        insert into ard_server
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
             <if test="serverName != null">server_name,</if>
@@ -94,8 +111,8 @@
          </trim>
     </insert>
 
-    <update id="updateArdServerManagement" parameterType="ArdServerInfo">
-        update ard_server_info
+    <update id="updateArdServerInfo" parameterType="ArdServerInfo">
+        update ard_server
         <trim prefix="SET" suffixOverrides=",">
             <if test="serverName != null">server_name = #{serverName},</if>
             <if test="host != null">host = #{host},</if>
@@ -113,14 +130,28 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteArdServerManagementById" parameterType="String">
-        delete from ard_server_info where id = #{id}
+    <update id="updateServerStatus">
+        update ard_server
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="status != null">server_status = #{status},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteArdServerInfoById" parameterType="String">
+        delete from ard_server where id = #{id}
     </delete>
 
-    <delete id="deleteArdServerManagementByIds" parameterType="String">
-        delete from ard_server_info where id in
+    <delete id="deleteArdServerInfoByIds" parameterType="String">
+        delete from ard_server where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
+
+    <select id="getServerIdsList" resultType="String">
+        SELECT id
+        FROM ard_server
+        where server_status = "1"
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3