Fix
parent
e0e9850812
commit
91f7b524fe
|
|
@ -102,6 +102,9 @@ class DeviceLogSyncCommand extends Command
|
|||
$data = $httpClient->getLatestSoilReport($device->sn);
|
||||
|
||||
if (empty($data)) {
|
||||
$device->update([
|
||||
'status' => DeviceStatus::Offline,
|
||||
]);
|
||||
$this->warn('设备数据为空');
|
||||
break;
|
||||
}
|
||||
|
|
@ -122,6 +125,9 @@ class DeviceLogSyncCommand extends Command
|
|||
$data = $httpClient->getLatestMeteorologicalReport($device->sn);
|
||||
|
||||
if (empty($data)) {
|
||||
$device->update([
|
||||
'status' => DeviceStatus::Offline,
|
||||
]);
|
||||
$this->warn('设备数据为空');
|
||||
break;
|
||||
}
|
||||
|
|
@ -142,6 +148,9 @@ class DeviceLogSyncCommand extends Command
|
|||
$data = $httpClient->getLatestLampReport($device->sn);
|
||||
|
||||
if (empty($data)) {
|
||||
$device->update([
|
||||
'status' => DeviceStatus::Offline,
|
||||
]);
|
||||
$this->warn('设备数据为空');
|
||||
break;
|
||||
}
|
||||
|
|
@ -167,6 +176,9 @@ class DeviceLogSyncCommand extends Command
|
|||
$data = $httpClient->getWormPhotos($device->sn, $now->copy()->subHours(24), $now);
|
||||
|
||||
if (empty($data)) {
|
||||
$device->update([
|
||||
'status' => DeviceStatus::Offline,
|
||||
]);
|
||||
$this->warn('设备数据为空');
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue