From 932f386805d434afcb2eabd8daac833ec7a72828 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Thu, 18 Dec 2025 15:28:11 +0800 Subject: [PATCH] update --- app/Console/Commands/UpdateCompany.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/UpdateCompany.php b/app/Console/Commands/UpdateCompany.php index 2b2dcac..4b5be0c 100755 --- a/app/Console/Commands/UpdateCompany.php +++ b/app/Console/Commands/UpdateCompany.php @@ -43,8 +43,8 @@ class UpdateCompany extends Command public function handle() { $user_id = $this->option('user_id'); - $updateLocal = (int) $this->option('address'); - $updateMarket = (int) $this->option('market'); + $updateLocal = (int)$this->option('address'); + $updateMarket = (int)$this->option('market'); // 更新公司信息 $this->compnay($user_id); // 更新经纬度信息(可选) @@ -72,7 +72,9 @@ class UpdateCompany extends Command // 批量更新(只更新有报名审核通过的用户) $users = User::whereHas('courseSigns', function ($query) { $query->where('status', 1); - })->whereNotNull('company_name')->get(); + })->whereNotNull('company_name') + ->whereNull('company_id') + ->get(); } $total = $users->count();