This commit is contained in:
aozhiwei 2022-03-27 18:51:21 +08:00
parent a5f962d8be
commit 7af50af9f7

View File

@ -21,11 +21,6 @@ use models\BuyRecord;
class BcUserController extends BaseController {
private function isTestMode()
{
return isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443 && SERVER_ENV == _TEST;
}
public function info()
{
$account = strtolower(getReqVal('account', ''));
@ -34,7 +29,32 @@ class BcUserController extends BaseController {
$channel = BC_CHANNEL;
$accountId = phpcommon\createAccountId($channel, $gameId, $account);
$conn = myself()->_getMysql($accontId);
$userRow = SqlHelper::ormSelect(
$conn,
't_user',
array(
'account_id' => $accountId,
));
$walletOfflineRow = SqlHelper::ormSelect(
$conn,
't_user_wallet_offline',
array(
'account_id' => $accountId,
));
$gold = 0;
$diamond = 0;
if ($userRow) {
$gold += $userRow['gold'];
$diamond += $userRow['diamond'];
}
if ($walletOfflineRow) {
$gold += $walletOfflineRow['gold'];
$diamond += $walletOfflineRow['diamond'];
}
myself()->_rspData(array(
'gold' => $gold,
'diamond' => $diamond
));
}
}