This commit is contained in:
张成
2025-12-30 16:45:09 +08:00
parent fb9aa5b155
commit 914999c9fc
7 changed files with 47 additions and 17 deletions

View File

@@ -212,8 +212,6 @@ class MqttDispatcher {
return;
}
console.log(`[MQTT心跳] 收到设备 ${sn_code} 的心跳消息`);
// 移除 device_status 模型依赖
// const device_status = db.getModel('device_status');
// let device = await device_status.findByPk(sn_code);
@@ -286,7 +284,6 @@ class MqttDispatcher {
},
{ where: { sn_code } }
);
console.log(`[MQTT心跳] 设备 ${sn_code} 状态已更新到数据库 - 在线: true, 登录: ${updateData.isLoggedIn || false}`);
} catch (error) {
console.error(`[MQTT心跳] 更新数据库状态失败:`, error);
}