diff --git a/webapp/controller/BcUserController.class.php b/webapp/controller/BcUserController.class.php index 6c6da23c..dbe49974 100644 --- a/webapp/controller/BcUserController.class.php +++ b/webapp/controller/BcUserController.class.php @@ -22,6 +22,33 @@ use models\BuyRecord; class BcUserController extends BaseController { public function info() + { + $account = strtolower(getReqVal('account', '')); + $token = getReqVal('token', ''); + $gameId = 2006; + $channel = BC_CHANNEL; + $accountId = phpcommon\createAccountId($channel, $gameId, $account); + $conn = myself()->_getMarketMysql($accountId); + $row = SqlHelper::ormSelectOne( + $conn, + 't_user_wallet_offline_temp', + array( + 'account_id' => $accountId, + )); + + $gold = 0; + $diamond = 0; + if ($row) { + $gold = $row['gold']; + $diamond = $row['diamond']; + } + myself()->_rspData(array( + 'gold' => $gold, + 'diamond' => $diamond + )); + } + + private function old_info() { $account = strtolower(getReqVal('account', '')); $token = getReqVal('token', '');