diff --git a/app/Console/Commands/BiAng/DeviceLogDailyReportCommand.php b/app/Console/Commands/BiAng/DeviceLogDailyReportCommand.php index 258ae0b..8990b64 100644 --- a/app/Console/Commands/BiAng/DeviceLogDailyReportCommand.php +++ b/app/Console/Commands/BiAng/DeviceLogDailyReportCommand.php @@ -10,7 +10,7 @@ use App\Models\MeteorologicalMonitoringDailyLog; use App\Models\MeteorologicalMonitoringLog; use App\Models\SoilMonitoringDailyLog; use App\Models\SoilMonitoringLog; -use App\Services\BiAngDeviceLogService; +use App\Services\BiAngDeviceService; use Illuminate\Console\Command; class DeviceLogDailyReportCommand extends Command @@ -118,7 +118,7 @@ class DeviceLogDailyReportCommand extends Command return; } - $service = new BiAngDeviceLogService(); + $service = new BiAngDeviceService(); /** @var \Carbon\Carbon */ $startAt = $lastReportedAt->copy()->startOfDay(); diff --git a/app/Console/Commands/BiAng/DeviceLogReportCommand.php b/app/Console/Commands/BiAng/DeviceLogReportCommand.php index 2233061..deef87a 100644 --- a/app/Console/Commands/BiAng/DeviceLogReportCommand.php +++ b/app/Console/Commands/BiAng/DeviceLogReportCommand.php @@ -7,7 +7,7 @@ use App\Models\Device; use App\Models\DeviceLog; use App\Models\MeteorologicalMonitoringLog; use App\Models\SoilMonitoringLog; -use App\Services\BiAngDeviceLogService; +use App\Services\BiAngDeviceService; use Illuminate\Console\Command; class DeviceLogReportCommand extends Command @@ -70,7 +70,7 @@ class DeviceLogReportCommand extends Command return; } - $service = new BiAngDeviceLogService(); + $service = new BiAngDeviceService(); /** @var \Carbon\Carbon */ $startAt = $lastReportedAt->copy()->startOfHour(); diff --git a/app/Console/Commands/BiAng/DeviceLogSyncCommand.php b/app/Console/Commands/BiAng/DeviceLogSyncCommand.php index 4c7827b..7b931a6 100644 --- a/app/Console/Commands/BiAng/DeviceLogSyncCommand.php +++ b/app/Console/Commands/BiAng/DeviceLogSyncCommand.php @@ -5,7 +5,7 @@ namespace App\Console\Commands\BiAng; use App\Enums\DeviceStatus; use App\Enums\DeviceType; use App\Models\Device; -use App\Services\BiAngDeviceLogService; +use App\Services\BiAngDeviceService; use Illuminate\Console\Command; use Throwable; @@ -76,7 +76,7 @@ class DeviceLogSyncCommand extends Command }); try { - (new BiAngDeviceLogService())->sync($device, $now->copy()); + (new BiAngDeviceService())->sync($device, $now->copy()); $this->info('同步成功!'); } catch (Throwable $e) { diff --git a/app/Services/BiAngDeviceLogService.php b/app/Services/BiAngDeviceService.php similarity index 99% rename from app/Services/BiAngDeviceLogService.php rename to app/Services/BiAngDeviceService.php index f05bb5d..d619307 100644 --- a/app/Services/BiAngDeviceLogService.php +++ b/app/Services/BiAngDeviceService.php @@ -17,7 +17,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; -class BiAngDeviceLogService +class BiAngDeviceService { public function sync(Device $device, Carbon $syncTime): void {