update 采集是判断设备重连以及监听设备断开链接的时间

This commit is contained in:
chenbo 2023-12-14 11:50:43 +08:00
parent 35068581a1
commit d28f12e0cf
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ class DataCollectController extends BaseApiController
$payload= json_decode($parmas['payload'], true);
// 如果该设备之前离线,现在重新上线则删除之前的设备离线记录
DeviceOffline::where('land_id', $land[3])->delete();
$device = explode('_', $parmas['topic']); // 命名规则topic_deviceid deviceid为设备主键id
$data = [
'land_id' => $land[3],