From 667257a75a228ce7fe50a8a3cc8160628876015f Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: Mon, 7 Jun 2021 16:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=8E=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql.sql | 4 +++ .../iot/vmp/gb28181/bean/Device.java | 26 ++++++++++++++++++ .../iot/vmp/gb28181/bean/DeviceChannel.java | 26 ++++++++++++++++++ .../vmp/storager/dao/DeviceChannelMapper.java | 6 ++-- .../iot/vmp/storager/dao/DeviceMapper.java | 6 +++- src/main/resources/wvp.sqlite | Bin 114688 -> 114688 bytes web_src/src/components/DeviceList.vue | 4 +++ 7 files changed, 68 insertions(+), 4 deletions(-) diff --git a/sql/mysql.sql b/sql/mysql.sql index 71e651a1..7055edd3 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -15,6 +15,8 @@ create table device registerTime varchar(50) null, keepaliveTime varchar(50) null, ip varchar(50) not null, + createTime varchar(50) not null, + updateTime varchar(50) not null, port int not null, expires int not null, hostAddress varchar(50) not null @@ -49,6 +51,8 @@ create table device_channel deviceId varchar(50) not null, parental varchar(50) null, hasAudio bit(1) null, + createTime varchar(50) not null, + updateTime varchar(50) not null, primary key (channelId, deviceId) ); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java index a9185e0c..6f3d4d73 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java @@ -84,6 +84,16 @@ public class Device { */ private int expires; + /** + * 创建时间 + */ + private String createTime; + + /** + * 更新时间 + */ + private String updateTime; + public String getDeviceId() { return deviceId; } @@ -203,4 +213,20 @@ public class Device { public void setExpires(int expires) { this.expires = expires; } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java index ca6ef60f..6d40e360 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java @@ -118,6 +118,16 @@ public class DeviceChannel { * 云台类型描述字符串 */ private String PTZTypeText; + + /** + * 创建时间 + */ + private String createTime; + + /** + * 更新时间 + */ + private String updateTime; /** * 在线/离线 @@ -403,4 +413,20 @@ public class DeviceChannel { public void setStreamId(String streamId) { this.streamId = streamId; } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java index 2f534cf6..6b3bd1c5 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java @@ -16,15 +16,15 @@ public interface DeviceChannelMapper { @Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " + "address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " + - "ipAddress, port, password, PTZType, status, streamId, longitude, latitude) " + + "ipAddress, port, password, PTZType, status, streamId, longitude, latitude, createTime, updateTime) " + "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + - "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude})") + "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, datetime('now','localtime'), datetime('now','localtime'))") int add(DeviceChannel channel); @Update(value = {"