getDb()->getAll("select user_id, first_type from `user_info` where isnull(first_account)"); foreach ($users as $user) { $account = $objUserBind->getAccountByUserId($user['user_id'], $user['first_type']); if ($account) { $objUser->updateObject(['first_account' => $account], ['user_id' => $user['user_id']]); $c += 1; } } $t = microtime(true) - $st; var_dump("处理{$c},耗时{$t}");