From df11956c3c203434d3ef54955a502c466f1382dd Mon Sep 17 00:00:00 2001
From: 64850858 <648540858@qq.com>
Date: 星期一, 07 六月 2021 15:42:01 +0800
Subject: [PATCH] 取出错误配置

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
index e6a6066..d597f35 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -1,7 +1,6 @@
 package com.genersoft.iot.vmp.storager.dao;
 
 import com.genersoft.iot.vmp.gb28181.bean.Device;
-import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
 import org.apache.ibatis.annotations.*;
 import org.springframework.stereotype.Repository;
 
@@ -28,6 +27,9 @@
                 "ip," +
                 "port," +
                 "hostAddress," +
+                "expires," +
+                "registerTime," +
+                "keepaliveTime," +
                 "online" +
             ") VALUES (" +
                 "#{deviceId}," +
@@ -40,6 +42,9 @@
                 "#{ip}," +
                 "#{port}," +
                 "#{hostAddress}," +
+                "#{expires}," +
+                "#{registerTime}," +
+                "#{keepaliveTime}," +
                 "#{online}" +
             ")")
     int add(Device device);
@@ -57,6 +62,9 @@
                 "<if test=\"port != null\">, port=${port}</if>" +
                 "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" +
                 "<if test=\"online != null\">, online=${online}</if>" +
+                "<if test=\"registerTime != null\">, registerTime='${registerTime}'</if>" +
+                "<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" +
+                "<if test=\"expires != null\">, expires=${expires}</if>" +
                 "WHERE deviceId='${deviceId}'"+
             " </script>"})
     int update(Device device);
@@ -66,4 +74,7 @@
 
     @Delete("DELETE FROM device WHERE deviceId=#{deviceId}")
     int del(String deviceId);
+
+    @Update("UPDATE device SET online=0")
+    int outlineForAll();
 }

--
Gitblit v1.8.0