From f1d079f9c0b3d384090477ca54e0548373d62b57 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 16 Jan 2025 11:56:39 +0800
Subject: [PATCH] 配置修改

---
 src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml |   68 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml b/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml
new file mode 100644
index 0000000..a372daf
--- /dev/null
+++ b/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml
@@ -0,0 +1,68 @@
+<?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.genersoft.iot.vmp.netty.business.mapper.TalkBackEquipmentMapper">
+
+    <!--新增对讲设备信息-->
+    <insert id="saveTalkBackEquipment" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_talk_back_equipment
+        (
+        name,code,status,terminal_number,longitude,latitude,
+        speed,direction,elevation,precisions,receive_time,create_time,update_time
+        )
+        values
+        (
+        #{name},#{code},#{status},#{terminalNumber},#{longitude},#{latitude},
+        #{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime},#{updateTime}
+        )
+    </insert>
+
+    <!--新增对接设备历史记录信息-->
+    <insert id="saveTalkBackEquipmentRecord">
+        insert into sys_talk_back_equipment_record
+        (
+        talk_back_equipment_id,status,terminal_number,
+        longitude,latitude,speed,direction,elevation,precisions,receive_time,create_time
+        )
+        values
+        (
+        #{talkBackEquipmentId},#{status},#{terminalNumber},
+        #{longitude},#{latitude},#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime}
+        )
+    </insert>
+
+    <!--修改对讲设备信息-->
+    <update id="updateTalkBackEquipment">
+        update sys_talk_back_equipment
+        set
+        code = #{code},
+        name = #{name},
+        status = #{status},
+        <if test="null!=terminalNumber and terminalNumber!=''">
+            terminal_number = #{terminalNumber},
+        </if>
+        <if test="null!=longitude and longitude!=''">
+            longitude = #{longitude},
+        </if>
+        <if test="null!=latitude and latitude!=''">
+            latitude = #{latitude},
+        </if>
+        <if test="null!=speed and speed!=''">
+            speed = #{speed},
+        </if>
+        <if test="null!=direction and direction!=''">
+            direction = #{direction},
+        </if>
+        <if test="null!=elevation and elevation!=''">
+            elevation = #{elevation},
+        </if>
+        <if test="null!=precisions and precisions!=''">
+            precisions = #{precisions},
+        </if>
+        <if test="null!=receiveTime">
+            receive_time = #{receiveTime},
+        </if>
+        update_time = #{updateTime}
+        where id = #{id}
+    </update>
+
+</mapper>

--
Gitblit v1.9.3