From 8fe759f26e23fb594f4bf02d6d4889f4521d41a7 Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Sat, 11 Oct 2025 15:26:43 +0800
Subject: [PATCH] 1.修该并合并无人机盒子对象相关关系。
---
ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml | 149 +++++++++++++++++++++++++++++++++----------------
1 files changed, 99 insertions(+), 50 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml b/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
index a79d442..37ec66c 100644
--- a/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
+++ b/ard-work/src/main/resources/mapper/ArdDroneInfoMapper.xml
@@ -4,89 +4,138 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ard.work.mapper.ArdDroneInfoMapper">
- <resultMap type="ArdDroneInfo" id="ArdDroneManagementResult">
+ <resultMap type="ArdDroneInfo" id="ArdDroneResult">
<result property="id" column="id" />
- <result property="deviceModel" column="device_model" />
- <result property="deviceSn" column="device_sn" />
- <result property="deviceName" column="device_name" />
- <result property="deviceStatus" column="device_status" />
- <result property="deviceAddTime" column="device_add_time" />
- <result property="onlineTime" column="online_time" />
+ <result property="boxSn" column="box_sn" />
+ <result property="boxName" column="box_name" />
+ <result property="boxVersion" column="box_version" />
+ <result property="startTime" column="start_time" />
+ <result property="onLine" column="onLine" />
+ <result property="videoServer" column="video_server" />
+ <result property="videoPort" column="video_port" />
+ <result property="lastTaskId" column="last_task_id" />
+ <result property="userId" column="user_id" />
+ <result property="deptId" column="dept_id" />
+ <result property="createBy" column="create_by" />
+ <result property="createTime" column="create_time" />
+ <result property="updateBy" column="update_by" />
+ <result property="updateTime" column="update_time" />
+ <result property="remark" column="remark" />
<result property="serverInfoId" column="server_info_id" />
+ <!-- 关联 ArdServerInfo 对象 -->
+ <association property="ardServerInfo"
+ javaType="com.ard.work.domain.entity.ArdServerInfo"
+ column="server_info_id"
+ autoMapping="true"
+ select="selectArdServerInfo">
+ </association>
</resultMap>
- <sql id="selectArdDroneManagementVo">
+ <select id="selectArdServerInfo" resultType="com.ard.work.domain.entity.ArdServerInfo">
+ select * from ard_server_info where id = #{server_info_id}
+ </select>
+
+ <sql id="selectArdDroneVo">
select id,
- device_model,
- device_sn,
- device_name,
- device_status,
- device_add_time,
- online_time,
- server_info_id
+ box_sn,
+ box_name,
+ box_version,
+ start_time,
+ on_line,
+ video_server,
+ video_port,
+ last_task_id,
+ server_info_id,
+ user_id,
+ dept_id
from ard_drone_info
</sql>
- <select id="selectArdDroneManagementList" parameterType="ArdDroneInfo" resultMap="ArdDroneManagementResult">
- <include refid="selectArdDroneManagementVo"/>
+ <select id="selectArdDroneList" parameterType="ArdDroneInfo" resultMap="ArdDroneResult">
+ <include refid="selectArdDroneVo"/>
<where>
- <if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
- <if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
- <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
- <if test="deviceStatus != null and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
- <if test="deviceAddTime != null "> and device_add_time = #{deviceAddTime}</if>
- <if test="onlineTime != null "> and online_time = #{onlineTime}</if>
+ <if test="boxSn != null and boxSn != ''"> and box_sn = #{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>
+ <if test="lastTaskId != null "> and last_task_id = #{lastTaskId}</if>
+ <if test="userId != null "> and user_id = #{userId}</if>
+ <if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
</select>
- <select id="selectArdDroneManagementById" parameterType="String" resultMap="ArdDroneManagementResult">
- <include refid="selectArdDroneManagementVo"/>
+ <select id="selectArdDroneById" parameterType="String" resultMap="ArdDroneResult">
+ <include refid="selectArdDroneVo"/>
where id = #{id}
</select>
- <insert id="insertArdDroneManagement" parameterType="ArdDroneInfo">
+ <insert id="insertArdDrone" parameterType="ArdDroneInfo">
insert into ard_drone_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
- <if test="deviceModel != null">device_model,</if>
- <if test="deviceSn != null">device_sn,</if>
- <if test="deviceName != null">device_name,</if>
- <if test="deviceStatus != null">device_status,</if>
- <if test="deviceAddTime != null">device_add_time,</if>
- <if test="onlineTime != null">online_time,</if>
- <if test="serverInfoId != null">server_info_id,</if>
+ <if test="boxSn != null">box_sn,</if>
+ <if test="boxName != null">box_name,</if>
+ <if test="boxVersion != null">box_version,</if>
+ <if test="startTime != null">start_time,</if>
+ <if test="onLine != null">on_line,</if>
+ <if test="videoServer != null">video_server,</if>
+ <if test="videoPort != null">video_port,</if>
+ <if test="lastTaskId != null">last_task_id,</if>
+ <if test="userId != null">user_id,</if>
+ <if test="deptId != null">dept_id,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ <if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
- <if test="deviceModel != null">#{deviceModel},</if>
- <if test="deviceSn != null">#{deviceSn},</if>
- <if test="deviceName != null">#{deviceName},</if>
- <if test="deviceStatus != null">#{deviceStatus},</if>
- <if test="deviceAddTime != null">#{deviceAddTime},</if>
- <if test="onlineTime != null">#{onlineTime},</if>
- <if test="serverInfoId != null">#{serverInfoId},</if>
+ <if test="boxSn != null">#{boxSn},</if>
+ <if test="boxName != null">#{boxName},</if>
+ <if test="boxVersion != null">#{boxVersion},</if>
+ <if test="startTime != null">#{startTime},</if>
+ <if test="onLine != null">#{onLine},</if>
+ <if test="videoServer != null">#{videoServer},</if>
+ <if test="videoPort != null">#{videoPort},</if>
+ <if test="lastTaskId != null">#{lastTaskId},</if>
+ <if test="userId != null">#{userId},</if>
+ <if test="deptId != null">#{deptId},</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="remark != null">#{remark},</if>
</trim>
</insert>
- <update id="updateArdDroneManagement" parameterType="ArdDroneInfo">
+ <update id="updateArdDrone" parameterType="ArdDroneInfo">
update ard_drone_info
<trim prefix="SET" suffixOverrides=",">
- <if test="deviceModel != null">device_model = #{deviceModel},</if>
- <if test="deviceSn != null">device_sn = #{deviceSn},</if>
- <if test="deviceName != null">device_name = #{deviceName},</if>
- <if test="deviceStatus != null">device_status = #{deviceStatus},</if>
- <if test="deviceAddTime != null">device_add_time = #{deviceAddTime},</if>
- <if test="onlineTime != null">online_time = #{onlineTime},</if>
- <if test="serverInfoId != null">server_info_id = #{serverInfoId},</if>
+ <if test="boxSn != null">box_sn = #{boxSn},</if>
+ <if test="boxName != null">box_name = #{boxName},</if>
+ <if test="boxVersion != null">box_version = #{boxVersion},</if>
+ <if test="startTime != null">start_time = #{startTime},</if>
+ <if test="onLine != null">on_line = #{onLine},</if>
+ <if test="videoServer != null">video_server = #{videoServer},</if>
+ <if test="videoPort != null">video_port = #{videoPort},</if>
+ <if test="lastTaskId != null">last_task_id = #{lastTaskId},</if>
+ <if test="userId != null">user_id = #{userId},</if>
+ <if test="deptId != null">dept_id = #{deptId},</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>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ <if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
- <delete id="deleteArdDroneManagementById" parameterType="String">
+ <delete id="deleteArdDroneById" parameterType="String">
delete from ard_drone_info where id = #{id}
</delete>
- <delete id="deleteArdDroneManagementByIds" parameterType="String">
+ <delete id="deleteArdDroneByIds" parameterType="String">
delete from ard_drone_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
--
Gitblit v1.9.3