From 56062b177a71cf781f8e480c0ec6f5e8394e7a8e Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Thu, 16 Oct 2025 14:51:29 +0800
Subject: [PATCH] 1.修改服务器状态接口优化。 2.无人机盒子对象增加盒子别名字段。 3.动态修改服务状态。

---
 ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml b/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
index cfab1bc..dafd26d 100644
--- a/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
+++ b/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
@@ -16,6 +16,7 @@
         <result property="lastTaskId"    column="last_task_id"    />
         <result property="userId"    column="user_id"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="boxAliasName"    column="box_alias_name"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -37,24 +38,25 @@
 
     <sql id="selectArdDroneVo">
         select id,
-            box_sn,
-            box_name,
-            box_version,
-            start_time,
-            on_line,
-            video_server,
-            video_port,
-            last_task_id,
-            server_id,
-            user_id,
-            dept_id
+               box_sn,
+               box_name,
+               box_version,
+               start_time,
+               on_line,
+               video_server,
+               video_port,
+               last_task_id,
+               server_id,
+               user_id,
+               dept_id,
+               box_alias_name
         from ard_drone_info
     </sql>
 
     <select id="selectArdDroneList" parameterType="ArdDroneInfo" resultMap="ArdDroneInfoResult">
         <include refid="selectArdDroneVo"/>
-        <where>  
-            <if test="boxSn != null  and boxSn != ''"> and box_sn = #{boxSn}</if>
+        <where>
+            <if test="boxSn != null  and boxSn != ''"> and box_sn like concat('%', #{boxSn}, '%')</if>
             <if test="boxName != null  and boxName != ''"> and box_name like concat('%', #{boxName}, '%')</if>
             <if test="boxVersion != null  and boxVersion != ''"> and box_version = #{boxVersion}</if>
             <if test="onLine != null "> and onLine = #{onLine}</if>
@@ -87,6 +89,7 @@
             <if test="serverId != null">server_id,</if>
             <if test="userId != null">user_id,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="boxAliasName != null">box_alias_name,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -106,6 +109,7 @@
             <if test="serverId != null">#{serverId},</if>
             <if test="userId != null">#{userId},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="boxAliasName != null">#{boxAliasName},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -128,6 +132,7 @@
             <if test="serverId != null">server_id = #{serverId},</if>
             <if test="userId != null">user_id = #{userId},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="boxAliasName != null">box_alias_name = #{boxAliasName},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -162,6 +167,7 @@
             server_id,
             user_id,
             dept_id,
+            box_alias_name,
             create_by,
             create_time,
             update_by,
@@ -181,6 +187,7 @@
             #{item.serverId},
             #{item.userId},
             #{item.deptId},
+            #{item.boxAliasName},
             #{item.createBy},
             #{item.createTime},
             #{item.updateBy},

--
Gitblit v1.9.3