更新 HeartBeatService.java

pull/1/head
wangsiyuan 2023-12-14 10:52:46 +08:00
parent b64e124419
commit 941f10f9cc
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@ public class HeartBeatService {
logger.info("deviceInfoDAO: {}",deviceInfoDAO); logger.info("deviceInfoDAO: {}",deviceInfoDAO);
if (deviceInfoDAO == null) { if (deviceInfoDAO == null) {
// 设备信息不存在,可能是无效的设备 // 设备信息不存在,可能是无效的设备
logger.info("device not find,start add device to mysql.");
boolean isSuccess = addDeviceInfo(deviceInfo); boolean isSuccess = addDeviceInfo(deviceInfo);
if (isSuccess){ if (isSuccess){
return ServerResponseEntity.success(); return ServerResponseEntity.success();
@ -104,6 +105,7 @@ public class HeartBeatService {
* @return DeviceInfoDAO * @return DeviceInfoDAO
*/ */
private DeviceInfoDAO convertToDeviceInfoDAO(DeviceInfo deviceInfo) { private DeviceInfoDAO convertToDeviceInfoDAO(DeviceInfo deviceInfo) {
logger.info("start convert to device info dao");
// 这里需要实现将 DeviceInfo 转换为 DeviceInfoDAO 的逻辑 // 这里需要实现将 DeviceInfo 转换为 DeviceInfoDAO 的逻辑
// 示例代码(根据实际字段调整): // 示例代码(根据实际字段调整):
DeviceInfoDAO deviceInfoDAO = new DeviceInfoDAO(); DeviceInfoDAO deviceInfoDAO = new DeviceInfoDAO();