From 5b28f7c55d166610262e25f8ecca10192d7c954f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 8 Jul 2024 15:30:39 +0800 Subject: [PATCH] 1 --- .../controller/TempToolsController.class.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 91dbf1ee..8d1b8e00 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -461,4 +461,40 @@ EOD; } } + public function exportBattleLog() + { + $accountConn = null; + { + $mysql_conf = getMysqlConfig(crc32('')); + if (SERVER_ENV == _ONLINE) { + $mysql_conf['database'] = 'accountdb_prod_1'; + } else { + $mysql_conf['database'] = 'accountdb1'; + } + $accountConn = new phpcommon\Mysql(array( + 'host' => $mysql_conf['host'], + 'port' => $mysql_conf['port'], + 'user' => $mysql_conf['user'], + 'passwd' => $mysql_conf['passwd'], + 'dbname' => $mysql_conf['database'], + )); + } + $data = file_get_contents('php://input'); + $array = explode("\r\n", $data); + foreach ($array as $accountId) { + $row = SqlHelper::ormSelectOne( + $accountConn, + 't_immutable_account', + array( + 'account_id' => $accountId + ) + ); + if (empty($row)) { + echo "\n"; + } else { + echo $row['address'] . "\n"; + } + } + } + }