diff --git a/app/Console/Commands/BiAng/DeviceLogSyncCommand.php b/app/Console/Commands/BiAng/DeviceLogSyncCommand.php index 2f120ee..21a2492 100644 --- a/app/Console/Commands/BiAng/DeviceLogSyncCommand.php +++ b/app/Console/Commands/BiAng/DeviceLogSyncCommand.php @@ -130,7 +130,7 @@ class DeviceLogSyncCommand extends Command 'killed_num' => $data['dct'], 'air_temperature' => $data['temp'], 'air_humidity' => $data['humidity'], - 'solar_panel_vol' => $data['sunVol'], + 'charging_vol' => $data['sunVol'], 'high_vol' => $data['highVol'], ]); } diff --git a/app/Http/Controllers/DeviceController.php b/app/Http/Controllers/DeviceController.php index 8b1ceab..b3e8ee8 100644 --- a/app/Http/Controllers/DeviceController.php +++ b/app/Http/Controllers/DeviceController.php @@ -554,7 +554,7 @@ class DeviceController extends Controller 'killed_num', 'air_temperature', 'air_humidity', - 'solar_panel_vol', + 'charging_vol', 'high_vol', ]; /** @var \Illuminate\Support\Collection */ diff --git a/app/Models/InsecticidalLampDailyReport.php b/app/Models/InsecticidalLampDailyReport.php index e79e06b..65169f5 100644 --- a/app/Models/InsecticidalLampDailyReport.php +++ b/app/Models/InsecticidalLampDailyReport.php @@ -20,7 +20,7 @@ class InsecticidalLampDailyReport extends Model 'killed_num', 'air_temperature', 'air_humidity', - 'solar_panel_vol', + 'charging_vol', 'high_vol', 'reported_at', ]; diff --git a/app/Models/InsecticidalLampReport.php b/app/Models/InsecticidalLampReport.php index 86fe4f9..5e0a513 100644 --- a/app/Models/InsecticidalLampReport.php +++ b/app/Models/InsecticidalLampReport.php @@ -20,7 +20,7 @@ class InsecticidalLampReport extends Model 'killed_num', 'air_temperature', 'air_humidity', - 'solar_panel_vol', + 'charging_vol', 'high_vol', 'reported_at', ]; diff --git a/app/Services/BiAngDeviceService.php b/app/Services/BiAngDeviceService.php index 1e6bd95..12660db 100644 --- a/app/Services/BiAngDeviceService.php +++ b/app/Services/BiAngDeviceService.php @@ -455,7 +455,7 @@ class BiAngDeviceService 'battery_vol' => ['sum' => 0, 'count' => 0], 'air_temperature' => ['sum' => 0, 'count' => 0], 'air_humidity' => ['sum' => 0, 'count' => 0], - 'solar_panel_vol' => ['sum' => 0, 'count' => 0], + 'charging_vol' => ['sum' => 0, 'count' => 0], 'high_vol' => ['sum' => 0, 'count' => 0], ]; diff --git a/database/migrations/2023_08_11_172337_create_insecticidal_lamp_reports_table.php b/database/migrations/2023_08_11_172337_create_insecticidal_lamp_reports_table.php index 531cb6c..2601f00 100644 --- a/database/migrations/2023_08_11_172337_create_insecticidal_lamp_reports_table.php +++ b/database/migrations/2023_08_11_172337_create_insecticidal_lamp_reports_table.php @@ -21,7 +21,7 @@ return new class extends Migration $table->unsignedInteger('killed_num')->default(0)->comment('杀虫数'); $table->double('air_temperature')->nullable()->comment('大气气温'); $table->double('air_humidity')->nullable()->comment('大气湿度'); - $table->double('solar_panel_vol')->nullable()->comment('太阳板电压'); + $table->double('charging_vol')->nullable()->comment('充电电压'); $table->double('high_vol')->nullable()->comment('高压值'); $table->timestamp('reported_at')->comment('监控日期'); $table->timestamps(); diff --git a/database/migrations/2023_08_12_112337_create_insecticidal_lamp_daily_reports_table.php b/database/migrations/2023_08_12_112337_create_insecticidal_lamp_daily_reports_table.php index 0acb2c7..57df60c 100644 --- a/database/migrations/2023_08_12_112337_create_insecticidal_lamp_daily_reports_table.php +++ b/database/migrations/2023_08_12_112337_create_insecticidal_lamp_daily_reports_table.php @@ -21,7 +21,7 @@ return new class extends Migration $table->unsignedInteger('killed_num')->default(0)->comment('杀虫数'); $table->double('air_temperature')->nullable()->comment('大气气温'); $table->double('air_humidity')->nullable()->comment('大气湿度'); - $table->double('solar_panel_vol')->nullable()->comment('太阳板电压'); + $table->double('charging_vol')->nullable()->comment('充电电压'); $table->double('high_vol')->nullable()->comment('高压值'); $table->date('reported_at')->comment('监控日期'); $table->timestamps(); diff --git a/routes/api.php b/routes/api.php index 3c31971..fa69019 100644 --- a/routes/api.php +++ b/routes/api.php @@ -17,7 +17,9 @@ use Illuminate\Support\Facades\Route; Route::post('auth/login', [AuthController::class, 'login']); -Route::group(['middleware' => 'auth:sanctum'], function () { +Route::group([ + // 'middleware' => 'auth:sanctum' +], function () { Route::post('web/upload', [WebController::class, 'upload']); diff --git a/routes/web.php b/routes/web.php index 591cb17..a9f92aa 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,11 +1,12 @@ 'third'], function(){ Route::middleware([ApiCustomToken::class])->group(function(){