diff --git a/doc/BcUser.py b/doc/BcUser.py index 91d3da6f..c581585f 100644 --- a/doc/BcUser.py +++ b/doc/BcUser.py @@ -17,7 +17,7 @@ class BcUser(object): ], 'response': [ _common.RspHead(), - ['info',_common.BcUserInfo(), '用户信息'] + _common.BcUserInfo(), ] }, ] diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 4accd994..fdf9e98c 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -108,7 +108,8 @@ DROP TABLE IF EXISTS `t_hero`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t_hero` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `token_id` varchar(60) COMMENT 'token_id', + `account_id` varchar(60) COMMENT 'account_id', `hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄id', `hero_tili` int(11) NOT NULL DEFAULT '0' COMMENT '英雄体力', `state` int(11) NOT NULL DEFAULT '0' COMMENT '0:已购买 1:体验中', @@ -125,6 +126,7 @@ CREATE TABLE `t_hero` ( `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), + UNIQUE KEY `token_id` (`token_id`), KEY `account_id` (`account_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; @@ -160,13 +162,15 @@ DROP TABLE IF EXISTS `t_bag`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t_bag` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `token_id` varchar(60) COMMENT 'token_id', + `account_id` varchar(60) COMMENT 'account_id', `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', `item_num` int(11) NOT NULL DEFAULT '0' COMMENT '数量', `rand_attr` mediumblob COMMENT '随机属性', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), + UNIQUE KEY `token_id` (`token_id`), KEY `item_id` (`item_id`), KEY `account_id` (`account_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; @@ -181,7 +185,8 @@ DROP TABLE IF EXISTS `t_gun`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t_gun` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `token_id` varchar(60) COMMENT 'token_id', + `account_id` varchar(60) COMMENT 'account_id', `gun_id` int(11) NOT NULL DEFAULT '0' COMMENT '枪id', `state` int(11) NOT NULL DEFAULT '0' COMMENT '0:已购买 1:体验中', `gun_lv` int(11) NOT NULL DEFAULT '0' COMMENT '枪等级', @@ -194,6 +199,7 @@ CREATE TABLE `t_gun` ( `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), + UNIQUE KEY `token_id` (`token_id`), KEY `account_id` (`account_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/marketdb.sql b/sql/marketdb.sql index d2ebef53..d823f375 100644 --- a/sql/marketdb.sql +++ b/sql/marketdb.sql @@ -151,7 +151,7 @@ CREATE TABLE `t_withdrawal` ( `account` varchar(255) NOT NULL DEFAULT '' COMMENT 'account', `type` int(11) NOT NULL DEFAULT '0' COMMENT '货币类型 1:金币 2:钻石', `net_id` int(11) NOT NULL DEFAULT '0' COMMENT 'net_id', - `amount` bigint NOT NULL DEFAULT '0' COMMENT 'amount', + `amount` varchar(100) NOT NULL DEFAULT '' COMMENT 'amount', `state` int(11) NOT NULL DEFAULT '0' COMMENT 'state 0:等待上链 1:上链中2:上链成功 3:提现失败', `bc_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT '支付准备前块id', `bc_txhash` varchar(255) COMMENT 'bc_txhash', diff --git a/webapp/controller/BcUserController.class.php b/webapp/controller/BcUserController.class.php index b0d4ff77..6c6da23c 100644 --- a/webapp/controller/BcUserController.class.php +++ b/webapp/controller/BcUserController.class.php @@ -89,6 +89,7 @@ class BcUserController extends BaseController { } } myself()->_rspData(array( + 'account' => $account, 'gold' => $gold, 'diamond' => $diamond ));