heartbeat表的数据更新时间从MySQL自动生成调整为Logi-KM的时间

This commit is contained in:
zengqiao
2021-05-25 10:27:27 +08:00
parent da7ad8b44a
commit c977ce5690
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
* @author limeng
* @date 20/8/10
@@ -30,6 +32,7 @@ public class Heartbeat {
HeartbeatDO heartbeatDO = new HeartbeatDO();
heartbeatDO.setIp(NetUtils.localIp());
heartbeatDO.setHostname(NetUtils.localHostname());
heartbeatDO.setModifyTime(new Date());
heartbeatDao.replace(heartbeatDO);
} catch (Exception e) {
LOGGER.error("flush heartbeat failed.", e);