diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 7d212fcc..cddbc817 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -57,6 +57,46 @@ CREATE TABLE `t_user` ( ) 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` +-- + +DROP TABLE IF EXISTS `t_user_wallet_offline`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_wallet_offline` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `gold` int(11) NOT NULL DEFAULT '0' COMMENT '金币', + `diamond` int(11) 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_user_wallet_record` +-- + +DROP TABLE IF EXISTS `t_user_wallet_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_wallet_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `trans_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'trans_id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `gold` int(11) NOT NULL DEFAULT '0' COMMENT '金币', + `diamond` int(11) 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 `trans_id` (`trans_id`), + 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_hero` -- diff --git a/webapp/controller/BcUserController.class.php b/webapp/controller/BcUserController.class.php index 551f3a7b..05ffd1a8 100644 --- a/webapp/controller/BcUserController.class.php +++ b/webapp/controller/BcUserController.class.php @@ -28,10 +28,13 @@ class BcUserController extends BaseController { public function info() { - $account = getReqVal('account', ''); + $account = strtolower(getReqVal('account', '')); $token = getReqVal('token', ''); $gameId = 2006; $channel = BC_CHANNEL; + $accountId = phpcommon\createAccountId($channel, $gameId, $account); + $conn = myself()->_getMysql($accontId); + } }