|
|
|
|
@ -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();
|
|
|
|
|
|