objTable->getAll(['state' => Offer::STATUS_CLOSE], [ '_field' => 'id, game_id, player, transfer_trx_id', '_where' => "create_time<'{$t}'", ]); foreach ($offers as $v) { $data[$v['game_id']][$v['player']] = $v['transfer_trx_id']; } $sc = 0; $c = 0; foreach ($data as $gameId => $players) { foreach ($players as $player => $offerTrxId) { $c += 1; $ret = Eos::balance($gameId, $player, $offerTrxId); $resultTrxId = $ret['transaction_id']; if ($resultTrxId) { $objOffer->objTable->updateObject(['result_trx_id' => $resultTrxId], [ 'game_id' => $gameId, 'player' => $player, ]); $sc += 1; } } } $ct = microtime(true) - $st; Eos::log("找到{$c},处理{$sc},耗时{$ct}");