This commit is contained in:
aozhiwei 2022-06-06 14:34:38 +08:00
parent 8d54ad1c31
commit 42c2d9e811
2 changed files with 46 additions and 0 deletions

View File

@ -406,6 +406,25 @@ CREATE TABLE `t_transfer` (
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_user_wallet_offline_temp`
--
DROP TABLE IF EXISTS `t_user_wallet_offline_temp`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_user_wallet_offline_temp` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
`diamond` bigint NOT NULL DEFAULT '0' COMMENT '钻石',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_log`
--

View File

@ -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', '');