更新 MonitorService.java

pull/1/head
wangsiyuan 2023-12-15 10:38:59 +08:00
parent 4e4084e15d
commit 2bd7e21741
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ public class MonitorService {
long timeDifferenceMillis = currentTimeMillis - device.getLastOnlineTime(); long timeDifferenceMillis = currentTimeMillis - device.getLastOnlineTime();
long timeDifferenceSeconds = timeDifferenceMillis / 1000; long timeDifferenceSeconds = timeDifferenceMillis / 1000;
if (timeDifferenceSeconds > device.getTimeOutPeriod()) { if (timeDifferenceSeconds > device.getTimeOutPeriod()) {
logger.info("currentTimeMillis: {},device LastOnlineTime: {},时间差: {},设备超时时间: {}",currentTimeMillis, logger.info("Device offline. SN: {}, LastOnlineTime: {}, TimeDifference: {}, TimeoutPeriod: {}",
device.getLastOnlineTime(),timeDifferenceSeconds,device.getTimeOutPeriod()); device.getSN(), device.getLastOnlineTime(), timeDifferenceSeconds, device.getTimeOutPeriod());
updateStatus(device, 0); // 设备离线 updateStatus(device, 0); // 设备离线
logger.info("Update the device status to offline."); logger.info("Update the device status to offline.");
sendNotification(device); sendNotification(device);