添加创建时间与更新时间
parent
eb6b6529cd
commit
667257a75a
|
@ -15,6 +15,8 @@ create table device
|
||||||
registerTime varchar(50) null,
|
registerTime varchar(50) null,
|
||||||
keepaliveTime varchar(50) null,
|
keepaliveTime varchar(50) null,
|
||||||
ip varchar(50) not null,
|
ip varchar(50) not null,
|
||||||
|
createTime varchar(50) not null,
|
||||||
|
updateTime varchar(50) not null,
|
||||||
port int not null,
|
port int not null,
|
||||||
expires int not null,
|
expires int not null,
|
||||||
hostAddress varchar(50) not null
|
hostAddress varchar(50) not null
|
||||||
|
@ -49,6 +51,8 @@ create table device_channel
|
||||||
deviceId varchar(50) not null,
|
deviceId varchar(50) not null,
|
||||||
parental varchar(50) null,
|
parental varchar(50) null,
|
||||||
hasAudio bit(1) null,
|
hasAudio bit(1) null,
|
||||||
|
createTime varchar(50) not null,
|
||||||
|
updateTime varchar(50) not null,
|
||||||
primary key (channelId, deviceId)
|
primary key (channelId, deviceId)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,16 @@ public class Device {
|
||||||
*/
|
*/
|
||||||
private int expires;
|
private int expires;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
}
|
}
|
||||||
|
@ -203,4 +213,20 @@ public class Device {
|
||||||
public void setExpires(int expires) {
|
public void setExpires(int expires) {
|
||||||
this.expires = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,16 @@ public class DeviceChannel {
|
||||||
* 云台类型描述字符串
|
* 云台类型描述字符串
|
||||||
*/
|
*/
|
||||||
private String PTZTypeText;
|
private String PTZTypeText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线/离线
|
* 在线/离线
|
||||||
|
@ -403,4 +413,20 @@ public class DeviceChannel {
|
||||||
public void setStreamId(String streamId) {
|
public void setStreamId(String streamId) {
|
||||||
this.streamId = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,15 @@ public interface DeviceChannelMapper {
|
||||||
|
|
||||||
@Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " +
|
@Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " +
|
||||||
"address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
|
"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}'," +
|
"VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," +
|
||||||
"'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " +
|
"'${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);
|
int add(DeviceChannel channel);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
"UPDATE device_channel " +
|
"UPDATE device_channel " +
|
||||||
"SET deviceId='${deviceId}'" +
|
"SET updateTime=datetime('now','localtime'))" +
|
||||||
"<if test=\"name != null\">, name='${name}'</if>" +
|
"<if test=\"name != null\">, name='${name}'</if>" +
|
||||||
"<if test=\"manufacture != null\">, manufacture='${manufacture}'</if>" +
|
"<if test=\"manufacture != null\">, manufacture='${manufacture}'</if>" +
|
||||||
"<if test=\"model != null\">, model='${model}'</if>" +
|
"<if test=\"model != null\">, model='${model}'</if>" +
|
||||||
|
|
|
@ -30,6 +30,8 @@ public interface DeviceMapper {
|
||||||
"expires," +
|
"expires," +
|
||||||
"registerTime," +
|
"registerTime," +
|
||||||
"keepaliveTime," +
|
"keepaliveTime," +
|
||||||
|
"createTime," +
|
||||||
|
"updateTime," +
|
||||||
"online" +
|
"online" +
|
||||||
") VALUES (" +
|
") VALUES (" +
|
||||||
"#{deviceId}," +
|
"#{deviceId}," +
|
||||||
|
@ -45,13 +47,15 @@ public interface DeviceMapper {
|
||||||
"#{expires}," +
|
"#{expires}," +
|
||||||
"#{registerTime}," +
|
"#{registerTime}," +
|
||||||
"#{keepaliveTime}," +
|
"#{keepaliveTime}," +
|
||||||
|
"datetime('now','localtime')," +
|
||||||
|
"datetime('now','localtime')," +
|
||||||
"#{online}" +
|
"#{online}" +
|
||||||
")")
|
")")
|
||||||
int add(Device device);
|
int add(Device device);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
"UPDATE device " +
|
"UPDATE device " +
|
||||||
"SET deviceId='${deviceId}'" +
|
"SET updateTime=datetime('now','localtime')" +
|
||||||
"<if test=\"name != null\">, name='${name}'</if>" +
|
"<if test=\"name != null\">, name='${name}'</if>" +
|
||||||
"<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" +
|
"<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" +
|
||||||
"<if test=\"model != null\">, model='${model}'</if>" +
|
"<if test=\"model != null\">, model='${model}'</if>" +
|
||||||
|
|
Binary file not shown.
|
@ -46,6 +46,10 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="registerTime" label="最近注册" align="center" width="140">
|
<el-table-column prop="registerTime" label="最近注册" align="center" width="140">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="updateTime" label="更新时间" align="center" width="140">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间" align="center" width="140">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="地址" width="180" align="center">
|
<el-table-column label="地址" width="180" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
|
|
Loading…
Reference in New Issue