fuliqi
2024-11-12 397eda7e04fd23016ba55b1b12af63bfeb00e482
ycl-server/src/main/java/com/ycl/utils/CheckPointUtil.java
@@ -71,6 +71,7 @@
        } else {
            map = new HashMap<>();
        }
        if (!monitor.getPingOnline()) {
            try {
                reachable = InetAddress.getByName(monitor.getIp()).isReachable(5000);
@@ -81,6 +82,10 @@
        }
        if (!monitor.getPingOnline()) {
            offLineTimes++;
            List<Date> offLineTime = monitor.getOffLineTime();
            if(CollectionUtils.isEmpty(offLineTime)) offLineTime = new ArrayList<>();
            offLineTime.add(new Date());
            monitor.setOffLineTime(offLineTime);
        }
        map.put("checkTimes", checkTimes);
        map.put("offLineTimes", offLineTimes);