where('from', '2')->where('user_type', 0)->update(['user_type' => 1]); $normal = DB::table('users')->where('user_type', 1)->where(fn ($q) => $q->whereNull('from')->orWhere('from', '<>', '2'))->update(['user_type' => 0]); if ($guests || $normal) $this->info("游客 +{$guests},转正 {$normal}"); return self::SUCCESS; } }