From 675580afb856d313edb055b48e0d24b55273d233 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 10 Nov 2023 18:01:43 +0800 Subject: [PATCH 01/45] 1 --- webapp/controller/NftController.class.php | 4 ++++ webapp/models/Nft.php | 1 + 2 files changed, 5 insertions(+) diff --git a/webapp/controller/NftController.class.php b/webapp/controller/NftController.class.php index 15708e55..ee9ceaca 100644 --- a/webapp/controller/NftController.class.php +++ b/webapp/controller/NftController.class.php @@ -62,6 +62,10 @@ class NftController extends BaseAuthedController array_push($listInfo,$info); } break; + case Nft::EXPLORER_TYPE : { + array_push($listInfo,$info); + } + break; } } } diff --git a/webapp/models/Nft.php b/webapp/models/Nft.php index f9aae1a5..fcc6e88f 100644 --- a/webapp/models/Nft.php +++ b/webapp/models/Nft.php @@ -25,6 +25,7 @@ class Nft extends BaseModel const HONOR1_TYPE = 6; //荣誉 const GENESIS_TYPE = 7; //创世徽章 const PLANET_TYPE = 8; //星球 + const EXPLORER_TYPE = 9; //Explorer const RING_TYPE = 19; //戒指 const AVATAR_TYPE = 30; //装饰 From 25ce486b6fefce427d5cae9d49ce53611f37ab40 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 13 Nov 2023 16:23:20 +0800 Subject: [PATCH 02/45] 1 --- webapp/models/Nft.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/models/Nft.php b/webapp/models/Nft.php index fcc6e88f..3f44cc76 100644 --- a/webapp/models/Nft.php +++ b/webapp/models/Nft.php @@ -433,7 +433,8 @@ class Nft extends BaseModel self::HONOR1_TYPE, self::RING_TYPE, self::GENESIS_TYPE, - self::PLANET_TYPE + self::PLANET_TYPE, + self::EXPLORER_TYPE )); } From e108913c141e1e73099edfcd0db63e3c3359f49e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 22 Nov 2023 14:35:07 +0800 Subject: [PATCH 03/45] 1 --- sql/migrate/bcnftdb.sql | 140 ++++ sql/migrate/gamedb.sql | 1696 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1836 insertions(+) create mode 100644 sql/migrate/bcnftdb.sql create mode 100644 sql/migrate/gamedb.sql diff --git a/sql/migrate/bcnftdb.sql b/sql/migrate/bcnftdb.sql new file mode 100644 index 00000000..67546889 --- /dev/null +++ b/sql/migrate/bcnftdb.sql @@ -0,0 +1,140 @@ +-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64) +-- +-- Host: localhost Database: bcnft +-- ------------------------------------------------------ +-- Server version 5.5.41-MariaDB + +-- +-- Table structure for table `version` +-- + +DROP TABLE IF EXISTS `version`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `version` ( + `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `version` int(11) NOT NULL DEFAULT '0' COMMENT '版本号', + PRIMARY KEY (`idx`), + UNIQUE KEY `version` (`version`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_nft` +-- + +DROP TABLE IF EXISTS `t_nft`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_nft` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `owner_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'owner_address', + `creator_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'creator_address', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片 6:荣誉 7:徽章', + `token_state` int(11) NOT NULL DEFAULT '0' COMMENT '0:正常状态 1:出售中 2:出租中', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `deleted` int(11) NOT NULL DEFAULT '0' COMMENT 'deleted', + `confirm_count` int(11) NOT NULL DEFAULT '0' COMMENT 'confirm_count', + `confirm_block_number` bigint NOT NULL DEFAULT '0' COMMENT 'confirm_block_number', + `tags` varchar(60) NOT NULL DEFAULT '' COMMENT 'tags', + `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id', + `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `unikey` (`net_id`, `contract_address`, `token_id`), + KEY `owner_address_token_type` (`owner_address`, `token_type`), + KEY `owner_address_contract_address` (`owner_address`, `contract_address`), + KEY `owner_address` (`owner_address`) +) 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` +-- + +DROP TABLE IF EXISTS `t_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_log` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `type` varchar(255) NOT NULL DEFAULT '' COMMENT '日志类型', + `subtype` varchar(255) NOT NULL DEFAULT '' COMMENT '日志子类型', + `param1` mediumblob COMMENT 'param1', + `param2` mediumblob COMMENT 'param2', + `param3` mediumblob COMMENT 'param3', + `param4` mediumblob COMMENT 'param4', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_buy_record` +-- + +DROP TABLE IF EXISTS `t_buy_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_buy_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `blobdata` mediumblob COMMENT 'blobdata', + `buyer_address` mediumblob COMMENT 'buyer_address', + `order_id` varchar(60) COMMENT '订单id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `order_id` (`order_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_nft1155` +-- + +DROP TABLE IF EXISTS `t_nft1155`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_nft1155` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `owner_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'owner_address', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `balance` bigint NOT NULL DEFAULT '0' COMMENT '余额', + `item_uniid` bigint NOT NULL DEFAULT '0' COMMENT 'item_uniid', + `confirm_count` int(11) NOT NULL DEFAULT '0' COMMENT 'confirm_count', + `confirm_block_number` bigint NOT NULL DEFAULT '0' COMMENT 'confirm_block_number', + `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id', + `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `unikey` (`owner_address`, `contract_address`, `token_id`), + KEY `owner_address` (`owner_address`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_callback` +-- + +DROP TABLE IF EXISTS `t_callback`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_callback` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cb_uuid` varchar(60) COMMENT '年月日时分秒_进程id_自增id', + `params` mediumblob COMMENT '需要签名的字段(json不含签名)', + `signature` varchar(60) COMMENT 'signature', + `secret_key` varchar(60) COMMENT 'secret_key', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `cb_uuid` (`cb_uuid`), + KEY `signature` (`signature`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- Dump completed on 2015-08-19 18:51:22 diff --git a/sql/migrate/gamedb.sql b/sql/migrate/gamedb.sql new file mode 100644 index 00000000..59d04cdc --- /dev/null +++ b/sql/migrate/gamedb.sql @@ -0,0 +1,1696 @@ +-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64) +-- +-- Host: localhost Database: accountdb +-- ------------------------------------------------------ +-- Server version 5.5.41-MariaDB + +-- +-- Table structure for table `version` +-- + +DROP TABLE IF EXISTS `version`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `version` ( + `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `version` int(11) NOT NULL DEFAULT '0' COMMENT '版本号', + PRIMARY KEY (`idx`), + UNIQUE KEY `version` (`version`) +) 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` +-- + +DROP TABLE IF EXISTS `t_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel', + `address` varchar(60) COMMENT 'address', + `name` tinyblob COMMENT '用户名字', + `sex` int(11) NOT NULL DEFAULT '0' COMMENT '性别', + `head_id` int(11) NOT NULL DEFAULT '0' COMMENT '头像id', + `head_frame` int(11) NOT NULL DEFAULT '0' COMMENT '头像框id', + `level` int(11) NOT NULL DEFAULT '0' COMMENT '等级', + `exp` int(11) NOT NULL DEFAULT '0' COMMENT '经验', + `rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位', + `history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位', + `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分', + `history_best_score` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高积分', + `elo` int(11) NOT NULL DEFAULT '0' COMMENT '隐藏ELO积分', + `bceg` double NOT NULL DEFAULT '0' COMMENT '中心化代币', + `gold` double NOT NULL DEFAULT '0' COMMENT '金币', + `diamond` double NOT NULL DEFAULT '0' COMMENT '钻石', + `hero_id` bigint NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id', + `first_fight` int(11) NOT NULL DEFAULT '0' COMMENT '是否首战', + `last_season_id` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次赛季id', + `activated` int(11) NOT NULL DEFAULT '0' COMMENT '是否已激活', + `rename_count` int(11) NOT NULL DEFAULT '0' COMMENT '改名次数', + `activatetime` int(11) NOT NULL DEFAULT '0' COMMENT '激活时间', + `already_guide` int(11) NOT NULL DEFAULT '0' COMMENT '已引导', + `pve_instance_id` int(11) NOT NULL DEFAULT '0' COMMENT '已过pve副本id', + `like_count` int(11) NOT NULL DEFAULT '0' COMMENT '被点赞次数', + `head_list` mediumblob COMMENT '拥有的头像列表', + `head_frame_list` mediumblob COMMENT '拥有的头像框列表', + `consume_gold` bigint NOT NULL DEFAULT '0' COMMENT '消费金币数', + `score_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '积分修改时间', + `best_rank_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT 'bestrank修改时间', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + `last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '上次登录时间', + `is_gain_item` int(11) NOT NULL DEFAULT '0' COMMENT '是否获取免费item道具', + `guild_id` varchar(60) NOT NULL DEFAULT '' COMMENT '工会id', + `guild_job` int(11) NOT NULL DEFAULT '0' COMMENT '工会职位', + `guild_name` varchar(255) NOT NULL DEFAULT '' COMMENT '工会名称', + `parachute` int(11) NOT NULL DEFAULT '0' COMMENT '降落伞ID', + `ring_id` int(11) NOT NULL DEFAULT '0' COMMENT '戒指id', + `star_num` int(11) NOT NULL DEFAULT '0' COMMENT '星星数(成长任务)', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id` (`account_id`), + UNIQUE KEY `address` (`address`), + KEY `channel` (`channel`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_bigdata` +-- + +DROP TABLE IF EXISTS `t_bigdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_bigdata` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `type` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'type', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_type` (`account_id`, `type`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; +-- + +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` 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_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', + `txhash` varchar(100) NOT NULL DEFAULT '' COMMENT 'txhash', + `dir` int(11) NOT NULL DEFAULT '0' COMMENT 'dir', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `type` int(11) NOT NULL DEFAULT '0' COMMENT 'type', + `value` varchar(100) NOT NULL DEFAULT '' COMMENT 'value', + `state` int(11) NOT NULL DEFAULT '0' COMMENT 'state', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `txhash` (`txhash`), + 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` +-- + +DROP TABLE IF EXISTS `t_hero`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_hero` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增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` varchar(25) NOT NULL DEFAULT '0' COMMENT '英雄体力', + `state` int(11) NOT NULL DEFAULT '0' COMMENT '0:已购买 1:体验中', + `skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id', + `hero_lv` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级', + `quality` int(11) NOT NULL DEFAULT '0' COMMENT '品阶', + `skill_lv1` int(11) NOT NULL DEFAULT '0' COMMENT '必杀技等级', + `skill_lv2` int(11) NOT NULL DEFAULT '0' COMMENT '躲避技能等级', + `try_count` int(11) NOT NULL DEFAULT '0' COMMENT '剩余体验次数 当state=1时才有意义', + `advanced_count` int(11) NOT NULL DEFAULT '0' COMMENT '进阶次数', + `lock_type` int(11) NOT NULL DEFAULT '0' COMMENT '0:无锁 1:升级 2:升阶 3:悬赏', + `unlock_time` int(11) NOT NULL DEFAULT '0' COMMENT '解锁时间', + `unlock_trade_time` int(11) NOT NULL DEFAULT '0' COMMENT '出售解锁时间', + `rand_attr` mediumblob COMMENT '随机属性', + `today_get_gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', + `last_get_gold_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后获取金币的时间', + `today_pve_get_ceg` bigint NOT NULL DEFAULT '0' COMMENT 'pve金币', + `last_pve_get_ceg_time` bigint NOT NULL DEFAULT '0' COMMENT '最后pve获取金币的时间', + `today_mission_get_ceg` bigint NOT NULL DEFAULT '0' COMMENT '悬赏任务获得金币', + `last_mission_get_ceg_time` bigint NOT NULL DEFAULT '0' COMMENT '最后悬赏任务获取金币的时间', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + `active_token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'active_token_id', + `active_count` int(11) NOT NULL DEFAULT '0' COMMENT 'active_count', + `activate` int(11) NOT NULL DEFAULT '0' COMMENT '是否激活 1:已初始激活', + `base_attr` mediumblob 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 */; + +-- +-- Table structure for table `t_hero_skin` +-- + +DROP TABLE IF EXISTS `t_hero_skin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_hero_skin` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤id', + `hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄id', + `skin_state` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤状态 0=已经购,1 = 试用状态', + `get_from` int(11) NOT NULL DEFAULT '0' COMMENT '获得方式 0 = 系统赠送 1 = 金币购买', + `consume_num` int(11) NOT NULL DEFAULT '0' COMMENT '消耗货币的具体数量', + `try_expire_at` 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_skinid` (`account_id`, `skin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_bag` +-- + +DROP TABLE IF EXISTS `t_bag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_bag` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `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 '随机属性', + `today_get_gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', + `last_get_gold_time` 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 `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_bag` +-- + +-- +-- Table structure for table `t_chip` +-- + +DROP TABLE IF EXISTS `t_chip`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_chip` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `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 '1' COMMENT '数量', + `chip_grade` int(11) NOT NULL DEFAULT '1' COMMENT '芯片等级', + `chip_type` int(11) NOT NULL DEFAULT '1' COMMENT '1 攻击;2 防御;3 辅助', + `state` int(11) NOT NULL DEFAULT '0' COMMENT '0:已购买 1:免费(GIFT标签)', + `inlay_state` varchar(60) COMMENT '所镶嵌的芯片页id:1|2|3', + `rand_attr` mediumblob COMMENT '随机属性', + `active_token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'active_token_id', + `active_count` int(11) NOT NULL DEFAULT '0' COMMENT 'active_count', + `activate` int(11) NOT NULL DEFAULT '0' COMMENT '是否激活 1:已初始激活', + `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_gun` +-- + +DROP TABLE IF EXISTS `t_gun`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_gun` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增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 '枪等级', + `quality` int(11) NOT NULL DEFAULT '0' COMMENT '品阶', + `try_count` int(11) NOT NULL DEFAULT '0' COMMENT '剩余体验次数 当state=1时才有意义', + `lock_type` int(11) NOT NULL DEFAULT '0' COMMENT '0:无锁 1:升级 2:升阶 3:悬赏', + `unlock_time` int(11) NOT NULL DEFAULT '0' COMMENT '解锁时间', + `unlock_trade_time` int(11) NOT NULL DEFAULT '0' COMMENT '出售解锁时间', + `durability` varchar(25) NOT NULL DEFAULT '0' COMMENT '耐久', + `rand_attr` mediumblob COMMENT '随机属性', + `today_get_gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', + `last_get_gold_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后获取金币的时间', + `today_pve_get_ceg` bigint NOT NULL DEFAULT '0' COMMENT 'pve金币', + `last_pve_get_ceg_time` bigint NOT NULL DEFAULT '0' COMMENT '最后pve获取金币的时间', + `today_mission_get_ceg` bigint NOT NULL DEFAULT '0' COMMENT '悬赏任务获得金币', + `last_mission_get_ceg_time` bigint NOT NULL DEFAULT '0' COMMENT '最后悬赏任务获取金币的时间', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + `active_token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'active_token_id', + `active_count` int(11) NOT NULL DEFAULT '0' COMMENT 'active_count', + `activate` int(11) NOT NULL DEFAULT '0' COMMENT '是否激活 1:已初始激活', + 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 */; + +-- +-- Table structure for table `t_gun_skin` +-- + +DROP TABLE IF EXISTS `t_gun_skin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_gun_skin` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤ID', + `skin_state` int(11) NOT NULL DEFAULT '0' COMMENT '状态(0=已经购,1 = 试用状态)', + `try_expire_at` 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_skin_id` (`account_id`, `skin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_gun_talent` +-- + +DROP TABLE IF EXISTS `t_gun_talent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_gun_talent` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `talent_id` int(11) NOT NULL DEFAULT '0' COMMENT '技能ID', + `talent_lv` 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_talent_id` (`account_id`, `talent_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_dyndata` +-- + +DROP TABLE IF EXISTS `t_dyndata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_dyndata` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `x` int(11) NOT NULL DEFAULT '0' COMMENT 'x', + `y` int(11) NOT NULL DEFAULT '0' COMMENT 'y', + `val` bigint NOT NULL DEFAULT '0' COMMENT 'val', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_x_y` (`account_id`, `x`, `y`), + 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_shop_buy_record` +-- + +DROP TABLE IF EXISTS `t_shop_buy_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_shop_buy_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `this_day_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '今日购买次数', + `this_week_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '本周购买次数', + `total_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '总购买次数', + `last_buy_time` 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`), + KEY `account_id` (`account_id`), + UNIQUE KEY `account_id_item_id` (`account_id`, `item_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_mission` +-- + +DROP TABLE IF EXISTS `t_mission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_mission` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `mission_id` int(11) NOT NULL DEFAULT '0' COMMENT '任务id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`), + UNIQUE KEY `account_id_mission_id` (`account_id`, `mission_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_battle` +-- + +DROP TABLE IF EXISTS `t_battle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `battle_data` mediumblob COMMENT 'battle_data', + `kills_modifytime` 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_battle_record` +-- + +DROP TABLE IF EXISTS `t_battle_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `request` mediumblob COMMENT 'request', + `kills_modifytime` 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`), + 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_season` +-- + +DROP TABLE IF EXISTS `t_season`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_season` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `season_id` int(11) NOT NULL DEFAULT '0' COMMENT '赛季id', + `card_lv` int(11) NOT NULL DEFAULT '0' COMMENT '赛季手册等级', + `card_exp` int(11) NOT NULL DEFAULT '0' COMMENT '赛季手册经验', + `rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位', + `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分', + `elo` int(11) NOT NULL DEFAULT '0' COMMENT '隐藏ELO积分', + `history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位', + `gift_state1` int(11) NOT NULL DEFAULT '0' COMMENT '普通礼包购买状态 0:未购 1:已购', + `gift_buytime1` int(11) NOT NULL DEFAULT '0' COMMENT '普通礼包购买时间', + `gift_state2` int(11) NOT NULL DEFAULT '0' COMMENT '豪华礼包购买状态 0:未购 1:已购', + `gift_buytime2` int(11) NOT NULL DEFAULT '0' COMMENT '豪华礼包购买时间', + `battle_data` mediumblob COMMENT 'battle_data', + `kills_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '击杀修改时间', + `score_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '积分修改时间', + `best_rank_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT 'bestrank修改时间', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`), + UNIQUE KEY `account_id_season_id` (`account_id`, `season_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_season_card` +-- + +DROP TABLE IF EXISTS `t_season_card`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_season_card` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `season_id` int(11) NOT NULL DEFAULT '0' COMMENT '赛季id', + `type` int(11) NOT NULL DEFAULT '0' COMMENT '手册类型 1:普通 2:精英', + `card_lv` int(11) NOT NULL DEFAULT '0' COMMENT '赛季手册等级', + `reward_received` 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`), + KEY `account_id_season_id` (`account_id`, `season_id`), + UNIQUE KEY `account_id_season_id_type_card_lv` (`account_id`, `season_id`, `type`, `card_lv`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_used_name` +-- + +DROP TABLE IF EXISTS `t_used_name`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_used_name` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `name` tinyblob COMMENT '名字', + `name_base64` varchar(255) NOT NULL DEFAULT '' COMMENT '名字base64', + `key` varchar(60) NOT NULL DEFAULT '' COMMENT '应用key', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `name_base64_key` (`name_base64`, `key`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_drop_log` +-- + +DROP TABLE IF EXISTS `t_drop_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_drop_log` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `drop_source` varchar(60) NOT NULL DEFAULT '' COMMENT '掉落源', + `drop_id` varchar(60) NOT NULL DEFAULT '' COMMENT '掉落id', + `drop_items` mediumblob COMMENT '掉落的物品', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id_drop_source_drop_id` (`account_id`, `drop_source`, `drop_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_rank_activity` +-- + +DROP TABLE IF EXISTS `t_rank_activity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_rank_activity` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel', + `guild_id` varchar(60) NOT NULL DEFAULT '' COMMENT '工会id', + `wave` int(11) NOT NULL DEFAULT '0' COMMENT 'wave', + `type` int(11) NOT NULL DEFAULT '0' COMMENT 'type', + `value` double NOT NULL DEFAULT '0' COMMENT 'value', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_wave_type` (`account_id`, `wave`, `type`), + KEY `channel` (`channel`), + KEY `type` (`type`), + KEY `guild_id` (`guild_id`), + KEY `value` (`value`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_game_log` +-- + +DROP TABLE IF EXISTS `t_game_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_game_log` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `type` varchar(255) NOT NULL DEFAULT '' COMMENT '日志类型', + `subtype` varchar(255) NOT NULL DEFAULT '' COMMENT '日志子类型', + `param1` varchar(666) NOT NULL DEFAULT '' COMMENT 'param1', + `param2` varchar(666) NOT NULL DEFAULT '' COMMENT 'param2', + `param3` varchar(666) NOT NULL DEFAULT '' COMMENT 'param3', + `param4` varchar(666) NOT NULL DEFAULT '' COMMENT 'param4', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id_type_subtype` (`account_id`, `type`, `subtype`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- Dump completed on 2015-08-19 18:51:22 + +-- +-- Table structure for table `t_nft_active` +-- + +DROP TABLE IF EXISTS `t_nft_active`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_nft_active` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `uniid` varchar(255) NOT NULL DEFAULT '' COMMENT 'nft uniid', + `token_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'token id', + `daytime` int(11) NOT NULL DEFAULT '0' COMMENT '今天0点时间', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片 5:碎片箱子', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `uniid_daytime_type` (`uniid`, `daytime`,`token_type`), + KEY `account_id_token_type` (`account_id`,`token_type`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_fragment_pool` +-- + +DROP TABLE IF EXISTS `t_fragment_pool`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_fragment_pool` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `fragment_id` int(11) NOT NULL DEFAULT '0' COMMENT '碎片id', + `type` int(11) NOT NULL DEFAULT '0' COMMENT '0:pvp 1:pve', + `fragment_type` int(11) NOT NULL DEFAULT '0' COMMENT '碎片类型 0:英雄 1:武器', + `fragment_num` int(11) NOT NULL DEFAULT '0' COMMENT '剩余碎片数量', + `alloced_num` int(11) NOT NULL DEFAULT '0' COMMENT '已经分配的碎片数量', + `alloc_num` int(11) NOT NULL DEFAULT '0' COMMENT '分配的碎片数量', + `alloc_time` 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`), + KEY `alloc_time_type_fragment_type` (`alloc_time`, `type`, `fragment_type`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_fragment_record` +-- + +DROP TABLE IF EXISTS `t_fragment_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_fragment_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `param` int(11) NOT NULL DEFAULT '0' COMMENT 'param', + `value` 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`), + KEY `account_param` (`account_id`, `param`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_realtime_data` +-- + +DROP TABLE IF EXISTS `t_realtime_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_realtime_data` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `name` varchar(60) NOT NULL DEFAULT '' COMMENT '参数名', + `value1` varchar(60) NOT NULL DEFAULT '' COMMENT '值1', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_battle_settlement_single` +-- + +DROP TABLE IF EXISTS `t_battle_settlement_single`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle_settlement_single` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `battle_uuid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗记录唯一id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `room_uuid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'room_uuid', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_battle_uniid` (`account_id`, `battle_uuid`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_battle_settlement_team` +-- + +DROP TABLE IF EXISTS `t_battle_settlement_team`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle_settlement_team` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `battle_uuid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗记录唯一id', + `room_uuid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'room_id', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `battle_room_uuid` (`battle_uuid`, `room_uuid`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_battle_settlement_team` +-- + +DROP TABLE IF EXISTS `t_battle_input`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle_input` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `battle_uuid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗记录唯一id', + `room_uuid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'room_id', + `input` mediumblob COMMENT 'input', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `battle_room_uuid` (`battle_uuid`, `room_uuid`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_battle_history` +-- + +DROP TABLE IF EXISTS `t_battle_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle_history` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `battle_uniid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗记录唯一id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '用户 account_id', + `match_mode` int(11) NOT NULL DEFAULT '0' COMMENT '0: 匹配 pvp 1: 排位赛 2: pve', + `team_mode` int(11) NOT NULL DEFAULT '0' COMMENT '队伍模式 0:单人 1:组队', + `battle_rank` int(11) NOT NULL DEFAULT '0' COMMENT '战斗排名', + `team_rank` int(11) NOT NULL DEFAULT '0' COMMENT '团队排名', + `team_kills` int(11) NOT NULL DEFAULT '0' COMMENT '团队击杀数', + `gold` int(11) NOT NULL DEFAULT '0' COMMENT 'gold获得数', + `is_win` int(11) NOT NULL DEFAULT '0' COMMENT 'pve冒险是否胜利', + `kills` int(11) NOT NULL DEFAULT '0' COMMENT '击杀数', + `hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄 id', + `weapon1` int(11) NOT NULL DEFAULT '0' COMMENT '枪械1 id', + `weapon2` int(11) NOT NULL DEFAULT '0' COMMENT '枪械2 id', + `damage` int(11) NOT NULL DEFAULT '0' COMMENT '伤害', + `battle_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '战斗结束时间', + `current_level_class` varchar(60) NOT NULL DEFAULT '0' COMMENT '当前用户段位', + `current_level_class_score` int(11) NOT NULL DEFAULT '0' COMMENT '当前用户排位分', + `level_class_score_chg` int(11) NOT NULL DEFAULT '0' COMMENT '排位分改变', + `pve_rank_score` int(11) NOT NULL DEFAULT '0' COMMENT 'pve冒险积分', + `pve_kill_boss` int(11) NOT NULL DEFAULT '0' COMMENT 'pve冒险是否击杀BOSS', + `pve_instance_id` int(11) NOT NULL DEFAULT '0' COMMENT 'pve副本难度id', + `pve_instance_mode` int(11) NOT NULL DEFAULT '0' COMMENT 'pve副本mode', + `battle_foreign_key` int(11) NOT NULL DEFAULT '0' COMMENT '结算外键', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_battle_uniid` (`account_id`, `battle_uniid`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_guide_data` +-- + +DROP TABLE IF EXISTS `t_guide_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_guide_data` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `data` varchar(255) NOT NULL DEFAULT '' COMMENT '值1', + `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=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- Dump completed on 2015-08-19 18:51:22 + +-- +-- Table structure for table `t_user_season_ring` +-- + +DROP TABLE IF EXISTS `t_user_season_ring`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_season_ring` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_season_ranking` +-- + +DROP TABLE IF EXISTS `t_season_ranking`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_season_ranking` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `address` varchar(60) COMMENT 'address', + `channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel', + `rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位', + `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分', + `ranking` int(11) NOT NULL DEFAULT '0' COMMENT '排名', + `ranking_point` bigint NOT NULL DEFAULT '0' COMMENT '排名SV积分', + `season` 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_season` (`account_id`, `season`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_parachute` +-- + +DROP TABLE IF EXISTS `t_parachute`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_parachute` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_transaction` +-- + +DROP TABLE IF EXISTS `t_transaction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_transaction` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `address` varchar(60) NOT NULL DEFAULT '' COMMENT 'address', + `trans_id` varchar(255) NOT NULL DEFAULT '' COMMENT '事务id', + `action` int(11) NOT NULL DEFAULT '0' COMMENT 'action', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'token_type', + `item_uniid` bigint NOT NULL DEFAULT '0' COMMENT '道具uniid', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具num', + `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', + `result` int(11) NOT NULL DEFAULT '0' COMMENT 'result 0:失败 1:成功', + `client_confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'client_confirmed', + `client_result` mediumblob COMMENT 'client_result', + `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`), + KEY `address` (`address`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_transaction_prefee` +-- + +DROP TABLE IF EXISTS `t_transaction_prefee`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_transaction_prefee` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `trans_id` varchar(255) NOT NULL DEFAULT '' COMMENT '事务id', + `target_token_id` bigint NOT NULL DEFAULT '0' COMMENT 'target_token_id', + `target_token_type` bigint NOT NULL DEFAULT '0' COMMENT 'target_token_type', + `item_uniid` bigint NOT NULL DEFAULT '0' COMMENT '道具uniid', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `item_num` double NOT NULL DEFAULT '0' COMMENT '道具数量', + `done` int(11) NOT NULL DEFAULT '0' COMMENT 'done', + `state` int(11) NOT NULL DEFAULT '0' COMMENT 'state', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + 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_nft_up_event` +-- + +DROP TABLE IF EXISTS `t_nft_up_event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_nft_up_event` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `trans_id` varchar(255) NOT NULL DEFAULT '' COMMENT '事务id', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `value` int(11) NOT NULL DEFAULT '0' COMMENT 'value', + `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`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +DROP TABLE IF EXISTS `t_nft_up_receive`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_nft_up_receive` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `trans_id` varchar(255) NOT NULL DEFAULT '' COMMENT '事务id', + `token_id1` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id1', + `token_id2` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id2', + `state` int(11) NOT NULL DEFAULT '0' COMMENT '0进阶中,1可领取', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT '1英雄,2枪械', + `from_data` int(11) NOT NULL DEFAULT '0' COMMENT '0本地,1链', + `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`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_event_ranking` +-- + +DROP TABLE IF EXISTS `t_event_ranking`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_event_ranking` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `wave` int(11) NOT NULL DEFAULT '0' COMMENT 'wave', + `type` int(11) NOT NULL DEFAULT '0' COMMENT 'type', + `value` double NOT NULL DEFAULT '0' COMMENT 'value', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_wave_type` (`account_id`, `wave`, `type`), + KEY `value` (`value`) +) 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_currency` +-- + +DROP TABLE IF EXISTS `t_user_currency`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_currency` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `net_id` int(11) NOT NULL DEFAULT '0' COMMENT '链id', + `address` varchar(60) NOT NULL DEFAULT '' COMMENT '货币地址', + `symbol` varchar(10) NOT NULL DEFAULT '' COMMENT '符号', + `precision` int(11) NOT NULL DEFAULT '0' COMMENT '精度', + `type` int(11) NOT NULL DEFAULT '0' COMMENT '类型 1:ERC721 2:ERC1155 3:ERC20', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_net_address` (`account_id`, `net_id`, `address`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_emoji` +-- + +DROP TABLE IF EXISTS `t_emoji`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_emoji` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT 'itemID', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_item_id` (`account_id`, `item_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_use_emoji` +-- + +DROP TABLE IF EXISTS `t_user_use_emoji`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_use_emoji` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `value` varchar(255) NOT NULL DEFAULT '' COMMENT '选中表情itemID', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_chip_page` +-- + +DROP TABLE IF EXISTS `t_chip_page`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_chip_page` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `page_name` varchar(50) NOT NULL DEFAULT '' COMMENT '页名', + `page_id` int(11) NOT NULL DEFAULT '0' COMMENT '页id', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_page_id` (`account_id`, `page_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_preset` +-- + +DROP TABLE IF EXISTS `t_hero_preset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_hero_preset` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `hero_uid` bigint NOT NULL DEFAULT 0 COMMENT 'hero uniid', + `skill_id` int(11) NOT NULL DEFAULT 0 COMMENT '技能 item_id', + `weapon_uid1` bigint NOT NULL DEFAULT 0 COMMENT 'gun uniid1', + `weapon_uid2` bigint NOT NULL DEFAULT 0 COMMENT 'gun uniid2', + `chip_page` int(11) NOT NULL DEFAULT 0 COMMENT '芯片页id', + `createtime` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_rank_battle` +-- + +DROP TABLE IF EXISTS `t_rank_battle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_rank_battle` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel', + `type` int(11) NOT NULL DEFAULT '0' COMMENT 'type 1:场次榜 2:吃鸡榜 3:mvp榜 4:前三名榜 5:击杀榜', + `value` bigint NOT NULL DEFAULT '0' COMMENT 'value', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_type` (`account_id`, `type`), + KEY `channel` (`channel`), + KEY `type` (`type`), + KEY `value` (`value`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_mission_star` +-- + +DROP TABLE IF EXISTS `t_mission_star`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_mission_star` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `season_id` int(11) NOT NULL DEFAULT '0' COMMENT '成长任务赛季id', + `mission_id` int(11) NOT NULL DEFAULT '0' COMMENT '成长任务id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_season_mission_id` (`account_id`, `season_id`, `mission_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_sign_log` +-- + +DROP TABLE IF EXISTS `t_user_sign_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_sign_log` ( + `idx` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `days` int(10) DEFAULT '0' COMMENT '累计签到天数', + `sign_time` int(10) DEFAULT NULL COMMENT '签到时间', + `is_receive` tinyint(4) DEFAULT '0' COMMENT '是否领取奖励', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_first_topup` +-- + +DROP TABLE IF EXISTS `t_first_topup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_first_topup` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `address` varchar(60) COMMENT 'address', + `status1` int(11) NOT NULL DEFAULT '0' COMMENT '领取状态1 0 不能领取 1 可领取状态 2 已领取', + `status2` int(11) NOT NULL DEFAULT '0' COMMENT '领取状态2', + `status3` int(11) NOT NULL DEFAULT '0' COMMENT '领取状态3', + `createtime` int(11) NOT NULL COMMENT '首充时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_shop_buy_order` +-- + +DROP TABLE IF EXISTS `t_shop_buy_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_shop_buy_order` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单id', + `order_id` varchar(64) DEFAULT NULL COMMENT '订单id', + `address` varchar(60) NOT NULL COMMENT '账户地址', + `createtime` int(11) NOT NULL COMMENT '订单开始时间', + `id` int(11) NOT NULL COMMENT '商店货物id', + `item_id` int(11) NOT NULL COMMENT '道具id', + `goods_num` bigint(20) NOT NULL COMMENT '购买个数', + `status` int(11) NOT NULL COMMENT '订单状态 0-客户端申请了订单 1-订单完成 2-订单失败', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_id`) +) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_user_pass` +-- + +DROP TABLE IF EXISTS `t_user_pass`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_pass` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL COMMENT '账户id', + `season_id` int(11) NOT NULL DEFAULT '0' COMMENT '通行证赛季', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_season_id` (`account_id`, `season_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_bc_order` +-- + +DROP TABLE IF EXISTS `t_bc_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_bc_order` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `order_id` varchar(255) COMMENT '订单号', + `order_type` int(11) NOT NULL COMMENT '0:默认', + `account_id` varchar(60) NOT NULL COMMENT '账户id 只用做事后分析用', + `address` varchar(60) COMMENT 'address', + `currency_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'currency_name', + `status` int(11) NOT NULL DEFAULT '0' COMMENT '0: 支付中 1: 已发货', + `item_id` int(11) NOT NULL COMMENT '道具id', + `item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具数量', + `ext_data` mediumblob COMMENT '扩展数据自定义', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + `price` varchar(60) COLLATE utf8_bin NOT NULL COMMENT '价格', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_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_shop_dailyselection` +-- + +DROP TABLE IF EXISTS `t_shop_dailyselection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_shop_dailyselection` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `address` varchar(60) NOT NULL COMMENT 'address', + `refresh_mode` int(11) NOT NULL COMMENT '0-每日自动刷新时间 1-手动刷新时间', + `refresh_time` int(11) NOT NULL DEFAULT '0' COMMENT '刷新时间', + `grid_1` int(11) NOT NULL, + `grid_2` int(11) NOT NULL, + `grid_3` int(11) NOT NULL, + `grid_4` int(11) NOT NULL, + `grid_5` int(11) NOT NULL, + `grid_6` int(11) NOT NULL, + `count_1` tinyint(4) NOT NULL, + `count_2` tinyint(4) NOT NULL, + `count_3` tinyint(4) NOT NULL, + `count_4` tinyint(4) NOT NULL, + `count_5` tinyint(4) NOT NULL, + `count_6` tinyint(4) NOT NULL, + PRIMARY KEY (`idx`), + KEY `refresh_time` (`refresh_time`), + KEY `address` (`address`), + KEY `refresh_mode` (`refresh_mode`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +DROP TABLE IF EXISTS `t_shop_free_record`; +CREATE TABLE `t_shop_free_record` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL COMMENT '账号id', + `shop_id` int(11) NOT NULL COMMENT '商店id', + `id` int(11) NOT NULL COMMENT '货架id', + `goods_id` int(11) NOT NULL COMMENT '道具id', + `goods_num` int(11) NOT NULL COMMENT '道具数量', + `free_type` int(11) NOT NULL COMMENT '免费类型', + `free_num` int(11) NOT NULL COMMENT '免费数量', + `createtime` int(11) NOT NULL COMMENT '创建时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`), + KEY `createtime` (`createtime`), + KEY `id` (`id`), + KEY `goods_id` (`goods_id`) +) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `t_user_honor` +-- + +DROP TABLE IF EXISTS `t_user_honor`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user_honor` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `address` varchar(60) NOT NULL COMMENT '钱包地址', + `honor1` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型6 1:佩戴', + `honor2` int(11) NOT NULL DEFAULT '0' COMMENT 'honor2', + `honor3` int(11) NOT NULL DEFAULT '0' COMMENT 'honor3', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `address` (`address`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_orderid` +-- + +DROP TABLE IF EXISTS `t_orderid`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_orderid` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `request` mediumblob COMMENT 'request', + `confirmed` 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`), + 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_inapp_record` +-- + +DROP TABLE IF EXISTS `t_inapp_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_inapp_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `amount` double NOT NULL DEFAULT '0' COMMENT '充值总额', + `buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '充值次数', + `amount_ok` double NOT NULL DEFAULT '0' COMMENT '充值成功总额', + `buy_ok_times` int(11) NOT NULL DEFAULT '0' COMMENT '充值成功次数', + `daytime` 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`), + 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_inapp_order` +-- + +DROP TABLE IF EXISTS `t_inapp_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_inapp_order` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id', + `sp_order_id` varchar(64) DEFAULT NULL COMMENT 'app store order_id', + `platform` int(11) NOT NULL DEFAULT '0' COMMENT '0: ios 1: android', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '申请账号id', + `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id', + `price` double NOT NULL DEFAULT '0' COMMENT '价格', + `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_id`), + UNIQUE KEY `platform_sp_order_id` (`platform`, `sp_order_id`), + KEY `account_id` (`account_id`), + KEY `sp_order_id` (`sp_order_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_outapp_order` +-- + +DROP TABLE IF EXISTS `t_outapp_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_outapp_order` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id', + `sp_order_id` varchar(64) DEFAULT NULL COMMENT 'app store order_id', + `platform` int(11) NOT NULL DEFAULT '0' COMMENT '0: ios 1: android', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '申请账号id', + `address` varchar(60) DEFAULT NULL COMMENT '申请时账号绑定的钱包', + `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id', + `price` double NOT NULL DEFAULT '0' COMMENT '价格', + `params` mediumblob COMMENT 'params', + `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_id`), + UNIQUE KEY `platform_sp_order_id` (`platform`, `sp_order_id`), + KEY `account_id` (`account_id`), + KEY `address` (`address`), + KEY `sp_order_id` (`sp_order_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_mall` +-- + +DROP TABLE IF EXISTS `t_mall`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_mall` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', + `goods_uuid` varchar(255) NOT NULL DEFAULT '' COMMENT '商品uuid', + `seller` varchar(60) NOT NULL DEFAULT '' COMMENT 'seller', + `seller_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'seller_address', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id', + `item_num` bigint NOT NULL DEFAULT '0' COMMENT '物品数量', + `currency` varchar(60) NOT NULL COMMENT 'currency', + `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', + `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', + `last_buy_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次购买时间', + `last_buyer` varchar(60) NOT NULL DEFAULT '' COMMENT '最后一次购买者', + `last_modify_price_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次修改价格事件', + `buyer` varchar(60) NOT NULL DEFAULT '' COMMENT '购买成功者', + `buy_ok_time` 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`), + KEY `seller` (`seller`), + KEY `seller_address` (`seller_address`), + KEY `price` (`price`), + UNIQUE KEY `order_id` (`order_id`), + UNIQUE KEY `goods_uuid` (`goods_uuid`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_market` +-- + +DROP TABLE IF EXISTS `t_market`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_market` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id', + `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', + `token_id` varchar(60) NOT NULL COMMENT 'token_id', + `seller` varchar(60) NOT NULL COMMENT 'owner', + `buyer` varchar(60) NOT NULL COMMENT 'owner', + `nft_token` varchar(60) NOT NULL COMMENT 'nft_token', + `amount` varchar(255) NOT NULL DEFAULT '' COMMENT 'amount', + `currency` varchar(60) NOT NULL COMMENT 'currency', + `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', + `update_price` varchar(255) COMMENT 'update_price', + `update_time` int(11) COMMENT 'update_time', + `c_name` varchar(32) NOT NULL DEFAULT '' COMMENT '缓存-名称', + `c_job` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-职业', + `c_type` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-碎片类型', + `c_lv` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-级别', + `c_quality` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-品阶', + `c_durability` float NOT NULL DEFAULT '0' COMMENT '缓存-能量', + `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', + `activated` int(11) NOT NULL DEFAULT '0' COMMENT 'activated', + `selltime` int(11) COMMENT 'selltime', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_id`), + KEY `seller_activated` (`seller`, `activated`), + KEY `activated` (`activated`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +DROP TABLE IF EXISTS `t_web2_order`; +CREATE TABLE `t_web2_order` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `status` int(11) NOT NULL COMMENT '订单状态 0-客户端申请了订单 1-订单完成 2-订单失败', + `order_id` varchar(64) DEFAULT NULL COMMENT '订单id', + `createtime` datetime NOT NULL COMMENT '创建时间', + `account_id` varchar(64) NOT NULL COMMENT '申请账号id', + `address` varchar(64) DEFAULT NULL COMMENT '申请时账号绑定的钱包', + `item_id` int(11) NOT NULL COMMENT '物品id', + `item_num` bigint(20) NOT NULL COMMENT '物品数量', + `id` int(11) NOT NULL COMMENT '商店中的配置id,', + `goods_num` bigint(20) NOT NULL COMMENT '购买商品个数', + `price` varchar(64) DEFAULT NULL COMMENT '价格', + `ext_data` mediumblob COMMENT '扩展自定义数据', + `channel` varchar(64) DEFAULT NULL COMMENT 'google or apple', + `out_order_id` varchar(64) DEFAULT NULL COMMENT 'app store order_id', + PRIMARY KEY (`idx`), + UNIQUE KEY `order_id` (`order_id`), + KEY `out_order_id` (`out_order_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `t_market_store`; +CREATE TABLE `t_market_store` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `order_id` varchar(64) DEFAULT NULL COMMENT '订单id', + `o_link` varchar(64) DEFAULT NULL COMMENT '关联的链上上架单号', + `status` int(11) NOT NULL COMMENT '订单状态 0:出售中 1:已下架 2:已售出 3:购买中', + `owner_address` varchar(60) NOT NULL COMMENT '当前拥有者', + `token_id` varchar(60) DEFAULT NULL COMMENT 'token_id', + `nft_token` varchar(64) DEFAULT NULL COMMENT 'nftToken', + `token_type` int(11) NOT NULL COMMENT 'nft类型 1:英雄 2:枪支 3:芯片', + `item_id` int(11) DEFAULT NULL COMMENT '特殊字段,用于标记中心化道具,用于交易金币', + `amount` bigint(20) NOT NULL DEFAULT '1' COMMENT '堆叠数量', + `createtime` int(11) NOT NULL COMMENT '创建时间(上架时间)', + `modifytime` int(11) NOT NULL COMMENT '修改时间(更新价格等)', + `buytime` int(11) DEFAULT NULL COMMENT '开始购买的时间', + `s_currency` varchar(64) DEFAULT NULL COMMENT '出售时选择的币种地址', + `s_price` varchar(64) NOT NULL COMMENT '出售价格', + `c_name` varchar(32) NOT NULL COMMENT '缓存-名称', + `c_job` int(11) NOT NULL COMMENT '缓存-职业', + `c_type` int(11) NOT NULL COMMENT '缓存-碎片类型', + `c_lv` int(11) NOT NULL COMMENT '缓存-级别', + `c_quality` int(11) NOT NULL COMMENT '缓存-品阶', + `c_durability` float NOT NULL COMMENT '缓存-能量', + `c_id` int(11) NOT NULL COMMENT '缓存-id', + PRIMARY KEY (`idx`) USING BTREE, + UNIQUE KEY `idx` (`idx`), + UNIQUE KEY `o_link` (`o_link`) USING BTREE, + UNIQUE KEY `order_id` (`order_id`) USING BTREE, + KEY `owner_address` (`owner_address`), + KEY `token_id` (`token_id`), + KEY `createtime` (`createtime`), + KEY `s_currency` (`s_currency`), + KEY `s_price` (`s_price`), + KEY `c_name` (`c_name`), + KEY `c_job` (`c_job`), + KEY `c_lv` (`c_lv`), + KEY `c_quality` (`c_quality`), + KEY `c_durability` (`c_durability`), + KEY `c_id` (`c_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10048 DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `t_market_transaction_record`; +CREATE TABLE `t_market_transaction_record` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `createtime` int(11) NOT NULL COMMENT '交易成功时间', + `order_id` varchar(64) NOT NULL DEFAULT '0' COMMENT '订单id', + `o_link` varchar(64) NOT NULL COMMENT '合约订单id', + `seller` varchar(60) NOT NULL COMMENT '卖家', + `buyer` varchar(60) NOT NULL COMMENT '买家', + `token_id` varchar(60) NOT NULL COMMENT 'tokenid', + `item_id` int(11) DEFAULT NULL COMMENT '如果有,说明是中心化道具交易', + `amount` bigint(20) NOT NULL COMMENT '堆叠数量', + `name` varchar(64) NOT NULL COMMENT '商品名称', + `type` int(11) NOT NULL COMMENT '商品类型', + PRIMARY KEY (`idx`), + KEY `createtime` (`createtime`), + KEY `seller` (`seller`), + KEY `buyer` (`buyer`), + KEY `o_link` (`o_link`), + KEY `order_id` (`order_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10002 DEFAULT CHARSET=utf8; + + + +-- +-- Table structure for table `t_crystal_exchange_record` +-- + +DROP TABLE IF EXISTS `t_crystal_exchange_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_crystal_exchange_record` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `address` varchar(60) COMMENT 'address', + `period` int(11) NOT NULL DEFAULT '0' COMMENT '第几期', + `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `item_num` bigint NOT NULL DEFAULT '0' COMMENT '道具数量', + `createtime` int(11) NOT NULL COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_power_exchange_record` +-- + +DROP TABLE IF EXISTS `t_power_exchange_record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_power_exchange_record` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `address` varchar(60) COMMENT 'address', + `period` int(11) NOT NULL DEFAULT '0' COMMENT '第几期', + `item_num1` int(11) NOT NULL DEFAULT '0' COMMENT '晶体道具260001兑换算力数量', + `item_num2` int(11) NOT NULL DEFAULT '0' COMMENT '晶体道具260002兑换算力数量', + `item_num3` int(11) NOT NULL DEFAULT '0' COMMENT '晶体道具260003兑换算力数量', + `item_num4` int(11) NOT NULL DEFAULT '0' COMMENT '晶体道具260004兑换算力数量', + `total_num` double NOT NULL DEFAULT '0' COMMENT '算力总量', + `createtime` int(11) NOT NULL COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_computing_power_period` +-- + +DROP TABLE IF EXISTS `t_computing_power_period`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_hash_rate_reward` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `address` varchar(60) COMMENT 'address', + `period` int(11) NOT NULL DEFAULT '0' COMMENT '第几期', + `power` varchar(60) COMMENT '算力', + `reward_cec` varchar(60) COMMENT 'reward cec', + `reward1` int(11) NOT NULL DEFAULT '0' COMMENT '第1周奖励', + `reward2` int(11) NOT NULL DEFAULT '0' COMMENT '第2周奖励', + `reward3` int(11) NOT NULL DEFAULT '0' COMMENT '第3周奖励', + `reward4` int(11) NOT NULL DEFAULT '0' COMMENT '第4周奖励', + `txHash1` varchar(60) NOT NULL DEFAULT '' COMMENT '地址1', + `txHash2` varchar(60) NOT NULL DEFAULT '' COMMENT '地址2', + `txHash3` varchar(60) NOT NULL DEFAULT '' COMMENT '地址3', + `txHash4` varchar(60) NOT NULL DEFAULT '' COMMENT '地址4', + + `createtime` int(11) NOT NULL COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE TABLE `t_ranking_settlement_record` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `state` int(11) NOT NULL DEFAULT '0' COMMENT '是否重置', + `last_rank` int(11) NOT NULL DEFAULT '0' COMMENT '上赛季段位', + `current_rank` int(11) NOT NULL DEFAULT '0' COMMENT '新段位', + `last_score` int(11) NOT NULL DEFAULT '0' COMMENT '上赛季段位分', + `current_score` int(11) NOT NULL DEFAULT '0' COMMENT '新段位分', + `awards` mediumblob COMMENT '奖励', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + + +CREATE TABLE `t_staking` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', + `address` varchar(60) NOT NULL DEFAULT '' COMMENT 'address', + `order_id` varchar(60) COMMENT 'order_id', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `item_id` int(11) NOT NULL COMMENT 'item_id', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片 6:荣誉 7:徽章', + `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id', + `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address', + `stacked_num` varchar(60) NOT NULL DEFAULT '' COMMENT 'stacked_num', + `start_time` bigint NOT NULL DEFAULT '0' COMMENT '质押开始时间', + `stake_time` bigint NOT NULL DEFAULT '0' COMMENT '质押结束时间', + `redeem_time` bigint NOT NULL DEFAULT '0' COMMENT '赎回时间', + `status` int(11) NOT NULL COMMENT '0:质押中 1:已解押', + `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash', + `nft_type` int(11) NOT NULL COMMENT '', + `nft_reward` double NOT NULL DEFAULT '0' COMMENT '利息', + `createtime` int(11) NOT NULL COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `unikey1` (`token_id`, `contract_address`, `net_id`, `start_time`), + UNIQUE KEY `unikey2` (`token_id`, `contract_address`, `net_id`, `order_id`), + KEY `address` (`address`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `t_mail` +-- + +DROP TABLE IF EXISTS `t_mail`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_mail` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `mailid` bigint NOT NULL DEFAULT '0' COMMENT '邮件id', + `confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'confirmed', + `attachments` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '附件', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + KEY `account_id_mailid` (`account_id`, `mailid`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `t_avatar` +-- + +DROP TABLE IF EXISTS `t_avatar`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_avatar` ( + `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', + `item_id` int(11) NOT NULL COMMENT 'item_id', + `item_type` int(11) NOT NULL COMMENT 'item类型', + `status` int(11) NOT NULL DEFAULT '0' COMMENT '装备状态', + `hero_idx` bigint DEFAULT NULL COMMENT '英雄外键id', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `hero_idx_type` (`hero_idx`, `item_type`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; \ No newline at end of file From ba90c85676e49a91f21127d831183aec5a8682fe Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 15 Dec 2023 16:10:16 +0800 Subject: [PATCH 04/45] 1 --- webapp/controller/UserController.class.php | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index eed7d673..3d10dd30 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -116,22 +116,22 @@ class UserController extends BaseAuthedController { } } -// if (SERVER_ENV == _TEST) { -// -// array_push($addItems, -// array( -// 'item_id' => V_ITEM_GOLD, -// 'item_num' => 500000 -// )); -// $itemIds = array(30100,30200,30300,30400,30500,30600,30700,30800,30900,31000,40702,40902,40102); -// foreach ($itemIds as $row){ -// array_push($addItems, -// array( -// 'item_id' => $row, -// 'item_num' => 1 -// )); -// } -// } + if (defined('PRESENT_FREE_ITEM')) { + + array_push($addItems, + array( + 'item_id' => V_ITEM_GOLD, + 'item_num' => 500000 + )); + $itemIds = array(30100,30200,30300,30400,30500,30600,30700,30800,30900,31000,40702,40902,40102); + foreach ($itemIds as $row){ + array_push($addItems, + array( + 'item_id' => $row, + 'item_num' => 1 + )); + } + } $awardService = new services\AwardService(); $propertyChgService = new services\PropertyChgService(); From f47f7334102564dc64f8f6aa2f96eccfb2857cbd Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 25 Dec 2023 19:26:21 +0800 Subject: [PATCH 05/45] 1 --- doc/Match.py | 23 +++++++++++++++++++++++ doc/_common.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 doc/Match.py diff --git a/doc/Match.py b/doc/Match.py new file mode 100644 index 00000000..6e32a387 --- /dev/null +++ b/doc/Match.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +import _common + +class Match(object): + + def __init__(self): + self.apis = [ + { + 'name': 'getMatchInfo', + 'desc': '获取匹配信息', + 'group': 'Match', + 'url': 'webapp/index.php?c=Match&a=getMatchInfo', + 'params': [ + _common.ReqHead(), + ['team_uuid', '', '队伍唯一id'], + ], + 'response': [ + _common.RspHead(), + ['info', _common.MatchInfo(), '队伍唯一id'], + ] + } + ] diff --git a/doc/_common.py b/doc/_common.py index 66cbe777..74affbb7 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1527,3 +1527,45 @@ class BattleTeam(object): ['team_uuid','','队伍唯一id'], ['!members', BattleData(), '成员数据'], ] + +class MatchMember(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['address', '', 'openid'], + ['name', '', '用户名字'], + ['hero_uniId', 0, 'hero uniid'], + ['hero_id', 0, 'hero itemId'], + ['hero_skin', 0, '英雄皮肤 itemId'], + ['head_id', 0, '头像id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['rank', 0, '段位'], + ['pve_instance_id', 0, 'pve难度id'], + ['parachute', 0, '降落伞id'], + ['presetInfo', HeroPreset(), '备战信息'], + ['game_times', 0, '游戏次数'], + ['win_times', 0, '胜利次数'], + ['kills', 0, '击杀数'], + ['is_leader', 0, '是否队长'], + ['is_ready', 0, '是否准备'], + ['permission', 0, '邀请许可'], + ['createtime', 0, '账号创建时间'], + ] + +class MatchTeam(object): + + def __init__(self): + self.fields = [ + ['team_uuid','','队伍唯一id'], + ['!members', BattleData(), '成员数据'], + ] + +class MatchInfo(object): + + def __init__(self): + self.fields = [ + ['state',0,'状态 0:匹配中 1:匹配成功'], + ['!team_list', MatchTeam(), '队伍列表(客户端自行判断所属哪个队伍)'], + ] From fc404c7e4dfc0d86767527704bc2add4056d643e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 25 Dec 2023 19:27:14 +0800 Subject: [PATCH 06/45] 1 --- doc/Match.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/Match.py b/doc/Match.py index 6e32a387..85076743 100644 --- a/doc/Match.py +++ b/doc/Match.py @@ -19,5 +19,18 @@ class Match(object): _common.RspHead(), ['info', _common.MatchInfo(), '队伍唯一id'], ] + }, + { + 'name': 'cancel', + 'desc': '取消匹配', + 'group': 'Match', + 'url': 'webapp/index.php?c=Match&a=cancel', + 'params': [ + _common.ReqHead(), + ['team_uuid', '', '队伍唯一id'], + ], + 'response': [ + _common.RspHead(), + ] } ] From 3bbe10dcd7461eca3f0c9e141acafb9a09037fce Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 10:58:24 +0800 Subject: [PATCH 07/45] 1 --- webapp/controller/MatchController.class.php | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 webapp/controller/MatchController.class.php diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php new file mode 100644 index 00000000..4d49e12f --- /dev/null +++ b/webapp/controller/MatchController.class.php @@ -0,0 +1,42 @@ +_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspErr(1, 'The team has been disbanded'); + return; + } + $r->pexpire(TEAMID_KEY . $teamUuid, 1000*600); + $this->_rspData(array( + 'team_info' => $teamDb + )); + } + +} From df57bbdec392d9a821f5fa7e0c0265f5fe5ee29d Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 11:38:47 +0800 Subject: [PATCH 08/45] 1 --- doc/Match.py | 2 +- webapp/controller/MatchController.class.php | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/Match.py b/doc/Match.py index 85076743..abcccf65 100644 --- a/doc/Match.py +++ b/doc/Match.py @@ -17,7 +17,7 @@ class Match(object): ], 'response': [ _common.RspHead(), - ['info', _common.MatchInfo(), '队伍唯一id'], + ['info', _common.MatchInfo(), '匹配信息'], ] }, { diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 4d49e12f..f5a9afc4 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -24,7 +24,7 @@ use models\HeroSkin; class MatchController extends BaseAuthedController { - public function teamInfo() + public function getMatchInfo() { $teamUuid = getReqVal('team_uuid', ''); $r = $this->_getRedis($teamUuid); @@ -39,4 +39,14 @@ class MatchController extends BaseAuthedController { )); } + public function cancel() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (!empty($teamDb)) { + } + $this->_rspOk(); + } + } From a3ff4562627ea387bf60b2b78e64dc02357a19d7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 13:40:29 +0800 Subject: [PATCH 09/45] 1 --- webapp/bootstrap/constant.php | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index 76458d5d..ff8a3732 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -6,6 +6,7 @@ define('DAILY_SELECTION_KEY', 'game2006api:daily_selection:'); define('PLANET_BUY_KEY', 'game2006api:planet_buy:'); define('LAST_SESSION_KEY', 'last_session:'); +define('MATCH_KEY', 'match:'); define('V_ITEM_GOLD', 10001); //金币 define('V_ITEM_DIAMOND', 10014); //钻石 From e61198c2a87631b7f316230accd53996c641aaa4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 13:54:37 +0800 Subject: [PATCH 10/45] 1 --- webapp/bootstrap/constant.php | 2 +- webapp/controller/MatchController.class.php | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index ff8a3732..8d053a81 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -6,7 +6,7 @@ define('DAILY_SELECTION_KEY', 'game2006api:daily_selection:'); define('PLANET_BUY_KEY', 'game2006api:planet_buy:'); define('LAST_SESSION_KEY', 'last_session:'); -define('MATCH_KEY', 'match:'); +define('MATCH_CURRENT_TEAM_KEY', 'match:current_team:'); define('V_ITEM_GOLD', 10001); //金币 define('V_ITEM_DIAMOND', 10014); //钻石 diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index f5a9afc4..2938b405 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -13,7 +13,6 @@ require_once('mt/StarLevel.php'); require_once('services/PropertyChgService.php'); - use phpcommon\SqlHelper; use models\User; use models\Hero; @@ -49,4 +48,24 @@ class MatchController extends BaseAuthedController { $this->_rspOk(); } + private function readTeamDb($r, $teamUuid) + { + $teamDbStr = $r->get(TEAMID_KEY . $teamUuid); + if (empty($teamDbStr)) { + return null; + } + $teamDb = json_decode($teamDbStr, true); + return $teamDb; + } + + private function readCurrMatchTeam($r) + { + $teamDbStr = $r->get(MATCH_CURRENT_TEAM_KEY . $teamUuid); + if (empty($teamDbStr)) { + return null; + } + $teamDb = json_decode($teamDbStr, true); + return $teamDb; + } + } From 69fd8c5bd0bed0ef45a54e0a41661d66dbbd1ce1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 14:23:50 +0800 Subject: [PATCH 11/45] 1 --- webapp/bootstrap/constant.php | 1 + webapp/controller/MatchController.class.php | 33 +++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index 8d053a81..2d998aa6 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -7,6 +7,7 @@ define('PLANET_BUY_KEY', 'game2006api:planet_buy:'); define('LAST_SESSION_KEY', 'last_session:'); define('MATCH_CURRENT_TEAM_KEY', 'match:current_team:'); +define('MATCH_OK_KEY', 'match:current_team:'); define('V_ITEM_GOLD', 10001); //金币 define('V_ITEM_DIAMOND', 10014); //钻石 diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 2938b405..803cee4f 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -32,7 +32,7 @@ class MatchController extends BaseAuthedController { $this->_rspErr(1, 'The team has been disbanded'); return; } - $r->pexpire(TEAMID_KEY . $teamUuid, 1000*600); + $matchDb = $this->readCurrMatchTeam($r); $this->_rspData(array( 'team_info' => $teamDb )); @@ -54,13 +54,20 @@ class MatchController extends BaseAuthedController { if (empty($teamDbStr)) { return null; } + $r->refreshKeyExpire($r, TEAMID_KEY . $teamUuid, 1000*600); $teamDb = json_decode($teamDbStr, true); return $teamDb; } + /* + { + "current_team": "dafsdf" + "match_time": 231434 + } + */ private function readCurrMatchTeam($r) { - $teamDbStr = $r->get(MATCH_CURRENT_TEAM_KEY . $teamUuid); + $teamDbStr = $r->get(MATCH_CURRENT_TEAM_KEY); if (empty($teamDbStr)) { return null; } @@ -68,4 +75,26 @@ class MatchController extends BaseAuthedController { return $teamDb; } + /* + { + "target_team": "dafsdf" + "match_time": 231434 + } + */ + private function readMatchOk($r, $teamUuid) + { + $teamDbStr = $r->get(MATCH_OK_KEY . $teamUuid); + if (empty($teamDbStr)) { + return null; + } + $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); + $teamDb = json_decode($teamDbStr, true); + return $teamDb; + } + + private function refreshKeyExpire($r, $key, $time) + { + $r->pexpire($key, $time); + } + } From 28e1c183f4652288b2a7b35fcd03d05e502db410 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 14:26:45 +0800 Subject: [PATCH 12/45] 1 --- webapp/controller/MatchController.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 803cee4f..6d5d4bf1 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -32,7 +32,11 @@ class MatchController extends BaseAuthedController { $this->_rspErr(1, 'The team has been disbanded'); return; } - $matchDb = $this->readCurrMatchTeam($r); + $matchOkDb = $this->readMatchOk($r, $teamUuid); + if ($matchOkDb) { + + } + $currMatchDb = $this->readCurrMatchTeam($r); $this->_rspData(array( 'team_info' => $teamDb )); From 0d746e5c4152630d67936fd399ab4d1f929332c8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 14:34:36 +0800 Subject: [PATCH 13/45] 1 --- webapp/controller/MatchController.class.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 6d5d4bf1..564b7d84 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -34,9 +34,21 @@ class MatchController extends BaseAuthedController { } $matchOkDb = $this->readMatchOk($r, $teamUuid); if ($matchOkDb) { + $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); + $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); + } else { + $currMatchDb = $this->readCurrMatchTeam($r); + if (empty($currMatchDb)) { + $currMatchDb = array( + 'current_team' => $teamUuid, + 'match_time' => $this->_getNowTime() + ); + $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); + } else { + } } - $currMatchDb = $this->readCurrMatchTeam($r); $this->_rspData(array( 'team_info' => $teamDb )); From 941985477517805228e4c4851dabd158518e0604 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 14:40:24 +0800 Subject: [PATCH 14/45] 1 --- webapp/controller/MatchController.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 564b7d84..80670b03 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -46,7 +46,9 @@ class MatchController extends BaseAuthedController { $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { - + if ($currMatchDb['current_team'] != $teamUuid) { + $this->matchOk($r, $teamUuid, $currMatchDb); + } } } $this->_rspData(array( @@ -113,4 +115,9 @@ class MatchController extends BaseAuthedController { $r->pexpire($key, $time); } + private function matchOk($r, $teamUuid, $currMatchDb) + { + + } + } From 21587f7c372f36a06bbbe194bbed2246b625c569 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:01:16 +0800 Subject: [PATCH 15/45] 1 --- webapp/controller/MatchController.class.php | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 80670b03..28644d17 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -36,6 +36,7 @@ class MatchController extends BaseAuthedController { if ($matchOkDb) { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); + $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); } else { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { @@ -72,7 +73,7 @@ class MatchController extends BaseAuthedController { if (empty($teamDbStr)) { return null; } - $r->refreshKeyExpire($r, TEAMID_KEY . $teamUuid, 1000*600); + $this->refreshKeyExpire($r, TEAMID_KEY . $teamUuid, 1000*600); $teamDb = json_decode($teamDbStr, true); return $teamDb; } @@ -117,7 +118,25 @@ class MatchController extends BaseAuthedController { private function matchOk($r, $teamUuid, $currMatchDb) { - + { + $r->del(MATCH_CURRENT_TEAM_KEY); + } + { + $matchOkDb = array( + 'target_team' => $currMatchDb['current_team'], + 'match_time' => $this->_getNowTime() + ); + $r->set(MATCH_OK_KEY . $teamUuid, json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); + } + { + $matchOkDb = array( + 'target_team' => $teamUuid, + 'match_time' => $this->_getNowTime() + ); + $r->set(MATCH_OK_KEY . $currMatchDb['current_team'], json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['current_team'], 1000*600); + } } } From 8bd3b443ec6a3e04387089246d3ea75235ae8cc1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:21:27 +0800 Subject: [PATCH 16/45] 1 --- webapp/controller/MatchController.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 28644d17..6be37b1f 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -32,6 +32,9 @@ class MatchController extends BaseAuthedController { $this->_rspErr(1, 'The team has been disbanded'); return; } + $matchInfo = array( + + ); $matchOkDb = $this->readMatchOk($r, $teamUuid); if ($matchOkDb) { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); @@ -52,9 +55,7 @@ class MatchController extends BaseAuthedController { } } } - $this->_rspData(array( - 'team_info' => $teamDb - )); + $this->_rspData($matchInfo); } public function cancel() From 33347004a55906b1b3ea1ef80850c5bf1a9a3a9e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:28:25 +0800 Subject: [PATCH 17/45] 1 --- webapp/controller/MatchController.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 6be37b1f..b2f0ddae 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -33,13 +33,15 @@ class MatchController extends BaseAuthedController { return; } $matchInfo = array( - + 'state' => 0, + 'team_list' => array() ); $matchOkDb = $this->readMatchOk($r, $teamUuid); if ($matchOkDb) { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); + $this->fillMatchInfo($r, $matchInfo); } else { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { @@ -52,6 +54,7 @@ class MatchController extends BaseAuthedController { } else { if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); + $this->fillMatchInfo($r, $matchInfo); } } } @@ -140,4 +143,9 @@ class MatchController extends BaseAuthedController { } } + private function fillMatchInfo($r, &$matchInfo) + { + $matchInfo['state'] = 1; + } + } From 6e11c16a12cf4d03bf64799dd9d731d305a1cbd1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:32:07 +0800 Subject: [PATCH 18/45] 1 --- webapp/controller/MatchController.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index b2f0ddae..4bfbfce3 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -41,7 +41,7 @@ class MatchController extends BaseAuthedController { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); - $this->fillMatchInfo($r, $matchInfo); + $this->fillMatchInfo($r, $matchInfo, $matchOkDb); } else { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { @@ -54,7 +54,7 @@ class MatchController extends BaseAuthedController { } else { if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); - $this->fillMatchInfo($r, $matchInfo); + $this->fillMatchInfo($r, $matchInfo, $this->readMatchOk($r, $teamUuid)); } } } @@ -143,8 +143,11 @@ class MatchController extends BaseAuthedController { } } - private function fillMatchInfo($r, &$matchInfo) + private function fillMatchInfo($r, &$matchInfo, $matchOkDb) { + if (empty($matchOkDb)) { + return; + } $matchInfo['state'] = 1; } From d9eeb3011696b6346af1d2225fba645eea3bfd3c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:32:58 +0800 Subject: [PATCH 19/45] 1 --- webapp/controller/MatchController.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 4bfbfce3..da6191da 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -41,7 +41,7 @@ class MatchController extends BaseAuthedController { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); - $this->fillMatchInfo($r, $matchInfo, $matchOkDb); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $matchOkDb); } else { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { @@ -54,7 +54,7 @@ class MatchController extends BaseAuthedController { } else { if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); - $this->fillMatchInfo($r, $matchInfo, $this->readMatchOk($r, $teamUuid)); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); } } } @@ -143,12 +143,14 @@ class MatchController extends BaseAuthedController { } } - private function fillMatchInfo($r, &$matchInfo, $matchOkDb) + private function fillMatchInfo($r, $teamUuid, &$matchInfo, $matchOkDb) { if (empty($matchOkDb)) { return; } $matchInfo['state'] = 1; + { + } } } From 1d891b05f7f53e0f1ebdaaaddf15258f5018602f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:49:01 +0800 Subject: [PATCH 20/45] 1 --- webapp/controller/MatchController.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index da6191da..791e7786 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -150,6 +150,12 @@ class MatchController extends BaseAuthedController { } $matchInfo['state'] = 1; { + $teamDb = $this->readTeamDb($r, $teamUuid); + array_push($matchInfo['team_list'], $teamDb); + } + { + $teamDb = $this->readTeamDb($r, $matchOkDb['target_team']); + array_push($matchInfo['team_list'], $teamDb); } } From 91a6b5c15dc648b8ec402ac1af48e653a7c34ade Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:55:46 +0800 Subject: [PATCH 21/45] 1 --- webapp/controller/MatchController.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 791e7786..2d3eea86 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -67,6 +67,11 @@ class MatchController extends BaseAuthedController { $r = $this->_getRedis($teamUuid); $teamDb = $this->readTeamDb($r, $teamUuid); if (!empty($teamDb)) { + $r->del(MATCH_OK_KEY . $teamUuid); + $matchOkDb = $this->readMatchOk($r, $teamUuid); + if ($matchOkDb) { + $r->del(MATCH_OK_KEY . $matchOkDb['target_team']); + } } $this->_rspOk(); } From 12b0abc9c05e65272fa98b2f07093731cafc3be0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 16:33:29 +0800 Subject: [PATCH 22/45] 1 --- webapp/controller/MatchController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 2d3eea86..0891c8a9 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -55,6 +55,7 @@ class MatchController extends BaseAuthedController { if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + } else { } } } @@ -160,7 +161,9 @@ class MatchController extends BaseAuthedController { } { $teamDb = $this->readTeamDb($r, $matchOkDb['target_team']); - array_push($matchInfo['team_list'], $teamDb); + if (!empty($teamDb) && $teamDb['team_uuid'] != $teamUuid) { + array_push($matchInfo['team_list'], $teamDb); + } } } From f40ebe1918532628b62d3f9ce5b13418970eadd5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 17:25:48 +0800 Subject: [PATCH 23/45] 1 --- webapp/controller/MatchController.class.php | 41 ++++++++++++--------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 0891c8a9..f2d790a1 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -43,21 +43,7 @@ class MatchController extends BaseAuthedController { $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $matchOkDb); } else { - $currMatchDb = $this->readCurrMatchTeam($r); - if (empty($currMatchDb)) { - $currMatchDb = array( - 'current_team' => $teamUuid, - 'match_time' => $this->_getNowTime() - ); - $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); - $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); - } else { - if ($currMatchDb['current_team'] != $teamUuid) { - $this->matchOk($r, $teamUuid, $currMatchDb); - $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); - } else { - } - } + $this->execMatch($r, $teamUuid, $teamDb, $matchInfo); } $this->_rspData($matchInfo); } @@ -90,8 +76,10 @@ class MatchController extends BaseAuthedController { /* { - "current_team": "dafsdf" - "match_time": 231434 + "": { + "current_team": "dafsdf" + "match_time": 231434 + } } */ private function readCurrMatchTeam($r) @@ -126,6 +114,25 @@ class MatchController extends BaseAuthedController { $r->pexpire($key, $time); } + private function execMatch($r, $teamUuid, $teamDb, &$matchInfo) + { + $currMatchDb = $this->readCurrMatchTeam($r); + if (empty($currMatchDb)) { + $currMatchDb = array( + 'current_team' => $teamUuid, + 'match_time' => $this->_getNowTime() + ); + $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); + } else { + if ($currMatchDb['current_team'] != $teamUuid) { + $this->matchOk($r, $teamUuid, $currMatchDb); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + } else { + } + } + } + private function matchOk($r, $teamUuid, $currMatchDb) { { From 37c6a942aedf518aff10244b16e905c225c5a1b6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 17:38:19 +0800 Subject: [PATCH 24/45] 1 --- webapp/controller/MatchController.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index f2d790a1..c532c843 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -119,12 +119,15 @@ class MatchController extends BaseAuthedController { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { $currMatchDb = array( - 'current_team' => $teamUuid, - 'match_time' => $this->_getNowTime() + $teamUuid => array( + 'current_team' => $teamUuid, + 'match_time' => $this->_getNowTime() + ) ); $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { + $currMatchDb = json_decode($currMatchDb, true); if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); From 2420298d1978d1b5e7c4074e737080377b309273 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 18:06:58 +0800 Subject: [PATCH 25/45] 1 --- webapp/controller/MatchController.class.php | 28 +++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index c532c843..06208816 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -120,7 +120,7 @@ class MatchController extends BaseAuthedController { if (empty($currMatchDb)) { $currMatchDb = array( $teamUuid => array( - 'current_team' => $teamUuid, + 'team_uuid' => $teamUuid, 'match_time' => $this->_getNowTime() ) ); @@ -128,10 +128,28 @@ class MatchController extends BaseAuthedController { $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { $currMatchDb = json_decode($currMatchDb, true); - if ($currMatchDb['current_team'] != $teamUuid) { - $this->matchOk($r, $teamUuid, $currMatchDb); - $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); - } else { + $delTeams = array(); + foreach ($currMatchDb as $key => $val) { + $tmpTeamDb = $this->readTeamDb($r, $key); + if (!empty($tmpTeamDb) || $this->_getNowTime() - $tmpTeamDb['match_time'] > 120) { + array_push($delTeams, $key); + } else { + $found = false; + if ($key == $teamUuid) { + $found = true; + } else { + foreach ($val['member_list'] as $member) { + if ($member['account_id'] == myself()->_getAccountId()) { + $found = true; + break; + } + } + } + if (!$found) { + $this->matchOk($r, $teamUuid, $val); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + } + } } } } From 6bdf42690b2ff12f1ad07a29dd6fed1fec9f49db Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 18:07:41 +0800 Subject: [PATCH 26/45] 1 --- webapp/controller/MatchController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 06208816..337a3b7c 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -77,7 +77,7 @@ class MatchController extends BaseAuthedController { /* { "": { - "current_team": "dafsdf" + "team_uuid": "dafsdf" "match_time": 231434 } } From 596204edcacbb1035e01c2a86fc1b4283ca06d9a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 18:10:57 +0800 Subject: [PATCH 27/45] 1 --- webapp/controller/MatchController.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 337a3b7c..5c5ce49a 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -148,8 +148,14 @@ class MatchController extends BaseAuthedController { if (!$found) { $this->matchOk($r, $teamUuid, $val); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + array_push($delTeams, $key); } } + }//end foreach $currMatchDb + if (count($delTeams) > 0) { + foreach ($delTeams as $id) { + unset($delTeams[$id]); + } } } } From f6fff0d16c9e451cabc9e21d2cbf3807f0e14cad Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 18:11:25 +0800 Subject: [PATCH 28/45] 1 --- webapp/controller/MatchController.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 5c5ce49a..c3402deb 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -156,6 +156,8 @@ class MatchController extends BaseAuthedController { foreach ($delTeams as $id) { unset($delTeams[$id]); } + $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } } } From 93fc71290e8950510f79660a597d8d856f0653b9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 19:03:43 +0800 Subject: [PATCH 29/45] 1 --- webapp/controller/MatchController.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index c3402deb..3c3b1092 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -164,9 +164,6 @@ class MatchController extends BaseAuthedController { private function matchOk($r, $teamUuid, $currMatchDb) { - { - $r->del(MATCH_CURRENT_TEAM_KEY); - } { $matchOkDb = array( 'target_team' => $currMatchDb['current_team'], From 4e45d080dc9a0d3d422c580f25a7b5a23332e1e4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 19:17:08 +0800 Subject: [PATCH 30/45] 1 --- webapp/controller/MatchController.class.php | 45 ++++++++++++--------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 3c3b1092..49c59f77 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -129,29 +129,36 @@ class MatchController extends BaseAuthedController { } else { $currMatchDb = json_decode($currMatchDb, true); $delTeams = array(); - foreach ($currMatchDb as $key => $val) { - $tmpTeamDb = $this->readTeamDb($r, $key); - if (!empty($tmpTeamDb) || $this->_getNowTime() - $tmpTeamDb['match_time'] > 120) { - array_push($delTeams, $key); - } else { - $found = false; - if ($key == $teamUuid) { - $found = true; + $selfTeamDb = $currMatchDb[$teamUuid]; + if ($selfTeamDb && myself()->_getNowTime() - $selfTeamDb['match_time'] > 7) { + $this->matchOk($r, $teamUuid, $selfTeamDb); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + array_push($delTeams, $teamUuid); + } else { + foreach ($currMatchDb as $key => $val) { + $tmpTeamDb = $this->readTeamDb($r, $key); + if (!empty($tmpTeamDb) || $this->_getNowTime() - $tmpTeamDb['match_time'] > 120) { + array_push($delTeams, $key); } else { - foreach ($val['member_list'] as $member) { - if ($member['account_id'] == myself()->_getAccountId()) { - $found = true; - break; + $found = false; + if ($key == $teamUuid) { + $found = true; + } else { + foreach ($val['member_list'] as $member) { + if ($member['account_id'] == myself()->_getAccountId()) { + $found = true; + break; + } } } + if (!$found) { + $this->matchOk($r, $teamUuid, $val); + $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); + array_push($delTeams, $key); + } } - if (!$found) { - $this->matchOk($r, $teamUuid, $val); - $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); - array_push($delTeams, $key); - } - } - }//end foreach $currMatchDb + }//end foreach $currMatchDb + } if (count($delTeams) > 0) { foreach ($delTeams as $id) { unset($delTeams[$id]); From fceb480a433e322a522d983853a482da5168888a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 19:26:40 +0800 Subject: [PATCH 31/45] 1 --- webapp/controller/MatchController.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 49c59f77..3f7427c4 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -127,7 +127,6 @@ class MatchController extends BaseAuthedController { $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { - $currMatchDb = json_decode($currMatchDb, true); $delTeams = array(); $selfTeamDb = $currMatchDb[$teamUuid]; if ($selfTeamDb && myself()->_getNowTime() - $selfTeamDb['match_time'] > 7) { @@ -173,10 +172,10 @@ class MatchController extends BaseAuthedController { { { $matchOkDb = array( - 'target_team' => $currMatchDb['current_team'], + 'target_team' => $currMatchDb['team_uuid'], 'match_time' => $this->_getNowTime() ); - $r->set(MATCH_OK_KEY . $teamUuid, json_encode($currMatchDb)); + $r->set(MATCH_OK_KEY . $teamUuid, json_encode($matchOkDb)); $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); } { @@ -184,8 +183,8 @@ class MatchController extends BaseAuthedController { 'target_team' => $teamUuid, 'match_time' => $this->_getNowTime() ); - $r->set(MATCH_OK_KEY . $currMatchDb['current_team'], json_encode($currMatchDb)); - $this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['current_team'], 1000*600); + $r->set(MATCH_OK_KEY . $currMatchDb['team_uuid'], json_encode($matchOkDb)); + $this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['team_uuid'], 1000*600); } } @@ -194,6 +193,7 @@ class MatchController extends BaseAuthedController { if (empty($matchOkDb)) { return; } + error_log(json_encode($matchOkDb)); $matchInfo['state'] = 1; { $teamDb = $this->readTeamDb($r, $teamUuid); From a6be7a54ff352e096d2f2f075d49bc9995faecd4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 27 Dec 2023 10:46:33 +0800 Subject: [PATCH 32/45] 1 --- webapp/bootstrap/constant.php | 2 +- webapp/controller/MatchController.class.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index 2d998aa6..b004c37f 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -7,7 +7,7 @@ define('PLANET_BUY_KEY', 'game2006api:planet_buy:'); define('LAST_SESSION_KEY', 'last_session:'); define('MATCH_CURRENT_TEAM_KEY', 'match:current_team:'); -define('MATCH_OK_KEY', 'match:current_team:'); +define('MATCH_OK_KEY', 'match:ok:'); define('V_ITEM_GOLD', 10001); //金币 define('V_ITEM_DIAMOND', 10014); //钻石 diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 3f7427c4..167a90e1 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -59,6 +59,14 @@ class MatchController extends BaseAuthedController { if ($matchOkDb) { $r->del(MATCH_OK_KEY . $matchOkDb['target_team']); } + { + $currMatchDb = $this->readCurrMatchTeam($r); + if (!empty($currMatchDb)) { + unset($currMatchDb[$teamUuid]); + $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); + $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); + } + } } $this->_rspOk(); } @@ -160,7 +168,7 @@ class MatchController extends BaseAuthedController { } if (count($delTeams) > 0) { foreach ($delTeams as $id) { - unset($delTeams[$id]); + unset($currMatchDb[$id]); } $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); From 6b6c685006ca9059c5235de3100621e317133af8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 28 Dec 2023 16:47:45 +0800 Subject: [PATCH 33/45] 1 --- webapp/controller/BattleController.class.php | 102 +++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 30abcbf6..d55b5923 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -429,6 +429,108 @@ class BattleController extends BaseAuthedController { myself()->_rspData($data); } + public function getMobaBattleData() + { + $sign = ''; + $customData = array(); + { + $rawData = file_get_contents('php://input'); + error_log($rawData); + $sign = strstr($rawData, '|', true); + $customData = strstr($rawData, '|'); + $customData = substr($customData, 1); + error_log(json_encode(array( + 'sign' => $sign, + 'customData' => $customData + ))); + if (md5($customData . HALL_KEY) != $sign) { + myself()->_rspErr(1, 'sign error'); + return; + } + $customData = json_decode($customData, true); + } + + $zoneId = $customData['zone_id']; + $nodeId = $customData['node_id']; + $roomUuid = $customData['room_uuid']; + $startTime = $customData['start_time']; + + $data = array( + 'sign' => $sign, + 'zone_id' => $zoneId, + 'node_id' => $nodeId, + 'room_uuid' => $roomUuid, + 'start_time' => $startTime, + 'team_list' => array() + ); + + $currSeason = mt\RankSeason::getCurrentSeason(); + foreach ($customData['team_list'] as $team) { + $teamInfo = array( + 'team_uuid' => $team['team_uuid'], + 'members' => array() + ); + foreach ($team['members'] as $member) { + $accountId = $member['account_id']; + $switchOk = $this->switchOnlineAccount($accountId); + if (!$switchOk) { + myself()->_rspErr(1, 'data error'); + return; + } + $info = $this->genInitBattleData(); + $userDb = User::find($accountId); + if ($userDb) { + $userPresetInfo = User::toPreset($userDb); + $info['elo'] = $userDb['elo']; + $info['rank'] = $userDb['rank']; + $info['name'] = $userPresetInfo['name']; + $info['level'] = $userPresetInfo['level']; + $info['parachute'] = $userPresetInfo['parachute']; + $info['hero_uniid'] = $userPresetInfo['hero_uniId']; + $info['hero_id'] = $userPresetInfo['hero_id']; + $info['hero_skin'] = $userPresetInfo['hero_skin']; + $info['skill_id'] = $userPresetInfo['presetInfo']['skill_id']; + $info['weapon_uuid1'] = $userPresetInfo['presetInfo']['weapon_uid1']; + $info['weapon_uuid2'] = $userPresetInfo['presetInfo']['weapon_uid2']; + $chipPageDb = ChipPage::find($userPresetInfo['presetInfo']['chip_page']); + $info['chip_page'] = ChipPage::toDtoBattle($chipPageDb); + $info['honor_info'] = $userPresetInfo['honor_info']; + $battleDb = Battle::find($accountId); + if ($battleDb){ + $battleData = json_decode($battleDb['battle_data'], true); + $seasonBattleData = isset($battleData) ? getXVal($battleData, 'data', array()) : array(); + $info['battle_times'] = getXVal($seasonBattleData, 'total_battle_times', 0); + } + + $heroDb = Hero::findByAccountId($accountId,$info['hero_uniid']); + if ($heroDb) { + $info['is_valid_battle'] = 1; + $info['hero_dto'] = Hero::toDto($heroDb); + } else { + $info['errcode'] = 51; + $info['errmsg'] = 'paramater error'; + } + + { + $itemDb = Bag::findEx($accountId, V_ITEM_REVIVE_COIN); + $info['revive_coin'] = $itemDb && $itemDb['item_num'] > 0 ? $itemDb['item_num'] : 0; + } + + { + $info['match_mode'] = 0; + if ($currSeason){ + $info['match_mode'] = 1; + } + } + } + array_push($teamInfo['members'], $info); + } + array_push($data['team_list'], $teamInfo); + } + error_log(json_encode($data)); + myself()->_rspData($data); + } + private function genInitBattleData() { $accountId = myself()->_getAccountId(); From 21c9103d1b521c9766fef225e2e13b81eb6961e9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 29 Dec 2023 14:28:13 +0800 Subject: [PATCH 34/45] 1 --- webapp/controller/BattleController.class.php | 3 ++- webapp/controller/MatchController.class.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index d55b5923..5ff03abc 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -436,7 +436,8 @@ class BattleController extends BaseAuthedController { { $rawData = file_get_contents('php://input'); error_log($rawData); - $sign = strstr($rawData, '|', true); + $headStr = strstr($rawData, '|', true); + $sign = strstr($headStr, ':', true); $customData = strstr($rawData, '|'); $customData = substr($customData, 1); error_log(json_encode(array( diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 167a90e1..79b3804a 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -144,7 +144,7 @@ class MatchController extends BaseAuthedController { } else { foreach ($currMatchDb as $key => $val) { $tmpTeamDb = $this->readTeamDb($r, $key); - if (!empty($tmpTeamDb) || $this->_getNowTime() - $tmpTeamDb['match_time'] > 120) { + if (!empty($tmpTeamDb) && $this->_getNowTime() - $val['match_time'] > 120) { array_push($delTeams, $key); } else { $found = false; From f0c46fa9341df2ac51eaac7392791e54d9a64049 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 29 Dec 2023 14:41:59 +0800 Subject: [PATCH 35/45] 1 --- doc/Match.py | 1 + doc/_common.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/doc/Match.py b/doc/Match.py index abcccf65..e2eaaa26 100644 --- a/doc/Match.py +++ b/doc/Match.py @@ -18,6 +18,7 @@ class Match(object): 'response': [ _common.RspHead(), ['info', _common.MatchInfo(), '匹配信息'], + ['join_msg', _common.SpecJoin(), '匹配成功后改字段才有意义,传给CMJoin里的参数(team_uuid、payload)'], ] }, { diff --git a/doc/_common.py b/doc/_common.py index 74affbb7..50ea0d68 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1569,3 +1569,11 @@ class MatchInfo(object): ['state',0,'状态 0:匹配中 1:匹配成功'], ['!team_list', MatchTeam(), '队伍列表(客户端自行判断所属哪个队伍)'], ] + +class SpecJoin(object): + + def __init__(self): + self.fields = [ + ['team_uuid', '', '自定义房间、moba房间会修改玩家原始team_uuid,所以用这个新的team_uuid替换之前CMJoin里的team_uuid'], + ['payload', '', '透传数据'], + ] From 8fdf13c01442781572af3ca65f0afa551c64a2a0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 29 Dec 2023 17:31:24 +0800 Subject: [PATCH 36/45] 1 --- doc/Match.py | 1 - doc/_common.py | 1 + webapp/controller/BattleController.class.php | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Match.py b/doc/Match.py index e2eaaa26..abcccf65 100644 --- a/doc/Match.py +++ b/doc/Match.py @@ -18,7 +18,6 @@ class Match(object): 'response': [ _common.RspHead(), ['info', _common.MatchInfo(), '匹配信息'], - ['join_msg', _common.SpecJoin(), '匹配成功后改字段才有意义,传给CMJoin里的参数(team_uuid、payload)'], ] }, { diff --git a/doc/_common.py b/doc/_common.py index 50ea0d68..559cca8a 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1568,6 +1568,7 @@ class MatchInfo(object): self.fields = [ ['state',0,'状态 0:匹配中 1:匹配成功'], ['!team_list', MatchTeam(), '队伍列表(客户端自行判断所属哪个队伍)'], + ['join_msg', SpecJoin(), '匹配成功后改字段才有意义,传给CMJoin里的参数(team_uuid、payload)'], ] class SpecJoin(object): diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 5ff03abc..a994af72 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -348,6 +348,7 @@ class BattleController extends BaseAuthedController { $customData = json_decode($customData, true); } + error_log(json_encode($customData)); $zoneId = $customData['zone_id']; $nodeId = $customData['node_id']; $roomUuid = $customData['room_uuid']; From 4d64af598de76faca6f478d1d64f48cbf5fc3eaf Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:00:59 +0800 Subject: [PATCH 37/45] 1 --- webapp/controller/MatchController.class.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 79b3804a..db33611a 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -203,16 +203,37 @@ class MatchController extends BaseAuthedController { } error_log(json_encode($matchOkDb)); $matchInfo['state'] = 1; + $teamList = array(); { $teamDb = $this->readTeamDb($r, $teamUuid); array_push($matchInfo['team_list'], $teamDb); + $teamInfo = array( + 'team_uuid' => $teamDb['team_uuid'], + 'members' => array() + ); + foreach ($teamDb['member_list'] as $val) { + array_push($teamInfo['members'], array( + 'account_id' => $val['account_id'] + )); + } + array_push($teamList, $teamInfo); } { $teamDb = $this->readTeamDb($r, $matchOkDb['target_team']); if (!empty($teamDb) && $teamDb['team_uuid'] != $teamUuid) { array_push($matchInfo['team_list'], $teamDb); + foreach ($teamDb['member_list'] as $val) { + array_push($teamInfo['members'], array( + 'account_id' => $val['account_id'] + )); + } + array_push($teamList, $teamInfo); } } + $matchInfo['join_msg'] = array( + 'team_uuid' => $teamUuid, + 'payload' => $teamList + ); } } From d9b3415e92aa684a7cd87c3e1031092e05cdd3ba Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:06:58 +0800 Subject: [PATCH 38/45] 1 --- webapp/controller/MatchController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index db33611a..12951990 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -230,9 +230,11 @@ class MatchController extends BaseAuthedController { array_push($teamList, $teamInfo); } } + $payload = md5(json_encode($teamList) . '520d8eAbB(8cf1^#$^&!@d833a42c820432PDAFE^^)') . + ":moba_room|" . json_encode($teamList); $matchInfo['join_msg'] = array( 'team_uuid' => $teamUuid, - 'payload' => $teamList + 'payload' => $payload ); } From 1b2ff4ff007be8b377430b57563de2ea554cee05 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:11:06 +0800 Subject: [PATCH 39/45] 1 --- webapp/controller/MatchController.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 12951990..64db3ccb 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -203,6 +203,13 @@ class MatchController extends BaseAuthedController { } error_log(json_encode($matchOkDb)); $matchInfo['state'] = 1; + $data = array( + 'zid' => '', + 'node_id' => '', + 'room_uuid' => '', + 'start_time' => myself()->_GetNowTime(), + 'team_list' => array() + ); $teamList = array(); { $teamDb = $this->readTeamDb($r, $teamUuid); @@ -217,6 +224,9 @@ class MatchController extends BaseAuthedController { )); } array_push($teamList, $teamInfo); + $data['zid'] = $teamDb['zid']; + $data['node_id'] = $teamDb['node_id']; + $data['room_uuid'] = $teamDb['team_uuid']; } { $teamDb = $this->readTeamDb($r, $matchOkDb['target_team']); @@ -230,8 +240,9 @@ class MatchController extends BaseAuthedController { array_push($teamList, $teamInfo); } } - $payload = md5(json_encode($teamList) . '520d8eAbB(8cf1^#$^&!@d833a42c820432PDAFE^^)') . - ":moba_room|" . json_encode($teamList); + $data['team_list'] = $teamList; + $payload = md5(json_encode($data) . '520d8eAbB(8cf1^#$^&!@d833a42c820432PDAFE^^)') . + ":moba_room|" . json_encode($data); $matchInfo['join_msg'] = array( 'team_uuid' => $teamUuid, 'payload' => $payload From 91b913fadd282bea34f557655f6398d5903e7320 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:14:02 +0800 Subject: [PATCH 40/45] 1 --- webapp/controller/MatchController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 64db3ccb..e53053e3 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -207,7 +207,7 @@ class MatchController extends BaseAuthedController { 'zid' => '', 'node_id' => '', 'room_uuid' => '', - 'start_time' => myself()->_GetNowTime(), + 'start_time' => $matchOkDb['match_time'], 'team_list' => array() ); $teamList = array(); From f11e84c45e08344bc2f1e849d83ad54f018504a2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:19:02 +0800 Subject: [PATCH 41/45] 1 --- webapp/controller/MatchController.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index e53053e3..a7e84991 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -144,6 +144,10 @@ class MatchController extends BaseAuthedController { } else { foreach ($currMatchDb as $key => $val) { $tmpTeamDb = $this->readTeamDb($r, $key); + if ($tmpTeamDb['zid'] != $teamDb['zid'] || + $tmpTeamDb['node_id'] != $teamDb['node_id']) { + continue; + } if (!empty($tmpTeamDb) && $this->_getNowTime() - $val['match_time'] > 120) { array_push($delTeams, $key); } else { From 5dae9b1edd4c243354f0ec7b546fc14631ba06d5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 15:21:37 +0800 Subject: [PATCH 42/45] 1 --- webapp/controller/MatchController.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index a7e84991..a449b075 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -145,7 +145,8 @@ class MatchController extends BaseAuthedController { foreach ($currMatchDb as $key => $val) { $tmpTeamDb = $this->readTeamDb($r, $key); if ($tmpTeamDb['zid'] != $teamDb['zid'] || - $tmpTeamDb['node_id'] != $teamDb['node_id']) { + $tmpTeamDb['node_id'] != $teamDb['node_id'] || + $tmpTeamDb['map_id'] != $teamDb['map_id']) { continue; } if (!empty($tmpTeamDb) && $this->_getNowTime() - $val['match_time'] > 120) { From cbadab33ede14dd35d70518937ca9567326e4b41 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 16:37:08 +0800 Subject: [PATCH 43/45] 1 --- webapp/controller/MatchController.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index a449b075..2fc87da6 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -237,12 +237,19 @@ class MatchController extends BaseAuthedController { $teamDb = $this->readTeamDb($r, $matchOkDb['target_team']); if (!empty($teamDb) && $teamDb['team_uuid'] != $teamUuid) { array_push($matchInfo['team_list'], $teamDb); + $teamInfo = array( + 'team_uuid' => $teamDb['team_uuid'], + 'members' => array() + ); foreach ($teamDb['member_list'] as $val) { array_push($teamInfo['members'], array( 'account_id' => $val['account_id'] )); } array_push($teamList, $teamInfo); + if (strcasecmp($teamDb['team_uuid'], $data['room_uuid']) < 0) { + $data['room_uuid'] = $teamDb['team_uuid']; + } } } $data['team_list'] = $teamList; From 2696bb2f4c0fe4ffce4d3b4277aeed5856e5b0b6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Jan 2024 16:46:17 +0800 Subject: [PATCH 44/45] 1 --- webapp/bootstrap/constant.php | 242 +++++++++++++++++----------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index f0423185..c4879ed0 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -1,121 +1,121 @@ - Date: Tue, 2 Jan 2024 16:48:17 +0800 Subject: [PATCH 45/45] 1 --- doc/_common.py | 3060 ++++++++++++++++++++++++------------------------ 1 file changed, 1530 insertions(+), 1530 deletions(-) diff --git a/doc/_common.py b/doc/_common.py index f158d388..b08c3327 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1,1530 +1,1530 @@ -# -*- coding: utf-8 -*- - -class ReqHead(object): - - def __init__(self): - self.fields = [ - ['account_id', '', '账号id'], - ['session_id', '', '会话id'], - ] - -class RspHead(object): - - def __init__(self, **kwargs): - self.fields = [ - ['errcode', 0, '错误码/0 成功;1 失败;2余额不足'], - ['errmsg', '', '错误描述'], - ] - for (key, value) in kwargs.items(): - for i in range(0, len(self.fields)): - if self.fields[i][0] == key: - self.fields[i][0] = key - self.fields[i][1] = value - break - -class Union(object): - - def __init__(self, fields): - self.doc = 'Union 联合体的访问方式:.联合体内含结构的字段名' - self.fields = [['', f[0], f[1]] for f in fields] - -class Attr(object): - - def __init__(self): - self.fields = [ - ['attr_id', 0, '属性id'], - ['type', 0, '1: 绝对值 2:百分比 ---弃用字段'], - ['val', 0, '属性值'], - ] - -class AttrDesc(object): - - def __init__(self): - self.fields = [ - ['name', '', '属性名'], - ['attr_id', 0, '属性id'], - ['type', 0, '1: 绝对值 2:百分比 ---弃用字段' ], - ['val', 0, '属性值'], - ] - -class SystemCurrency(object): - - def __init__(self): - self.fields = [ - ['name', '', '货币名称'], - ['original_price', 0, '原价'], - ['discount_price', 0, '折后价'], - ['discount_rate', 0, '折扣百分比(0-100)'], - ['decimals', 0, '小数位数'], - ['contract_address', 0, '合约地址'], - ] - -class Page(object): - - def __init__(self): - self.fields = [ - ['last_idx', '', '回传信息'], - ['total', 0, '总记录数'], - ['count', 0, '当前记录数'], - ['per_page', 0, '每页多少条记录'], - ['current_page', 0, '当前页'], - ['total_pages', 0, '总页数'], - ] - -class Pagination(object): - - def __init__(self): - self.fields = [ - ['total', 0, '总记录数'], - ['count', 0, '当前页查到的记录数'], - ['current_page', 0, '当前第几页'], - ['total_page', 0, '总页数'], - ] - -class Gun(object): - - def __init__(self): - self.fields = [ - ['token_id', '', 'token id'], - ['gun_uniid', 0, '枪唯一id'], - ['gun_id', 0, '枪id'], - ['state', 0, '0:已购买 1:免费(GIFT标签)'], - ['gun_lv', 0, '枪等级'], - ['quality', 0, '品阶'], - ['durability', 0, '耐久'], - ['ceg_uplimit', 0, 'ceg今天获取上限'], - ['!rand_attr', [Attr()], '枪械属性'], - ['try_count', 0, '剩余体验次数 当state=1时才有意义'], - ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], - ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], - ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], - ['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'], - ['current_pvp_get_ceg', 0, '当前pvp获取的ceg数量'], - ['current_pve_get_ceg', 0, '当前pve获取的ceg数量'], - ['last_pvp_get_ceg_time', 0, '最后一次获取pvp获取ceg时间'], - ['last_pve_get_ceg_time', 0, '最后一次获取pve获取ceg时间'], - ['offer_reward_state', 0, '是否悬赏中'], - ['tags', '', '1:Gen状态'], - ['!hero_ids', [], '被使用英雄的item_id'], - ] - -class GunSkin(object): - - def __init__(self): - self.fields = [ - ['gun_id', 0, '枪支id'], - ['skin_id', 0, '皮肤id'], - ['try_expire_at', 0, '试用到期时间(utc时间)'], - ] - -class GunTalent(object): - - def __init__(self): - self.fields = [ - ['talent_id', 0, '天赋'], - ['talent_lv', 0, '天赋等级'], - ] - -class UserInfo(object): - - def __init__(self): - self.fields = [ - ['activated', 0, '是否已激活'], - ['rename_count', 0, '改名次数'], - ['account_id', '', '账号id'], - ['address', '', '钱包地址(空或者null表示没钱包)'], - ['name', '', '用户名字'], - ['head_id', 0, '头像id'], - ['head_frame', 0, '头像框id'], - ['level', 0, '等级'], - ['exp', 0, '经验'], - ['max_exp', 0, '经验(上限)'], - ['rank', 0, '当前段位'], - ['history_best_rank', 0, '历史最高段位'], - ['gold', 0, '金币'], - ['diamond', 0, '钻石'], - ['hero_uniid', 0, '当前使用的英雄唯一ID'], - ['hero_id', 0, '当前使用的英雄ID'], - ['first_fight', 0, '是否是第一次战斗'], - ['already_guide', 0, '是否已经引导'], - ['pve_instance_id', 0, '已过pve副本id 0:一关未过'], - ['!head_list', [0], '拥有的头像列表'], - ['!hero_list', [0], '拥有的立绘背景列表'], - ['!head_frame_list', [0], '拥有的头像框列表'], - ['is_gain_item', 0, '0 为获取,1 以获取'], - ['guild_id', '', '工会id'], - ['guild_job', 0, '工会职位'], - ['guild_name', '', '工会名称'], - ['parachute', '', '当前使用的降落伞id'], - ['!parachute_list', [0], '拥有的降落伞列表'], - ['ring_id', 0, '勋章(戒指)ID'], - ['!ring_list', [0], '勋章(戒指)列表'], - ['!honor_info', [HonorInfo()], '荣誉信息'], - ] - -class HonorInfo(object): - - def __init__(self): - self.fields = [ - ['token_type',0,'NFT 类型'], - ['state',0,'1使用 0未使用'], - ] - -class UserSimple(object): - - def __init__(self): - self.fields = [ - ['account_id', '', '账号id'], - ['address', '', '钱包地址'], - ['name', '', '用户名字'], - ['head_id', 0, '头像id'], - ['head_frame', 0, '头像框id'], - ['level', 0, '等级'], - ['exp', 0, '经验'], - ['gold', 0, '金币'], - ['diamond', 0, '钻石'], - ['hero_id', 0, '当前使用的英雄ID'], - ['rank', 0, '段位'], - ['score', 0, '积分'], - ['pve_instance_id', 0, '已过pve副本id 0:一关未过'], - ['hero_skin', 0, '出战英雄皮肤'], - ] - -class BcUserInfo(object): - - def __init__(self): - self.fields = [ - ['account', '', '账号'], - ['gold', 0, '金币'], - ['diamond', 0, '钻石'], - ] - -class UserDetailInfo(object): - - def __init__(self): - self.fields = [ - ['activated', 0, '是否已激活'], - ['account_id', '', '账号id'], - ['name', '', '用户名字'], - ['head_id', 0, '头像id'], - ['head_frame', 0, '头像框id'], - ['level', 0, '等级'], - ['exp', 0, '经验'], - ['max_exp', 0, '经验(上限)'], - ['gold', 0, '金币'], - ['diamond', 0, '钻石'], - ['hero_uniid', 0, '当前使用的英雄唯一ID'], - ['hero_id', 0, '当前使用的英雄ID'], - ['current_rank', 0, '当前段位'], - ['history_best_rank', 0, '历史最高段位'], - ['current_rank_score', 0, '当前赛季排位分'], - ['history_best_rank_score', 0, '历史最高赛季排位分'], - ['like_count', 0, '点赞次数'], - ['guild_id', '', '工会id'], - ['guild_job', 0, '工会职位'], - ['guild_name', '', '工会名称'], - ['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'], - ] - -class UserHisSeason(object): - - def __init__(self): - self.fields = [ - ['season_id', 0, '赛季'], - ['total_kills', 0, '击杀总数(个人信息)'], - ['game_times', 0, '游戏场次(个人信息)'], - ['win_times', 0, '胜利场次(个人信息)'], - ['win_rate', 0, '胜率(个人信息,百分比数值整数部分)'], - ['max_kills', 0, '最高击杀(游戏信息)'], - ['avg_kills', 0, '平均击杀(游戏信息)'], - ['max_damage_out', 0, '最高伤害输出(游戏信息)'], - ['avg_damage_out', 0, '平均伤害输出(游戏信息)'], - ['star_kills', 0, '击败(5纬图-击败, 百分比数值整数部分)'], - ['star_damage', 0, '伤害(5纬图-伤害, 百分比数值整数部分)'], - ['star_alive', 0, '生存(5纬图-生存, 百分比数值整数部分)'], - ['star_recover', 0, '治疗(5纬图-治疗, 百分比数值整数部分)'], - ['star_win', 0, '胜利(5纬图-胜利, 百分比数值整数部分)'], - ] - -class Hero(object): - - def __init__(self): - self.fields = [ - ['token_id', '', 'token id'], - ['hero_uniid', 0, '英雄唯一id'], - ['hero_id', 0, '英雄id'], - ['hero_lv', 0, '英雄等级'], - ['hero_tili', 0, '英雄体力'], - ['state', 0, '0:已购买 1:免费(GIFT标签)'], - ['skin_id', 0, '英雄皮肤id'], - ['quality', 0, '品阶'], - ['skill_lv1', 0, '主动技能等级'], - ['skill_lv2', 0, '被动技能等级'], - ['!rand_attr', [Attr()], '英雄属性'], - ['try_count', 0, '剩余体验次数 当state=1时才有意义'], - ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], - ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], - ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], - ['current_get_gold', 0, '当前获取的gold数量'], - ['last_get_gold_time', 0, '最后一次获取gold时间'], - ['gold_uplimit', 0, '每天gold上限'], - ['unlock_trade_time', 0, '出售解锁utc时间(升级或者升阶完成后触发),只锁交易,其他的操作仍可进行,和lock_type无关是独立的锁!!!'], - ['advanced_count', 0, '进阶次数'], - ['offer_reward_state', 0, '是否悬赏中'], - ['tags', '', '1:Gen状态'], - ['!avatarInfo', [AvatarInfo()], '装饰信息'], - - ] - -class LevelingHero(object): - - def __init__(self): - self.fields = [ - ['info', Hero(), '英雄信息'], - ['countdown', 0, '倒计时'], - ] - -class QualityingHero(object): - - def __init__(self): - self.fields = [ - ['trans_id', 0, 'transId'], - ['state', 0, '0升阶中,1可领取'], - ['heroInfo', Hero(), '升阶英雄信息'], - ['costHeroInfo', Hero(), '材料英雄信息'], - ] - -class QualityingGun(object): - - def __init__(self): - self.fields = [ - ['trans_id', 0, 'transId'], - ['state', 0, '0升阶中,1可领取'], - ['gunInfo', Gun(), '升阶枪械信息'], - ['costGunInfo', Gun(), '材料枪械信息'], - ] - -class HeroSkin(object): - - def __init__(self): - self.fields = [ - ['skin_id', 0, '英雄皮肤id'], - ['is_have', 0, '是否拥有 1:拥有 0:未拥有'], - ['use_state', 0, '选中状态 1:选中 0:未选中'], - ] - -class Item(object): - - def __init__(self): - self.fields = [ - ['item_uniid', 0, '道具唯一id'], - ['item_id', 0, '道具id'], - ['item_num', 0, '道具数量'], - ['!attr', [Attr()], '属性'], - ] - -class AwardItem(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '道具id'], - ['item_num', 0, '道具数量'], - ] - -class Award(object): - - def __init__(self): - self.fields = [ - ['!items', [AwardItem()], '奖励物品列表'], - ['!heros', [Hero()], '英雄信息'] - ] - -class PropertyChg(object): - - def __init__(self): - self.fields = [ - ['user_info', UserInfo(), '用户信息变更(用来更新本地客户端字段(有则更新无则不变))'], - ['!container_chg', [''], '容器类数据变更(bag、hero、heroSkin、gunSkin, gun,chip,fragment)'] - ] - -class CostInfoItem(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '购买需要消耗的道具id'], - ['item_num', 0, '购买需要消耗的道具数量'], - ['discount', 0, '折扣百分比(0-100)'], - ] - -class CostInfo(object): - - def __init__(self): - self.fields = [ - ['!cost_group', [CostInfoItem()], '一组扣费项目,(金币、钻石视为道具,可能有多种价格)'], - ] - -class PriceInfo(object): - - def __init__(self): - self.fields = [ - ['!cost_list', [CostInfo()], '扣费方式列表'], - ['discount_begin_time', 0, '折扣开始时间(utc时间)'], - ['discount_end_time', 0, '折扣结束时间(utc时间)'], - ] - -class DiscountInfo(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '道具id'], - ['gold_discount', 0, '金币折扣百分比(0-100)'], - ['diamond_discount', 0, '钻石折扣百分比(0-100)'], - ] - -class ItemPriceInfo(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '道具id'], - ['price_info', PriceInfo(), '价格信息'], - ] - -class GoodsInfo(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '商品id'], - ['item_num', 0, '堆叠个数,例如:砖石数量'], - ['max_amount', 0, '最高购买数量,单次购买'], - ['shop_id', 0, '所属商店id'], - ['shopstage', 0, '商店层级'], - ['tag', 0, '标签'], - ['recommend', 0, '推荐页位置'], - ['token_type', '', '代币类型 参见shopGoods表格'], - ['price', '', '价格 多种价格设置使用 | 隔开'], - ['discount', '', '折扣 参见shopGoods表格'], - ['limit_type', 0, '限购类型'], - ['limit_num', 0, '限购数量'], - ['buy_cond', '', '购买条件'], - ['buy_gift', '', '购买次数赠品'], - ['normal_gift', '', '普通狗赠品'], - ['free_type', 0, '免费类型 0:不免费 1:日刷新'], - ['shop_icon', 0, '商品图标'], - ['gg_product_id', 0, '谷歌商品id'], - ['gg_product_id', 0, 'ios商品id'], - ['bonus', 0, 'bonus'], - ['bonus_num', 0, 'bonus_num'], - ] - -class Goods(object): - - def __init__(self): - self.fields = [ - ['goods_id', 0, '商品唯一id'], - ['goods_meta', GoodsInfo(), '商品元信息(配置表数据)'], - ['bought_times', 0, '已购买次数'], - ['free_num', 0, '免费次数'], - ] - -class NewGoods(object): - def __init__(self): - self.fields = [ - ['id', 0, '商品唯一id'], - ['goods_id', 0, '商品id'], - ['goods_num', 0, '堆叠个数,例如:砖石数量'], - ['max_amount', 0, '最高购买数量,单次购买'], - ['shop_id', 0, '所属商店id'], - ['shopstage', 0, '商店层级'], - ['tag', 0, '标签'], - ['recommend', 0, '推荐页位置'], - ['token_type', '', '代币类型 参见shopGoods表格'], - ['price', '', '价格 多种价格设置使用 | 隔开'], - ['discount', '', '折扣 参见shopGoods表格'], - ['limit_type', 0, '限购类型'], - ['limit_num', 0, '限购数量'], - ['buy_cond', '', '购买条件'], - ['buy_gift', '', '购买次数赠品'], - ['normal_gift', '', '普通狗赠品'], - ['bought_times', 0, '已购买次数'], - ['free_type', 0, '免费类型 0:不免费 1:日刷新'], - ['free_num', 0, '免费次数'], - ['pending', 0, '购买中...'], - ] - -class Shop(object): - - def __init__(self): - self.fields = [ - ['shop_id', 0, '商店id'], - ['!goods_list1', [Goods()], '商品列表1'], - ['!goods_list2', [Goods()], '商品列表2'], - ] - -class PayMethod(object): - - def __init__(self): - self.fields = [ - ['id', 0, '支付方式id'], - ['name', '', '支付方式名称'], - ['icon', '', '支付方式图标'], - ['shop_token_type', 0, '代币类型'], - ['pay_way_code', 0, '支付方式code'], - ] - -class DailySelectionGoods(object): - - def __init__(self): - self.fields = [ - ['id', 0, '商品表唯一id'], - ['slot', "", '商品槽位'], - ['goods_id', 0, '商品id'], - ['goods_num', 0, '商品堆叠数量'], - ['shop_icon', "", '商品图标'], - ['weight', 0, '权重'], - ['token_type', '', '代币类型(4|0)'], - ['discount', '', '折扣(95|80)'], - ['price', '', '价格(100|100000)'], - ] - -class Mission(object): - - def __init__(self): - self.fields = [ - ['mission_id', 0, '任务id'], - ['last_game', 0, '上局游戏完成的进度 -1:不用在战斗结束展示'], - ['current', 0, '任务进度-当前'], - ['target', 0, '任务进度-目标'], - ['state', 0, '任务状态 0:任务已完成-可领取奖励 1:可接任务(send) 2:任务进行中-未完成(不可领取)'], - ['show_progress', 0, '是否显示任务进度'], - ['objects!', - [ - ['type', '', '类型 0:武器 1:英雄'], - ['id', '', 'id'], - ], - '悬赏任务对象列表'], - ['lefttime', 0, '剩余时间(悬赏任务)'], - ['ceg_num', 0, '奖励ceg数量(悬赏任务)'], - ] - -class SeasonCardGiftPackage(object): - - def __init__(self): - self.fields = [ - ['package_id', 0, '礼包id'], - ['item_id', 0, '礼包道具表id(目前客户端没用到先不用管)'], - ['state', 0, '0:未购买 1:已购买'], - ['price_info', PriceInfo(), '价格信息'], - ] - -class SeasonCard(object): - - def __init__(self): - self.fields = [ - ['season_id', 0, '赛季id(客户端显示为Sxxx)'], - ['season_begin_time', 0, '赛季开始时间(utc时间)'], - ['season_end_time', 0, '赛季结束时间(utc时间)'], - ['card_lv', 0, '手册等级'], - ['card_exp', 0, '手册经验'], - ['card_max_exp', 0, '手册经验上限'], - ['buy_level_price', 0, '等级价格(钻石)'], - ['!gift_packages', [SeasonCardGiftPackage()], '礼包列表'], - ['!received_level_rewards1', [0], '等级解锁的奖励已领取等级列表(普通手册)'], - ['!received_level_rewards2', [0], '等级解锁的奖励已领取等级列表(精英)'], - ] - -class SeasonMission(object): - - def __init__(self): - self.fields = [ - ['state', 0, '任务状态 0:可领取 1:已领取 2:未完成(不可领取)'], - ['current', 0, '当前匹配场次'], - ['target', 0, '目标匹配场次'], - ['target_rank', 0, '目标段位'], - ] - -class Season(object): - - def __init__(self): - self.fields = [ - ['season', 0, '赛季'], - ['season_name', 0, '赛季name'], - ['rank', 0, '段位id'], - ['rank_name', 0, '段位名称'], - ['score', 0, '排位分'], - ['next_score', 0, '下阶段排位分'], - ['season_end_time', 0, '赛季结束时间'], - ['season_reward',SeasonReward(), '赛季该获得的奖励'], - ['current_point', 0, '当前赛季积分'], - ['total_point', 0, '所有赛季总积分'], - ] - -class SeasonReward(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '奖励的item id'], - ['item_num', 0, '奖励的数量'], - - ] - -class SeasonRank(object): - - def __init__(self): - self.fields = [ - ['ranking', 0, '排名'], - ['name', 0, '用户名称'], - ['head_id', 0, '头像'], - ['head_frame', 0, '头像框'], - ['rank', 0, '段位'], - ['score', 0, '积分'], - ['point', 0, 'SV积分'], - ] - - -class SeasonData(object): - - def __init__(self): - self.fields = [ - ['season_id', 0, '赛季id'], - ['game_times', 0, '排位总场次'], - ['win_times', 0, '吃鸡场次'], - ['top_ten_times', 0, '挤进前十场次'], - ['kill_killed', 0, '淘汰/被淘汰'], - ] - -class SeasonHero(object): - - def __init__(self): - self.fields = [ - ['season_id', 0, '赛季id'], - ['hero', 0, '英雄 id'], - ['weapon', 0, '枪械id 例:id 或 id1|id2 '], - ['use_times', 0, '使用总场次'], - ['win_times', 0, '吃鸡常常'], - ['top_ten_times', 0, '前十场次'], - ['win_rate', 0, '获胜率'], - ['top_ten_rate', 0, '前十率'], - ] - -class RankingItem(object): - - def __init__(self): - self.fields = [ - ['ranked', 0, '排名'], - ['user', UserSimple(), '用户信息'], - ['value', 0, '击杀数/吃鸡数/战斗场数/mvp数/前三名数'], - ] - -class RankingList(object): - - def __init__(self): - self.fields = [ - ['type', 0, '排行榜类型 1:积分榜'], - ['!ranking_list', [RankingItem()], '排行榜'], - ['my_ranked', RankingItem(), '我的排名(如果ranked<1则表示自己未上榜)'], - ] -class GuildEx(object): - - def __init__(self): - self.fields = [ - ['guild_id', 0, '工会id'], - ['guild_name', '', '工会名称'], - ['guild_badge', '', '工会头像'], - ['owner_id', '', '会长id'], - ['owner_name', '', '会长名称'], - ] - -class RankingItemEx(object): - - def __init__(self): - self.fields = [ - ['ranked', 0, '排名'], - ['user', UserSimple(), '用户信息(type为4是空数组)'], - ['guild', GuildEx(), '工会信息(无工会为空数组)'], - ['value', 0, '击杀数/吃鸡数/战斗场数/工会总Test_CEG收益'], - ['rewardNum', 0, '奖励'], - ['extraRewardNum', 0, '额外奖励'], - ] - -class RankingListEx(object): - - def __init__(self): - self.fields = [ - ['type', 0, '排行榜类型 1:击杀榜 2:吃鸡榜 3:场次榜 4:工会榜'], - ['pages', 0, '总页数 0表示无需分页'], - ['!rows', [RankingItemEx()], '排行榜'], - ['my_ranked', RankingItemEx(), '我的排名(如果ranked<1则表示自己未上榜)'], - ] - -class RedDot(object): - - def __init__(self): - self.fields = [ - ['type', 0, '红点类型'], - ['state', 0, '红点状态 0:无 1:有'], - ] - -class TeamMember(object): - - def __init__(self): - self.fields = [ - ['account_id', '', '账号id'], - ['address', '', 'openid'], - ['name', '', '用户名字'], - ['hero_uniId', 0, 'hero uniid'], - ['hero_id', 0, 'hero itemId'], - ['hero_skin', 0, '英雄皮肤 itemId'], - ['head_id', 0, '头像id'], - ['level', 0, '等级'], - ['exp', 0, '经验'], - ['rank', 0, '段位'], - ['pve_instance_id', 0, 'pve难度id'], - ['parachute', 0, '降落伞id'], - ['presetInfo', HeroPreset(), '备战信息'], - ['game_times', 0, '游戏次数'], - ['win_times', 0, '胜利次数'], - ['kills', 0, '击杀数'], - ['is_leader', 0, '是否队长'], - ['is_ready', 0, '是否准备'], - ['permission', 0, '邀请许可'], - ['createtime', 0, '账号创建时间'], - ] - -class TeamInfo(object): - - def __init__(self): - self.fields = [ - ['map_id', '', '地图id'], - ['node_id', '', 'node_id'], - ['zid', '', 'zid'], - ['team_uuid', '', '队伍唯一id'], - ['payload', '', '透传给CMJoin'], - ['match_mode', 0, '0: 匹配赛模式 1: 排位赛 3: pve'], - ['pve_instance_id', 0, 'pve副本id'], - ['slot_num', 0, '槽位数 >=1 && <= 4'], - ['state', 0, '0:未开始 1:准备就绪(这时客户端进入长链接走组队逻辑)'], - ['custom_room', CustomRoom(), '自定义房间'], - ['!member_list', [TeamMember()], '队伍成员列表(包含自己)'], - ] - -class CustomRoom(object): - - def __init__(self): - self.fields = [ - ['custom_room_id', '', '自定义房间的ID'], - ['custom_room_state', '', '自定义房间的状态'], - ['custom_room_pwd', '', '自定义房间的密码'], - ] - -class BuyableBox(object): - - def __init__(self): - self.fields = [ - ['box_id', '', '箱子id'], - ] - -class PreSaleInfo(object): - - def __init__(self): - self.fields = [ - ['batch_id', 0, '批次id(目前客户端没用到先不用管)'], - ['countdown', 0, '预售倒计时'], - ['sold_num', 0, '已售数'], - ['total_num', 0, '总数'], - ['state', 0, '0:预售未开始(tilte文字) 1:预售准备开始(有倒计时) 2:预售开始(title文字) 3:预售结束(title)'], - ['title', '', '预售文字标题描述 '], - ['hint', '', '预售文字描述'], - ['buyable_list!', [BuyableBox()], '可购买商品列表'], - ] - -class PreSaleBox(object): - - def __init__(self): - self.fields = [ - ['box_id', '', '箱子id'], - ['item_id', 0, '道具id(根据这个读取箱子的图片)'], - ['name', '', '名字'], - ['job', '', '职业'], - ['avatar_url', '', '头像完整url'], - ['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'], - ] - -class NftHeroDetail(object): - - def __init__(self): - self.fields = [ - ['name', '', '英雄名'], - ['job', '', '职业'], - ['level', 0, '等级'], - ['quality', 0, '星级'], - ['hp', 0, '血量'], - ['speed', 0, '速度'], - ['atk', 0, '攻击'], - ['def', 0, '防御'], - ['advanced_count', 0, '升级次数'], - ['lukcy', 0, '幸运'], - ['success_rate', 0, '成功率'], - ['!attr', [AttrDesc()], '属性'], - ] - -class NftGunDetail(object): - - def __init__(self): - self.fields = [ - ['name', '', '枪支名'], - ['level', 0, '等级'], - ['quality', 0, '星级'], - ['lukcy', 0, '幸运'], - ['clip_volume', 0, '弹夹数'], - ['reload_time', 0, '装弹时间'], - ['fire_rate', 0, '射击速度'], - ['atk', 0, '攻击'], - ['bullet_speed', 0, '子弹速度'], - ['range', 0, '射程'], - ['!attr', [AttrDesc()], '属性'], - ] - -class NftChipDetail(object): - - def __init__(self): - self.fields = [ - ['name', '', '芯片名'], - ['!attr', [AttrDesc()], '属性'], - ] - -class TransactionRecrod(object): - - def __init__(self): - self.fields = [ - ['from', '', '来源钱包'], - ['date', 0, '交易日期(utc时间)'], - ] - -class NftDetail(object): - - def __init__(self): - self.fields = [ - ['token_id', '', 'token id'], - ['owner_address', '', '所有者地址'], - ['owner_name', '', '所有名字'], - ['item_id', 0, '道具id'], - ['type', '', 'nft类型 1:英雄 2:枪支 3:芯片 4:盲盒'], - ['image', '', 'nft图片地址'], - ['state', 0, '0:正常状态 1:出售中 2:出租中'], - ['lock_time', 0, '锁定时间(单位秒)'], - ['hide_attr', 0, '是否隐藏属性'], - ['is_genesis', 0, '是否创世nft'], - ['info', Union([ - [NftHeroDetail(), '英雄'], - [NftGunDetail(), '枪支'], - [NftChipDetail(), '芯片'], - ]), 'nft详细信息'], - ['!transaction_recrod', [TransactionRecrod()], '交易记录'], - ['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'], - ['mint_time', 0, '铸造时间'], - ] - -class NftView(object): - - def __init__(self): - self.fields = [ - ['name', '', 'nft名字'], - ['description', '', 'nft描述'], - ['image', '', 'nft图片'], - ] - -class Phase3Box(object): - - def __init__(self): - self.fields = [ - ['box_id', '', '箱子id'], - ] - -class ChipAttr(object): - - def __init__(self): - self.fields = [ - ['attr_id', 0, '属性id'], - ['val', 0, '综合属性值'], - ] - -class Chip(object): - - def __init__(self): - self.fields = [ - ['idx', 0, '主键id'], - ['token_id', '', 'token id'], - ['account_id', '', '账号id'], - ['item_id', 0, '道具id'], - ['item_num', 0, '道具数量'], - ['chip_grade', 0, '芯片等级'], - ['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'], - ['state', 0, '0:已购买 1:免费(GIFT标签)'], - ['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'], - ['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'], - ['!rand_attr', [ChipAttr()], '属性'], - ['tags', '', '1:Gen状态'], - ] - -class ChipPro(object): - - def __init__(self): - self.fields = [ - ['idx', 0, '主键id'], - ['token_id', '', 'token id'], - ['account_id', '', '账号id'], - ['item_id', 0, '道具id'], - ['item_num', 0, '道具数量'], - ['chip_grade', 0, '芯片等级'], - ['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'], - ['state', 0, '状态:0 免费;1 常规'], - ['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'], - ['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'], - ['!rand_attr', [ChipAttr()], '属性'], - ['!rand_attr_after', [ChipAttr()], '芯片升级后的属性'], - ['cost',[],'升级所需gold消耗'] - ] - -class BattleMember(object): - - def __init__(self): - self.fields = [ - ['account_id', '', '账号id'], - ['session_id', '', '会话id'], - ['hero_uniid', '', '英雄唯一id'], - ['weapon_uniid1', '', '武器1唯一id'], - ['weapon_uniid2', '', '武器2唯一id'], - ] - -class Cost(object): - - def __init__(self): - self.fields = [ - ['CEG', '', '金币'], - ['CEC', '', '钻石'], - ['success_rate', '', '成功率(进阶有,升级没有)'], - ] - -class Fragment(object): - - def __init__(self): - self.fields = [ - ['idx', 0, '主键id'], - ['token_id', '', 'token id'], - ['item_id', '', '道具id'], - ['balance', '', '数量'], - ['createtime', 0, '创建时间'], - ['modifytime', 0, '修改时间'], - ] - -class HisBattle(object): - - def __init__(self): - self.fields = [ - ['battle_uuid', '', '本次比赛唯一id'], - ['victory', 0, '是否胜利'], - ['room_mode', 0, '0:吃鸡模式 1:歼灭模式 2:生存模式'], - ['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'], - ['team_mode', 0, '组队模式 1:单人 2::多人'], - ['result', '', '比赛结果 当pve模式时: 1:通关 2:通关失败 其他模式:排名'], - ['kills', '', '击杀数'], - ['hero_id', '', '英雄id'], - ['weapon1_id', '', '武器1 id'], - ['weapon2_id', '', '武器2 id'], - ['level_class', 0, '段位'], - ['score', 0, '段位-积分'], - ['score_change', 0, '段位-积分变更'], - ['pve_score', 0, 'pve积分 pve模式'], - ['map_id', 0, '地图id'], - ['pve_instance_id', 0, '副本id'], - ['end_time', 0, '战斗时间 utc时间 客户端自己处理时区问题'], - ] - -class BattleReport(object): - - def __init__(self): - self.fields = [ - ['battle_uuid', '', '本次比赛唯一id'], - ['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'], - ['team_mode', 0, '组队模式 1:单人 2::多人'], - ] - -class BattleCegReward(object): - - def __init__(self): - self.fields = [ - ['hero_uniid', '', '唯一id'], - ['id', '', 'id'], - ['gold_uplimit', 0, '当前ceg数量'], - ['obtain_gold', 0, '实际获得ceg数量'], - ['curr_gold', 0, 'ceg数量上限'], - ] - -class BattleItemReward(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '道具id'], - ['item_num', 0, '道具数量'], - ] - - -class BattleRankScore(object): - - def __init__(self): - self.fields = [ - ['old_rank', 0, '战斗前段位'], - ['old_score', 0, '战斗前排位分'], - ['new_rank', 0, '战斗后段位'], - ['new_score', 0, '战斗后排位分'], - ] - -class BattleHistory(object): - - def __init__(self): - self.fields = [ - ['idx', 0, '唯一id'], - ['battle_uniid', 0, '战斗记录唯一id'], - ['account_id', '', '用户 account_id'], - ['room_mode', 0, '0: pvp 1: pve'], - ['pvp_mode', 0, '0: 匹配 1: 排位'], - ['team_mode',0, '0:单人 1:组队'], - ['battle_rank', 0, '战斗排名'], - ['team_rank',0, '团队排名'], - ['is_win', 0, 'pve冒险是否胜利'], - ['kills',0, '击杀数'], - ['hero_id',0, '英雄 id'], - ['weapon1', 0, '枪械1 id'], - ['weapon2', 0, '枪械2 id'], - ['damage', 0, '伤害'], - ['battle_end_time', 0, '战斗结束时间'], - ['current_level_class', '', '当前用户段位'], - ['current_level_class_score', 0, '当前用户排位分'], - ['level_class_score_chg', 0, '排位分改变'], - ['pve_rank_score', 0, 'pve冒险积分'], - ['pve_kill_boss', 0, 'pve冒险是否击杀BOSS'], - ['battle_foreign_key', 0, '结算外键'], - ['pve_instance_id', 0, 'pve副本难度id'], - ['pve_instance_mode', 0, 'pve副本mode'], - ] - -class NftTransaction(object): - - def __init__(self): - self.fields = [ - ['trans_id', 0, 'trans_id'], - ['item_id', 0, '道具id'], - ['action', 0, '动作'], - ['time', 0, '时间'], - ['status', 0, '1:已完成 2:等待中'], - ] - -class EventRankingList(object): - - def __init__(self): - self.fields = [ - ['id', 0, 'id'], - ['wave', 0, '活动轮数'], - ['themeType', 0, '1 击杀榜,2 吃鸡榜,3 场次榜,4 工会榜'], - ['themeName', '', '活动名称'], - ['startTime', '', '开始时间'], - ['endTime', '', '结束时间'], - ['status', 0, '0:已结束 1:进行中 2:等待中'], - ] - -class Currency(object): - - def __init__(self): - self.fields = [ - ['account_id', '', 'account_id'], - ['net_id', 0, '链id'], - ['address', '', '货币地址'], - ['symbol', '', '符号'], - ['precision', 0, '精度'], - ['type', 0, '1:ERC721 2:ERC1155 3:ERC20'], - ] - -class Emoji(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, 'item_id'], - ['state', 0, '1:使用 0:未使用'], - ] - -class ChipPageList(object): - - def __init__(self): - self.fields = [ - ['idx', 0, 'idx'], - ['account_id', 0, 'account_id'], - ['page_id', 0, '页id'], - ['page_name', '', '页名'], - ['createtime', 0, '创建时间'], - ] - -class ChipPage(object): - - def __init__(self): - self.fields = [ - ['idx', 0, 'idx'], - ['page_id', 0, '页id'], - ['page_name', '', '页名'], - ['!data', [ChipPageSlot()], '卡槽信息'], - ['!attr', [Attr()], '属性信息'], - ] - -class ChipPageSlot(object): - - def __init__(self): - self.fields = [ - ['slot_id', 0, '卡槽id'], - ['state', 0, '0:未解锁 1:已解锁'], - ['chip_id', '', '芯片idx'], - ] - -class HeroPreset(object): - - def __init__(self): - self.fields = [ - ['skill_id', 0, '技能item id'], - ['weapon_uid1', 0, '武器1唯一id'], - ['weapon_uid2', 0, '武器2唯一id'], - ['gun_id1', 0, '武器1 item id'], - ['gun_id2', 0, '武器2 item id'], - ['chip_page', 0, '芯片页id'], - ] - -class TeamReportMember(object): - - def __init__(self): - self.fields = [ - ['account_id', '', '账号id'], - ['name', '', '名字'], - ['head', 0, '头像id'], - ['head_frame', 0, '头像框'], - ['sex', 0, '性别'], - ['dead', 0, '是否已死亡'], - ['is_mvp', 0, '是否mvp'], - - ['hero_id', 0, '英雄id'], - ['hero_uniid', 0, '英雄uniid'], - ['hero_quality', 0, '英雄quality'], - ['game_time', 0, '游戏时间'], - ['alive_time', 0, '存活时间'], - ['ranked', 0, '排名'], - ['kills', 0, '击杀数'], - ['damage_out', 0, '伤害输出'], - ['weapon_uuid1', '', 'weapon_uuid1'], - ['weapon_uuid2', '', 'weapon_uuid2'], - ['rescue_teammate_times', 0, '救起队友次数'], - ['diving_times', 0, '潜水次数'], - ['damage_in', 0, '伤害输入'], - ['recover_hp', 0, '治疗量'], - ['open_airdrop_times', 0, '开启空投补给次数'], - ['use_medicine_times', 0, '使用药物次数'], - ['destory_car_times', 0, '破坏载具次数'], - ['use_camouflage_times', 0, '使用伪装物'], - ['use_skill_times', 0, '使用技能次数'], - ['ride_car_move_distance', 0, '驾驶或乘坐载具累计移动X米'], - ['ride_car_kills', 0, '驾驶或乘坐载具累计击杀X个敌人'], - ['max_hero_skill_lv', 0, '单局内英雄技能升级到X级'], - ['weapons_type', '', '武器信息 weapon_id:kills:damage_out:obtain_count|'], - ['weapons_slot', '', '武器信息 weapon_id:use_times|'], - ['heros', '', '武器信息 hero_id:skill_lv:weapon_lv|'], - - ['pvp_kill', 0, 'pvp击杀敌人数'], - ['pvp_damage', 0, 'pvp上海总量'], - ['pvp_assist', 0, 'pvp助攻'], - ['pvp_survia_time', 0, 'pvp存活时间(毫秒)'], - ['pvp_recover', 0, 'pvp治疗总量'], - ['pvp_rescue', 0, 'pvp救援'], - ['pvp_personal_rank', 0, 'pvp个人排名'], - - ['pve_order', 0, 'pve波次'], - ['pve_score', 0, 'pve分数'], - ['pve_star', 0, 'pve星'], - ['pve_damage', 0, 'pve伤害总量'], - ['pve_revive', 0, 'pve复活次数'], - ['pve_survia_time', 0, 'pve存活时间(毫秒)'], - ['pve_wave', 0, 'pve波次'], - ['pve_max_wave', 0, 'pve最大波次'], - ['pve_boss_killed', 0, 'pve副本boss是否被击杀'], - ['pve_rank_score', 0, 'pve积分'], - ] - -class TeamReportTeam(object): - - def __init__(self): - self.fields = [ - ['team_id', 0, '队伍id'], - ['!members', [['account_id', '', '账号id']], '枪械属性'], - ] - -class BattleSettlement(object): - - def __init__(self): - self.fields = [ - ['version', 0, '版本'], - ['battle_uuid', 0, '本次战斗唯一id'], - ['team_id', 0, '队伍id'], - ['room_uuid', 0, '房间唯一id'], - ['room_mode', 0, '0:pvp 1: pve'], - ['team_mode', 0, '0:个人 1:组队(保留)'], - ['game_over', 0, '游戏是否结束'], - ['victory', 0, '是否胜利(pvp:吃鸡 pve:是否通关)'], - ['watchable', 0, '是否可观战,小胡那的接口写死0(看历史不可观战)'], - ['map_id', 0, '地图id'], - ['settlement_status', 0, '0: 结算中(读取个人结算数据) 1:已结算(请求小胡接口)'], - ['pvp_settlement_type', 0, '結算類型0:個人 1:組隊(保留)'], - ['pvp_settlement_color', 0, '0:灰 1:黃'], - ['pvp_team_rank', 0, '队伍排名'], - ['pvp_total_human_num', 0, '房间总人数'], - ['pvp_alive_human_num', 0, '房间剩余存活人数'], - ['pvp_total_team_num', 0, '本次战斗队伍总数'], - ['pvp_match_mode', 0, '比赛模式 0: pvp 1:排位赛'], - ['pve_settlement_color', 0, '0:灰 1:黃'], - ['pve_wave', 0, 'pve波次'], - ['pve_max_wave', 0, 'pve总波次'], - ['pve_instance_id', 0, 'pve副本id'], - ['!members', [BattleSettlementMembersInfo()], '队伍成员信息'], - ] - -class BattleSettlementMembersInfo(object): - - def __init__(self): - self.fields = [ - ['account_id', 0, '账号id(真人才有account_id)'], - ['name', '', '玩家名字'], - ['head', 0, '头像id'], - ['head_frame', 0, '头像框'], - ['sex', 0, '性别'], - ['hero_uniid', 0, '英雄uniid'], - ['hero_id', 0, '英雄itemId'], - ['dead', 0, '是否已死亡'], - ['is_mvp', 0, '是否mvp'], - ['old_rank', 0, '老段位'], - ['new_rank', 0, '新段位'], - ['old_score', 0, '老段位积分'], - ['new_score', 0, '新段位积分'], - ['pvp_kill', 0, 'pvp击杀敌人数'], - ['pvp_damage', 0, 'pvp伤害总量'], - ['pvp_assist', 0, 'pvp助攻'], - ['pvp_survia_time', 0, 'pvp存活时间(毫秒)'], - ['pvp_recover', 0, 'pvp治疗总量'], - ['pvp_rescue', 0, 'pvp救援'], - ['pvp_personal_rank', 0, '个人排名'], - ['pve_order', 0, 'pve波次'], - ['pve_score', 0, 'pve分数'], - ['pve_star', 0, 'pve星'], - ['pve_damage', 0, 'pve伤害总量'], - ['pve_revive', 0, 'pve复活次数'], - ['pve_survia_time', 0, 'pvp存活时间(毫秒)'], - ['pve_wave', 0, 'pve波次'], - ['pve_max_wave', 0, 'pve总波次'], - ['pve_boss_killed', 0, 'pve副本boos是否被击杀'], - ['reward', BattleReward(), 'reward'], - ] - -class BattleReward(object): - - def __init__(self): - self.fields = [ - ['hero', BattleCegReward(), '英雄奖励'], - ['!items', [BattleItemReward()], '碎片奖励'], - ] - - -class Reward(object): - - def __init__(self): - self.fields = [ - ['id', 0, 'id'], - ['group', '', 'group'], - ['goods_id', 0, 'goods_id'], - ['goods_num', 0, '堆叠数量'], - ['shop_icon', 0, '商店图标'], - ] - - -class Sign(object): - - def __init__(self): - self.fields = [ - ['sign_id', 0, '签到id'], - ['days', 0, '累计天数'], - ['condition', 0, '签到条件(天数)'], - ['is_receive', 0, '领取状态 0:可领取 1:已领取 -1:未达到'], - ['!award', [AwardItem()], '奖励信息'], - ] - -class ShopTrans(object): - - def __init__(self): - self.fields = [ - ['trans_id', '', 'trans_id'], - ['!params', [''], 'params'], - ['item_id', 0, 'item_id'], - ['item_num', 0, 'item_num'], - ] - -class BlindBoxResult(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, 'item_id'], - ['item_num', 0, 'item_num'], - ] - -class InappPurchaseRecord(object): - def __init__(self): - self.fields = [ - ['productId', '', '商品id'], - ['gameOrderId', '', '游戏订单id'], - ['orderId', '', 'google订单id'], - ['status', 0, '订单状态'], - ] - -class TransactionRecordNew(object): - def __init__(self): - self.fields = [ - ['idx', '', 'idx'], - ['createtime', 0, '交易成功时间'], - ['order_id', 0, 'market订单id'], - ['o_link', '', '合约订单id'], - ['seller', '', '卖家'], - ['buyer', '', '买家'], - ['tokenid', '', 'tokenid'], - ['amount', 0, '商品数量'], - ['name', '', '商品名称'], - ['type', 0, '商品类型'], - ] - -class CurrencyType(object): - def __init__(self): - self.fields = [ - ['name', '', '货币名称'], - ['address', '', '货币地址'], - ] - -class MarketGoods(object): - - def __init__(self): - self.fields = [ - ['order_id', '', '订单id'], - ['token_id', '', 'token_id'], - ['nft_token', '', 'nft_token'], - ['amount', '', 'amount'], - ['seller', '', '售卖方'], - ['currency', '', '货币'], - ['price', '', '出售价格'], - ['selltime', 0, '上架时间'], - ['updatetime', 0, '修改时间(更新价格等)'], - ['details', NftDetail(), 'nft列表'], - ] - -class MallGoods(object): - - def __init__(self): - self.fields = [ - ['goods_uuid', '', '商品唯一id'], - ['seller', '', '出售方账号'], - ['seller_address', '', '出售方钱包地址'], - ['item_id', '', '商品道具id'], - ['item_num', '', '道具数量'], - ['currency', '', "选用币种 目前只支持CEG USDC USDT"], - ['price', '', '出售价格'], - ['selltime', 0, '上架时间'], - ['updatetime', 0, '修改时间(更新价格等)'], - ['cancel_countdown', 0, '可下架时间倒计时:-1不可下架'], - ['modify_countdown', 0, '可修改价格倒计时:-1不可修改价格'], - ] - -class ComputingPowerCurr(object): - - def __init__(self): - self.fields = [ -# ['current_state', '', '周期状态 -1:算力周期未开始 0:正常周期 1:等待周期 2:维护周期'], - ['period_begin', '', '本期开始时间(0 不显示)'], - ['period_end', '', '本期结束时间(0 不显示)'], - ['await_time', '', '结算等待时间'], - ['assignable_cec', '', '可分配的总cec奖励'], - ['cec_pool', '', '总cec奖励池'], -# ['total_target', '', '全服算力总目标'], - -# ['refresh_remain_time', '', '刷新剩余时间'], - ['total_hash_rate', '', '全服总兑换算力'], - ['total_exchange_hash_rate', '', "玩家已兑换算力"], - ] - -class ComputingPowerReward(object): - - def __init__(self): - self.fields = [ - ['cec', 0, 'cec奖励'], - ['point', 0, '科技值'], - ] - -class ComputingPower(object): - - def __init__(self): - self.fields = [ - ['period_state', 0, '周期状态 -1:算力周期未开始 0:正常周期 1:等待周期 2:维护周期'], - ['curr_period', ComputingPowerCurr(), '本期相关信息'], - ['curr_reward', ComputingPowerReward(), '本期奖励信息'], - ['listing_state', 0, 'listing状态 0:之前 1:之后'], - ['owned_cec', 0, '拥有的cec数量'], - ['owned_total_hash_rate', 0, '用户总科技值'], - ['owned_total_crystal', 0, '用户总晶体数'], - ] - -class CrystalUI(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, 'item_id'], - ['pending', 0, 'pending'], - ['total', CrystalUIParam(), '统计信息'], - ['claimed', 0, '已领取的数量'], - ['state', 0, '是否能领取 1:可领取 0:反之'], - ] - -class CrystalUIParam(object): - - def __init__(self): - self.fields = [ - ['param1', 0, '击杀数/其它晶体的价值数'], - ['param2', 0, '星星数'], - ['param3', 0, '升段数'], - ] - -class ExchangeCrystalRecord(object): - - def __init__(self): - self.fields = [ - ['item_id', 0, '晶体item'], - ['item_num', 0, '晶体数'], - ['createtime', 0, '领取时间'], - ] - -class ExchangeCrystalNum(object): - - def __init__(self): - self.fields = [ - ['num1', 0, '本期晶体260001兑换数'], - ['num2', 0, '本期晶体260002兑换数'], - ['num3', 0, '本期晶体260003兑换数'], - ['num4', 0, '本期晶体260004兑换数'], - ] - -class CECRewardHistory(object): - - def __init__(self): - self.fields = [ - ['hash_rate', 0, '算力数量'], - ['cec_num', 0, 'cec数量'], - ['state', 0, '领取状态 1:全部领取 0:反之'], - ['week1', 0, '1:已领取 反之则是发放的时间戳'], - ['week2', 0, '1:已领取 反之则是发放的时间戳'], - ['week3', 0, '1:已领取 反之则是发放的时间戳'], - ['week4', 0, '1:已领取 反之则是发放的时间戳'], - ['txHash1', 0, '第一周地址'], - ['txHash2', 0, '第二周地址'], - ['txHash3', 0, '第三周地址'], - ['txHash4', 0, '第四周地址'], - ['create_time', 0, '结算时间'], - ['pending_num', 0, '剩余未领取的cec数量'], - ] - -class Staking(object): - - def __init__(self): - self.fields = [ - ['type', 0, '1: planet 2: badge 3:cec'], - ['is_open', 0, '功能是否开启'], - ['staked_quant', 0, '质押数量'], - ['claim_rewards', 0, '当前类型自从已产出利息累计'], - ['daily_rewards', 0, '每天产出的利息总和'], - ['staking_value', 0, '在质押状态的价值总和'], - ['maturity_quant', 0, '已到期资产的数量'], - ] - -class StakingDetail(object): - - def __init__(self): - self.fields = [ - ['trans_id', '', '本次质押交易唯一id'], - ['token_id', '', 'token id'], - ['token_type', '', 'token type'], - ['contract_address', '', 'contract address'], - ['net_id', '', 'net_id'], - ['order_id', '', 'order_id'], - ['start_time', '', '质押开始时间'], - ['stake_time', '', '质押时间'], - ['redeem_time', '', '赎回时间'], - ['txhash', '', 'txhash'], - - ['item_id', 0, '道具id'], - ['stacked_num', 0, '质押数量'], - ['total_rewards', 0, '该nft已产生的利息'], - ['daily_rewards', 0, '该nft每天可以产生多少利息'], - ['cec_value', 0, '该nft的价值'], - ['cec_rewards', 0, '该nft结算得到的ceg数量'], - ['stacked_days', 0, '该nft质押的总天数'], - ['remain_days', 0, '该nft剩余质押天数'], - ] - -class StakingPreview(object): - - def __init__(self): - self.fields = [ - ['time', 0, '天数'], - ['interest', 0, '利息'], - ] - -class AvatarInfo(object): - - def __init__(self): - self.fields = [ - ['avatar_uniid', '', '装饰唯一id'], - ['account_id', '', 'account_id'], - ['token_id', '', 'token_id'], - ['item_id', 0, 'item_id'], - ['item_type', 0, '1:翅膀'], - ['status', 0, '0:为穿戴 1:已穿戴'], - ['hero_uniid', 0, '穿戴的英雄唯一id'], - ] - -class BattleData(object): - - def __init__(self): - self.fields = [ - ['account_id','','account_id'], - ['session_id','','session_id'], - ['battle_uuid','','battle_uuid'], - ['match_mode',0,'0:匹配 1:排位 2:pve'], - ['rank', 0, '当前段位'], - ['name','','用户名字'], - ['level',0,'用户等级'], - ['revive_coin',0,'复活币'], - ['hero_uniid',0,'英雄 uniid'], - ['hero_id',0,'英雄 item id'], - ['weapon_uuid1',0,'武器1 uniid'], - ['weapon_uuid2',0,'武器2 uniid'], - ['parachute',0,'降落伞 item id'], - ['hero_skin',0,'英雄皮肤 item id'], - ['skill_id',0,'备战技能 item id'], - ['battle_times',0,'战斗次数'], - ['chip_page', Attr(),'铭文页属性'], - ['hero_dto','','英雄详情'], - ['weapon_dto1','','武器1详情'], - ['weapon_dto2','','武器2详情'], - ] - -class BattleTeam(object): - - def __init__(self): - self.fields = [ - ['team_uuid','','队伍唯一id'], - ['!members', BattleData(), '成员数据'], - ] +# -*- coding: utf-8 -*- + +class ReqHead(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['session_id', '', '会话id'], + ] + +class RspHead(object): + + def __init__(self, **kwargs): + self.fields = [ + ['errcode', 0, '错误码/0 成功;1 失败;2余额不足'], + ['errmsg', '', '错误描述'], + ] + for (key, value) in kwargs.items(): + for i in range(0, len(self.fields)): + if self.fields[i][0] == key: + self.fields[i][0] = key + self.fields[i][1] = value + break + +class Union(object): + + def __init__(self, fields): + self.doc = 'Union 联合体的访问方式:.联合体内含结构的字段名' + self.fields = [['', f[0], f[1]] for f in fields] + +class Attr(object): + + def __init__(self): + self.fields = [ + ['attr_id', 0, '属性id'], + ['type', 0, '1: 绝对值 2:百分比 ---弃用字段'], + ['val', 0, '属性值'], + ] + +class AttrDesc(object): + + def __init__(self): + self.fields = [ + ['name', '', '属性名'], + ['attr_id', 0, '属性id'], + ['type', 0, '1: 绝对值 2:百分比 ---弃用字段' ], + ['val', 0, '属性值'], + ] + +class SystemCurrency(object): + + def __init__(self): + self.fields = [ + ['name', '', '货币名称'], + ['original_price', 0, '原价'], + ['discount_price', 0, '折后价'], + ['discount_rate', 0, '折扣百分比(0-100)'], + ['decimals', 0, '小数位数'], + ['contract_address', 0, '合约地址'], + ] + +class Page(object): + + def __init__(self): + self.fields = [ + ['last_idx', '', '回传信息'], + ['total', 0, '总记录数'], + ['count', 0, '当前记录数'], + ['per_page', 0, '每页多少条记录'], + ['current_page', 0, '当前页'], + ['total_pages', 0, '总页数'], + ] + +class Pagination(object): + + def __init__(self): + self.fields = [ + ['total', 0, '总记录数'], + ['count', 0, '当前页查到的记录数'], + ['current_page', 0, '当前第几页'], + ['total_page', 0, '总页数'], + ] + +class Gun(object): + + def __init__(self): + self.fields = [ + ['token_id', '', 'token id'], + ['gun_uniid', 0, '枪唯一id'], + ['gun_id', 0, '枪id'], + ['state', 0, '0:已购买 1:免费(GIFT标签)'], + ['gun_lv', 0, '枪等级'], + ['quality', 0, '品阶'], + ['durability', 0, '耐久'], + ['ceg_uplimit', 0, 'ceg今天获取上限'], + ['!rand_attr', [Attr()], '枪械属性'], + ['try_count', 0, '剩余体验次数 当state=1时才有意义'], + ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], + ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], + ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], + ['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'], + ['current_pvp_get_ceg', 0, '当前pvp获取的ceg数量'], + ['current_pve_get_ceg', 0, '当前pve获取的ceg数量'], + ['last_pvp_get_ceg_time', 0, '最后一次获取pvp获取ceg时间'], + ['last_pve_get_ceg_time', 0, '最后一次获取pve获取ceg时间'], + ['offer_reward_state', 0, '是否悬赏中'], + ['tags', '', '1:Gen状态'], + ['!hero_ids', [], '被使用英雄的item_id'], + ] + +class GunSkin(object): + + def __init__(self): + self.fields = [ + ['gun_id', 0, '枪支id'], + ['skin_id', 0, '皮肤id'], + ['try_expire_at', 0, '试用到期时间(utc时间)'], + ] + +class GunTalent(object): + + def __init__(self): + self.fields = [ + ['talent_id', 0, '天赋'], + ['talent_lv', 0, '天赋等级'], + ] + +class UserInfo(object): + + def __init__(self): + self.fields = [ + ['activated', 0, '是否已激活'], + ['rename_count', 0, '改名次数'], + ['account_id', '', '账号id'], + ['address', '', '钱包地址(空或者null表示没钱包)'], + ['name', '', '用户名字'], + ['head_id', 0, '头像id'], + ['head_frame', 0, '头像框id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['max_exp', 0, '经验(上限)'], + ['rank', 0, '当前段位'], + ['history_best_rank', 0, '历史最高段位'], + ['gold', 0, '金币'], + ['diamond', 0, '钻石'], + ['hero_uniid', 0, '当前使用的英雄唯一ID'], + ['hero_id', 0, '当前使用的英雄ID'], + ['first_fight', 0, '是否是第一次战斗'], + ['already_guide', 0, '是否已经引导'], + ['pve_instance_id', 0, '已过pve副本id 0:一关未过'], + ['!head_list', [0], '拥有的头像列表'], + ['!hero_list', [0], '拥有的立绘背景列表'], + ['!head_frame_list', [0], '拥有的头像框列表'], + ['is_gain_item', 0, '0 为获取,1 以获取'], + ['guild_id', '', '工会id'], + ['guild_job', 0, '工会职位'], + ['guild_name', '', '工会名称'], + ['parachute', '', '当前使用的降落伞id'], + ['!parachute_list', [0], '拥有的降落伞列表'], + ['ring_id', 0, '勋章(戒指)ID'], + ['!ring_list', [0], '勋章(戒指)列表'], + ['!honor_info', [HonorInfo()], '荣誉信息'], + ] + +class HonorInfo(object): + + def __init__(self): + self.fields = [ + ['token_type',0,'NFT 类型'], + ['state',0,'1使用 0未使用'], + ] + +class UserSimple(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['address', '', '钱包地址'], + ['name', '', '用户名字'], + ['head_id', 0, '头像id'], + ['head_frame', 0, '头像框id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['gold', 0, '金币'], + ['diamond', 0, '钻石'], + ['hero_id', 0, '当前使用的英雄ID'], + ['rank', 0, '段位'], + ['score', 0, '积分'], + ['pve_instance_id', 0, '已过pve副本id 0:一关未过'], + ['hero_skin', 0, '出战英雄皮肤'], + ] + +class BcUserInfo(object): + + def __init__(self): + self.fields = [ + ['account', '', '账号'], + ['gold', 0, '金币'], + ['diamond', 0, '钻石'], + ] + +class UserDetailInfo(object): + + def __init__(self): + self.fields = [ + ['activated', 0, '是否已激活'], + ['account_id', '', '账号id'], + ['name', '', '用户名字'], + ['head_id', 0, '头像id'], + ['head_frame', 0, '头像框id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['max_exp', 0, '经验(上限)'], + ['gold', 0, '金币'], + ['diamond', 0, '钻石'], + ['hero_uniid', 0, '当前使用的英雄唯一ID'], + ['hero_id', 0, '当前使用的英雄ID'], + ['current_rank', 0, '当前段位'], + ['history_best_rank', 0, '历史最高段位'], + ['current_rank_score', 0, '当前赛季排位分'], + ['history_best_rank_score', 0, '历史最高赛季排位分'], + ['like_count', 0, '点赞次数'], + ['guild_id', '', '工会id'], + ['guild_job', 0, '工会职位'], + ['guild_name', '', '工会名称'], + ['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'], + ] + +class UserHisSeason(object): + + def __init__(self): + self.fields = [ + ['season_id', 0, '赛季'], + ['total_kills', 0, '击杀总数(个人信息)'], + ['game_times', 0, '游戏场次(个人信息)'], + ['win_times', 0, '胜利场次(个人信息)'], + ['win_rate', 0, '胜率(个人信息,百分比数值整数部分)'], + ['max_kills', 0, '最高击杀(游戏信息)'], + ['avg_kills', 0, '平均击杀(游戏信息)'], + ['max_damage_out', 0, '最高伤害输出(游戏信息)'], + ['avg_damage_out', 0, '平均伤害输出(游戏信息)'], + ['star_kills', 0, '击败(5纬图-击败, 百分比数值整数部分)'], + ['star_damage', 0, '伤害(5纬图-伤害, 百分比数值整数部分)'], + ['star_alive', 0, '生存(5纬图-生存, 百分比数值整数部分)'], + ['star_recover', 0, '治疗(5纬图-治疗, 百分比数值整数部分)'], + ['star_win', 0, '胜利(5纬图-胜利, 百分比数值整数部分)'], + ] + +class Hero(object): + + def __init__(self): + self.fields = [ + ['token_id', '', 'token id'], + ['hero_uniid', 0, '英雄唯一id'], + ['hero_id', 0, '英雄id'], + ['hero_lv', 0, '英雄等级'], + ['hero_tili', 0, '英雄体力'], + ['state', 0, '0:已购买 1:免费(GIFT标签)'], + ['skin_id', 0, '英雄皮肤id'], + ['quality', 0, '品阶'], + ['skill_lv1', 0, '主动技能等级'], + ['skill_lv2', 0, '被动技能等级'], + ['!rand_attr', [Attr()], '英雄属性'], + ['try_count', 0, '剩余体验次数 当state=1时才有意义'], + ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], + ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], + ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], + ['current_get_gold', 0, '当前获取的gold数量'], + ['last_get_gold_time', 0, '最后一次获取gold时间'], + ['gold_uplimit', 0, '每天gold上限'], + ['unlock_trade_time', 0, '出售解锁utc时间(升级或者升阶完成后触发),只锁交易,其他的操作仍可进行,和lock_type无关是独立的锁!!!'], + ['advanced_count', 0, '进阶次数'], + ['offer_reward_state', 0, '是否悬赏中'], + ['tags', '', '1:Gen状态'], + ['!avatarInfo', [AvatarInfo()], '装饰信息'], + + ] + +class LevelingHero(object): + + def __init__(self): + self.fields = [ + ['info', Hero(), '英雄信息'], + ['countdown', 0, '倒计时'], + ] + +class QualityingHero(object): + + def __init__(self): + self.fields = [ + ['trans_id', 0, 'transId'], + ['state', 0, '0升阶中,1可领取'], + ['heroInfo', Hero(), '升阶英雄信息'], + ['costHeroInfo', Hero(), '材料英雄信息'], + ] + +class QualityingGun(object): + + def __init__(self): + self.fields = [ + ['trans_id', 0, 'transId'], + ['state', 0, '0升阶中,1可领取'], + ['gunInfo', Gun(), '升阶枪械信息'], + ['costGunInfo', Gun(), '材料枪械信息'], + ] + +class HeroSkin(object): + + def __init__(self): + self.fields = [ + ['skin_id', 0, '英雄皮肤id'], + ['is_have', 0, '是否拥有 1:拥有 0:未拥有'], + ['use_state', 0, '选中状态 1:选中 0:未选中'], + ] + +class Item(object): + + def __init__(self): + self.fields = [ + ['item_uniid', 0, '道具唯一id'], + ['item_id', 0, '道具id'], + ['item_num', 0, '道具数量'], + ['!attr', [Attr()], '属性'], + ] + +class AwardItem(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '道具id'], + ['item_num', 0, '道具数量'], + ] + +class Award(object): + + def __init__(self): + self.fields = [ + ['!items', [AwardItem()], '奖励物品列表'], + ['!heros', [Hero()], '英雄信息'] + ] + +class PropertyChg(object): + + def __init__(self): + self.fields = [ + ['user_info', UserInfo(), '用户信息变更(用来更新本地客户端字段(有则更新无则不变))'], + ['!container_chg', [''], '容器类数据变更(bag、hero、heroSkin、gunSkin, gun,chip,fragment)'] + ] + +class CostInfoItem(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '购买需要消耗的道具id'], + ['item_num', 0, '购买需要消耗的道具数量'], + ['discount', 0, '折扣百分比(0-100)'], + ] + +class CostInfo(object): + + def __init__(self): + self.fields = [ + ['!cost_group', [CostInfoItem()], '一组扣费项目,(金币、钻石视为道具,可能有多种价格)'], + ] + +class PriceInfo(object): + + def __init__(self): + self.fields = [ + ['!cost_list', [CostInfo()], '扣费方式列表'], + ['discount_begin_time', 0, '折扣开始时间(utc时间)'], + ['discount_end_time', 0, '折扣结束时间(utc时间)'], + ] + +class DiscountInfo(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '道具id'], + ['gold_discount', 0, '金币折扣百分比(0-100)'], + ['diamond_discount', 0, '钻石折扣百分比(0-100)'], + ] + +class ItemPriceInfo(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '道具id'], + ['price_info', PriceInfo(), '价格信息'], + ] + +class GoodsInfo(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '商品id'], + ['item_num', 0, '堆叠个数,例如:砖石数量'], + ['max_amount', 0, '最高购买数量,单次购买'], + ['shop_id', 0, '所属商店id'], + ['shopstage', 0, '商店层级'], + ['tag', 0, '标签'], + ['recommend', 0, '推荐页位置'], + ['token_type', '', '代币类型 参见shopGoods表格'], + ['price', '', '价格 多种价格设置使用 | 隔开'], + ['discount', '', '折扣 参见shopGoods表格'], + ['limit_type', 0, '限购类型'], + ['limit_num', 0, '限购数量'], + ['buy_cond', '', '购买条件'], + ['buy_gift', '', '购买次数赠品'], + ['normal_gift', '', '普通狗赠品'], + ['free_type', 0, '免费类型 0:不免费 1:日刷新'], + ['shop_icon', 0, '商品图标'], + ['gg_product_id', 0, '谷歌商品id'], + ['gg_product_id', 0, 'ios商品id'], + ['bonus', 0, 'bonus'], + ['bonus_num', 0, 'bonus_num'], + ] + +class Goods(object): + + def __init__(self): + self.fields = [ + ['goods_id', 0, '商品唯一id'], + ['goods_meta', GoodsInfo(), '商品元信息(配置表数据)'], + ['bought_times', 0, '已购买次数'], + ['free_num', 0, '免费次数'], + ] + +class NewGoods(object): + def __init__(self): + self.fields = [ + ['id', 0, '商品唯一id'], + ['goods_id', 0, '商品id'], + ['goods_num', 0, '堆叠个数,例如:砖石数量'], + ['max_amount', 0, '最高购买数量,单次购买'], + ['shop_id', 0, '所属商店id'], + ['shopstage', 0, '商店层级'], + ['tag', 0, '标签'], + ['recommend', 0, '推荐页位置'], + ['token_type', '', '代币类型 参见shopGoods表格'], + ['price', '', '价格 多种价格设置使用 | 隔开'], + ['discount', '', '折扣 参见shopGoods表格'], + ['limit_type', 0, '限购类型'], + ['limit_num', 0, '限购数量'], + ['buy_cond', '', '购买条件'], + ['buy_gift', '', '购买次数赠品'], + ['normal_gift', '', '普通狗赠品'], + ['bought_times', 0, '已购买次数'], + ['free_type', 0, '免费类型 0:不免费 1:日刷新'], + ['free_num', 0, '免费次数'], + ['pending', 0, '购买中...'], + ] + +class Shop(object): + + def __init__(self): + self.fields = [ + ['shop_id', 0, '商店id'], + ['!goods_list1', [Goods()], '商品列表1'], + ['!goods_list2', [Goods()], '商品列表2'], + ] + +class PayMethod(object): + + def __init__(self): + self.fields = [ + ['id', 0, '支付方式id'], + ['name', '', '支付方式名称'], + ['icon', '', '支付方式图标'], + ['shop_token_type', 0, '代币类型'], + ['pay_way_code', 0, '支付方式code'], + ] + +class DailySelectionGoods(object): + + def __init__(self): + self.fields = [ + ['id', 0, '商品表唯一id'], + ['slot', "", '商品槽位'], + ['goods_id', 0, '商品id'], + ['goods_num', 0, '商品堆叠数量'], + ['shop_icon', "", '商品图标'], + ['weight', 0, '权重'], + ['token_type', '', '代币类型(4|0)'], + ['discount', '', '折扣(95|80)'], + ['price', '', '价格(100|100000)'], + ] + +class Mission(object): + + def __init__(self): + self.fields = [ + ['mission_id', 0, '任务id'], + ['last_game', 0, '上局游戏完成的进度 -1:不用在战斗结束展示'], + ['current', 0, '任务进度-当前'], + ['target', 0, '任务进度-目标'], + ['state', 0, '任务状态 0:任务已完成-可领取奖励 1:可接任务(send) 2:任务进行中-未完成(不可领取)'], + ['show_progress', 0, '是否显示任务进度'], + ['objects!', + [ + ['type', '', '类型 0:武器 1:英雄'], + ['id', '', 'id'], + ], + '悬赏任务对象列表'], + ['lefttime', 0, '剩余时间(悬赏任务)'], + ['ceg_num', 0, '奖励ceg数量(悬赏任务)'], + ] + +class SeasonCardGiftPackage(object): + + def __init__(self): + self.fields = [ + ['package_id', 0, '礼包id'], + ['item_id', 0, '礼包道具表id(目前客户端没用到先不用管)'], + ['state', 0, '0:未购买 1:已购买'], + ['price_info', PriceInfo(), '价格信息'], + ] + +class SeasonCard(object): + + def __init__(self): + self.fields = [ + ['season_id', 0, '赛季id(客户端显示为Sxxx)'], + ['season_begin_time', 0, '赛季开始时间(utc时间)'], + ['season_end_time', 0, '赛季结束时间(utc时间)'], + ['card_lv', 0, '手册等级'], + ['card_exp', 0, '手册经验'], + ['card_max_exp', 0, '手册经验上限'], + ['buy_level_price', 0, '等级价格(钻石)'], + ['!gift_packages', [SeasonCardGiftPackage()], '礼包列表'], + ['!received_level_rewards1', [0], '等级解锁的奖励已领取等级列表(普通手册)'], + ['!received_level_rewards2', [0], '等级解锁的奖励已领取等级列表(精英)'], + ] + +class SeasonMission(object): + + def __init__(self): + self.fields = [ + ['state', 0, '任务状态 0:可领取 1:已领取 2:未完成(不可领取)'], + ['current', 0, '当前匹配场次'], + ['target', 0, '目标匹配场次'], + ['target_rank', 0, '目标段位'], + ] + +class Season(object): + + def __init__(self): + self.fields = [ + ['season', 0, '赛季'], + ['season_name', 0, '赛季name'], + ['rank', 0, '段位id'], + ['rank_name', 0, '段位名称'], + ['score', 0, '排位分'], + ['next_score', 0, '下阶段排位分'], + ['season_end_time', 0, '赛季结束时间'], + ['season_reward',SeasonReward(), '赛季该获得的奖励'], + ['current_point', 0, '当前赛季积分'], + ['total_point', 0, '所有赛季总积分'], + ] + +class SeasonReward(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '奖励的item id'], + ['item_num', 0, '奖励的数量'], + + ] + +class SeasonRank(object): + + def __init__(self): + self.fields = [ + ['ranking', 0, '排名'], + ['name', 0, '用户名称'], + ['head_id', 0, '头像'], + ['head_frame', 0, '头像框'], + ['rank', 0, '段位'], + ['score', 0, '积分'], + ['point', 0, 'SV积分'], + ] + + +class SeasonData(object): + + def __init__(self): + self.fields = [ + ['season_id', 0, '赛季id'], + ['game_times', 0, '排位总场次'], + ['win_times', 0, '吃鸡场次'], + ['top_ten_times', 0, '挤进前十场次'], + ['kill_killed', 0, '淘汰/被淘汰'], + ] + +class SeasonHero(object): + + def __init__(self): + self.fields = [ + ['season_id', 0, '赛季id'], + ['hero', 0, '英雄 id'], + ['weapon', 0, '枪械id 例:id 或 id1|id2 '], + ['use_times', 0, '使用总场次'], + ['win_times', 0, '吃鸡常常'], + ['top_ten_times', 0, '前十场次'], + ['win_rate', 0, '获胜率'], + ['top_ten_rate', 0, '前十率'], + ] + +class RankingItem(object): + + def __init__(self): + self.fields = [ + ['ranked', 0, '排名'], + ['user', UserSimple(), '用户信息'], + ['value', 0, '击杀数/吃鸡数/战斗场数/mvp数/前三名数'], + ] + +class RankingList(object): + + def __init__(self): + self.fields = [ + ['type', 0, '排行榜类型 1:积分榜'], + ['!ranking_list', [RankingItem()], '排行榜'], + ['my_ranked', RankingItem(), '我的排名(如果ranked<1则表示自己未上榜)'], + ] +class GuildEx(object): + + def __init__(self): + self.fields = [ + ['guild_id', 0, '工会id'], + ['guild_name', '', '工会名称'], + ['guild_badge', '', '工会头像'], + ['owner_id', '', '会长id'], + ['owner_name', '', '会长名称'], + ] + +class RankingItemEx(object): + + def __init__(self): + self.fields = [ + ['ranked', 0, '排名'], + ['user', UserSimple(), '用户信息(type为4是空数组)'], + ['guild', GuildEx(), '工会信息(无工会为空数组)'], + ['value', 0, '击杀数/吃鸡数/战斗场数/工会总Test_CEG收益'], + ['rewardNum', 0, '奖励'], + ['extraRewardNum', 0, '额外奖励'], + ] + +class RankingListEx(object): + + def __init__(self): + self.fields = [ + ['type', 0, '排行榜类型 1:击杀榜 2:吃鸡榜 3:场次榜 4:工会榜'], + ['pages', 0, '总页数 0表示无需分页'], + ['!rows', [RankingItemEx()], '排行榜'], + ['my_ranked', RankingItemEx(), '我的排名(如果ranked<1则表示自己未上榜)'], + ] + +class RedDot(object): + + def __init__(self): + self.fields = [ + ['type', 0, '红点类型'], + ['state', 0, '红点状态 0:无 1:有'], + ] + +class TeamMember(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['address', '', 'openid'], + ['name', '', '用户名字'], + ['hero_uniId', 0, 'hero uniid'], + ['hero_id', 0, 'hero itemId'], + ['hero_skin', 0, '英雄皮肤 itemId'], + ['head_id', 0, '头像id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['rank', 0, '段位'], + ['pve_instance_id', 0, 'pve难度id'], + ['parachute', 0, '降落伞id'], + ['presetInfo', HeroPreset(), '备战信息'], + ['game_times', 0, '游戏次数'], + ['win_times', 0, '胜利次数'], + ['kills', 0, '击杀数'], + ['is_leader', 0, '是否队长'], + ['is_ready', 0, '是否准备'], + ['permission', 0, '邀请许可'], + ['createtime', 0, '账号创建时间'], + ] + +class TeamInfo(object): + + def __init__(self): + self.fields = [ + ['map_id', '', '地图id'], + ['node_id', '', 'node_id'], + ['zid', '', 'zid'], + ['team_uuid', '', '队伍唯一id'], + ['payload', '', '透传给CMJoin'], + ['match_mode', 0, '0: 匹配赛模式 1: 排位赛 3: pve'], + ['pve_instance_id', 0, 'pve副本id'], + ['slot_num', 0, '槽位数 >=1 && <= 4'], + ['state', 0, '0:未开始 1:准备就绪(这时客户端进入长链接走组队逻辑)'], + ['custom_room', CustomRoom(), '自定义房间'], + ['!member_list', [TeamMember()], '队伍成员列表(包含自己)'], + ] + +class CustomRoom(object): + + def __init__(self): + self.fields = [ + ['custom_room_id', '', '自定义房间的ID'], + ['custom_room_state', '', '自定义房间的状态'], + ['custom_room_pwd', '', '自定义房间的密码'], + ] + +class BuyableBox(object): + + def __init__(self): + self.fields = [ + ['box_id', '', '箱子id'], + ] + +class PreSaleInfo(object): + + def __init__(self): + self.fields = [ + ['batch_id', 0, '批次id(目前客户端没用到先不用管)'], + ['countdown', 0, '预售倒计时'], + ['sold_num', 0, '已售数'], + ['total_num', 0, '总数'], + ['state', 0, '0:预售未开始(tilte文字) 1:预售准备开始(有倒计时) 2:预售开始(title文字) 3:预售结束(title)'], + ['title', '', '预售文字标题描述 '], + ['hint', '', '预售文字描述'], + ['buyable_list!', [BuyableBox()], '可购买商品列表'], + ] + +class PreSaleBox(object): + + def __init__(self): + self.fields = [ + ['box_id', '', '箱子id'], + ['item_id', 0, '道具id(根据这个读取箱子的图片)'], + ['name', '', '名字'], + ['job', '', '职业'], + ['avatar_url', '', '头像完整url'], + ['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'], + ] + +class NftHeroDetail(object): + + def __init__(self): + self.fields = [ + ['name', '', '英雄名'], + ['job', '', '职业'], + ['level', 0, '等级'], + ['quality', 0, '星级'], + ['hp', 0, '血量'], + ['speed', 0, '速度'], + ['atk', 0, '攻击'], + ['def', 0, '防御'], + ['advanced_count', 0, '升级次数'], + ['lukcy', 0, '幸运'], + ['success_rate', 0, '成功率'], + ['!attr', [AttrDesc()], '属性'], + ] + +class NftGunDetail(object): + + def __init__(self): + self.fields = [ + ['name', '', '枪支名'], + ['level', 0, '等级'], + ['quality', 0, '星级'], + ['lukcy', 0, '幸运'], + ['clip_volume', 0, '弹夹数'], + ['reload_time', 0, '装弹时间'], + ['fire_rate', 0, '射击速度'], + ['atk', 0, '攻击'], + ['bullet_speed', 0, '子弹速度'], + ['range', 0, '射程'], + ['!attr', [AttrDesc()], '属性'], + ] + +class NftChipDetail(object): + + def __init__(self): + self.fields = [ + ['name', '', '芯片名'], + ['!attr', [AttrDesc()], '属性'], + ] + +class TransactionRecrod(object): + + def __init__(self): + self.fields = [ + ['from', '', '来源钱包'], + ['date', 0, '交易日期(utc时间)'], + ] + +class NftDetail(object): + + def __init__(self): + self.fields = [ + ['token_id', '', 'token id'], + ['owner_address', '', '所有者地址'], + ['owner_name', '', '所有名字'], + ['item_id', 0, '道具id'], + ['type', '', 'nft类型 1:英雄 2:枪支 3:芯片 4:盲盒'], + ['image', '', 'nft图片地址'], + ['state', 0, '0:正常状态 1:出售中 2:出租中'], + ['lock_time', 0, '锁定时间(单位秒)'], + ['hide_attr', 0, '是否隐藏属性'], + ['is_genesis', 0, '是否创世nft'], + ['info', Union([ + [NftHeroDetail(), '英雄'], + [NftGunDetail(), '枪支'], + [NftChipDetail(), '芯片'], + ]), 'nft详细信息'], + ['!transaction_recrod', [TransactionRecrod()], '交易记录'], + ['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'], + ['mint_time', 0, '铸造时间'], + ] + +class NftView(object): + + def __init__(self): + self.fields = [ + ['name', '', 'nft名字'], + ['description', '', 'nft描述'], + ['image', '', 'nft图片'], + ] + +class Phase3Box(object): + + def __init__(self): + self.fields = [ + ['box_id', '', '箱子id'], + ] + +class ChipAttr(object): + + def __init__(self): + self.fields = [ + ['attr_id', 0, '属性id'], + ['val', 0, '综合属性值'], + ] + +class Chip(object): + + def __init__(self): + self.fields = [ + ['idx', 0, '主键id'], + ['token_id', '', 'token id'], + ['account_id', '', '账号id'], + ['item_id', 0, '道具id'], + ['item_num', 0, '道具数量'], + ['chip_grade', 0, '芯片等级'], + ['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'], + ['state', 0, '0:已购买 1:免费(GIFT标签)'], + ['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'], + ['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'], + ['!rand_attr', [ChipAttr()], '属性'], + ['tags', '', '1:Gen状态'], + ] + +class ChipPro(object): + + def __init__(self): + self.fields = [ + ['idx', 0, '主键id'], + ['token_id', '', 'token id'], + ['account_id', '', '账号id'], + ['item_id', 0, '道具id'], + ['item_num', 0, '道具数量'], + ['chip_grade', 0, '芯片等级'], + ['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'], + ['state', 0, '状态:0 免费;1 常规'], + ['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'], + ['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'], + ['!rand_attr', [ChipAttr()], '属性'], + ['!rand_attr_after', [ChipAttr()], '芯片升级后的属性'], + ['cost',[],'升级所需gold消耗'] + ] + +class BattleMember(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['session_id', '', '会话id'], + ['hero_uniid', '', '英雄唯一id'], + ['weapon_uniid1', '', '武器1唯一id'], + ['weapon_uniid2', '', '武器2唯一id'], + ] + +class Cost(object): + + def __init__(self): + self.fields = [ + ['CEG', '', '金币'], + ['CEC', '', '钻石'], + ['success_rate', '', '成功率(进阶有,升级没有)'], + ] + +class Fragment(object): + + def __init__(self): + self.fields = [ + ['idx', 0, '主键id'], + ['token_id', '', 'token id'], + ['item_id', '', '道具id'], + ['balance', '', '数量'], + ['createtime', 0, '创建时间'], + ['modifytime', 0, '修改时间'], + ] + +class HisBattle(object): + + def __init__(self): + self.fields = [ + ['battle_uuid', '', '本次比赛唯一id'], + ['victory', 0, '是否胜利'], + ['room_mode', 0, '0:吃鸡模式 1:歼灭模式 2:生存模式'], + ['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'], + ['team_mode', 0, '组队模式 1:单人 2::多人'], + ['result', '', '比赛结果 当pve模式时: 1:通关 2:通关失败 其他模式:排名'], + ['kills', '', '击杀数'], + ['hero_id', '', '英雄id'], + ['weapon1_id', '', '武器1 id'], + ['weapon2_id', '', '武器2 id'], + ['level_class', 0, '段位'], + ['score', 0, '段位-积分'], + ['score_change', 0, '段位-积分变更'], + ['pve_score', 0, 'pve积分 pve模式'], + ['map_id', 0, '地图id'], + ['pve_instance_id', 0, '副本id'], + ['end_time', 0, '战斗时间 utc时间 客户端自己处理时区问题'], + ] + +class BattleReport(object): + + def __init__(self): + self.fields = [ + ['battle_uuid', '', '本次比赛唯一id'], + ['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'], + ['team_mode', 0, '组队模式 1:单人 2::多人'], + ] + +class BattleCegReward(object): + + def __init__(self): + self.fields = [ + ['hero_uniid', '', '唯一id'], + ['id', '', 'id'], + ['gold_uplimit', 0, '当前ceg数量'], + ['obtain_gold', 0, '实际获得ceg数量'], + ['curr_gold', 0, 'ceg数量上限'], + ] + +class BattleItemReward(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '道具id'], + ['item_num', 0, '道具数量'], + ] + + +class BattleRankScore(object): + + def __init__(self): + self.fields = [ + ['old_rank', 0, '战斗前段位'], + ['old_score', 0, '战斗前排位分'], + ['new_rank', 0, '战斗后段位'], + ['new_score', 0, '战斗后排位分'], + ] + +class BattleHistory(object): + + def __init__(self): + self.fields = [ + ['idx', 0, '唯一id'], + ['battle_uniid', 0, '战斗记录唯一id'], + ['account_id', '', '用户 account_id'], + ['room_mode', 0, '0: pvp 1: pve'], + ['pvp_mode', 0, '0: 匹配 1: 排位'], + ['team_mode',0, '0:单人 1:组队'], + ['battle_rank', 0, '战斗排名'], + ['team_rank',0, '团队排名'], + ['is_win', 0, 'pve冒险是否胜利'], + ['kills',0, '击杀数'], + ['hero_id',0, '英雄 id'], + ['weapon1', 0, '枪械1 id'], + ['weapon2', 0, '枪械2 id'], + ['damage', 0, '伤害'], + ['battle_end_time', 0, '战斗结束时间'], + ['current_level_class', '', '当前用户段位'], + ['current_level_class_score', 0, '当前用户排位分'], + ['level_class_score_chg', 0, '排位分改变'], + ['pve_rank_score', 0, 'pve冒险积分'], + ['pve_kill_boss', 0, 'pve冒险是否击杀BOSS'], + ['battle_foreign_key', 0, '结算外键'], + ['pve_instance_id', 0, 'pve副本难度id'], + ['pve_instance_mode', 0, 'pve副本mode'], + ] + +class NftTransaction(object): + + def __init__(self): + self.fields = [ + ['trans_id', 0, 'trans_id'], + ['item_id', 0, '道具id'], + ['action', 0, '动作'], + ['time', 0, '时间'], + ['status', 0, '1:已完成 2:等待中'], + ] + +class EventRankingList(object): + + def __init__(self): + self.fields = [ + ['id', 0, 'id'], + ['wave', 0, '活动轮数'], + ['themeType', 0, '1 击杀榜,2 吃鸡榜,3 场次榜,4 工会榜'], + ['themeName', '', '活动名称'], + ['startTime', '', '开始时间'], + ['endTime', '', '结束时间'], + ['status', 0, '0:已结束 1:进行中 2:等待中'], + ] + +class Currency(object): + + def __init__(self): + self.fields = [ + ['account_id', '', 'account_id'], + ['net_id', 0, '链id'], + ['address', '', '货币地址'], + ['symbol', '', '符号'], + ['precision', 0, '精度'], + ['type', 0, '1:ERC721 2:ERC1155 3:ERC20'], + ] + +class Emoji(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, 'item_id'], + ['state', 0, '1:使用 0:未使用'], + ] + +class ChipPageList(object): + + def __init__(self): + self.fields = [ + ['idx', 0, 'idx'], + ['account_id', 0, 'account_id'], + ['page_id', 0, '页id'], + ['page_name', '', '页名'], + ['createtime', 0, '创建时间'], + ] + +class ChipPage(object): + + def __init__(self): + self.fields = [ + ['idx', 0, 'idx'], + ['page_id', 0, '页id'], + ['page_name', '', '页名'], + ['!data', [ChipPageSlot()], '卡槽信息'], + ['!attr', [Attr()], '属性信息'], + ] + +class ChipPageSlot(object): + + def __init__(self): + self.fields = [ + ['slot_id', 0, '卡槽id'], + ['state', 0, '0:未解锁 1:已解锁'], + ['chip_id', '', '芯片idx'], + ] + +class HeroPreset(object): + + def __init__(self): + self.fields = [ + ['skill_id', 0, '技能item id'], + ['weapon_uid1', 0, '武器1唯一id'], + ['weapon_uid2', 0, '武器2唯一id'], + ['gun_id1', 0, '武器1 item id'], + ['gun_id2', 0, '武器2 item id'], + ['chip_page', 0, '芯片页id'], + ] + +class TeamReportMember(object): + + def __init__(self): + self.fields = [ + ['account_id', '', '账号id'], + ['name', '', '名字'], + ['head', 0, '头像id'], + ['head_frame', 0, '头像框'], + ['sex', 0, '性别'], + ['dead', 0, '是否已死亡'], + ['is_mvp', 0, '是否mvp'], + + ['hero_id', 0, '英雄id'], + ['hero_uniid', 0, '英雄uniid'], + ['hero_quality', 0, '英雄quality'], + ['game_time', 0, '游戏时间'], + ['alive_time', 0, '存活时间'], + ['ranked', 0, '排名'], + ['kills', 0, '击杀数'], + ['damage_out', 0, '伤害输出'], + ['weapon_uuid1', '', 'weapon_uuid1'], + ['weapon_uuid2', '', 'weapon_uuid2'], + ['rescue_teammate_times', 0, '救起队友次数'], + ['diving_times', 0, '潜水次数'], + ['damage_in', 0, '伤害输入'], + ['recover_hp', 0, '治疗量'], + ['open_airdrop_times', 0, '开启空投补给次数'], + ['use_medicine_times', 0, '使用药物次数'], + ['destory_car_times', 0, '破坏载具次数'], + ['use_camouflage_times', 0, '使用伪装物'], + ['use_skill_times', 0, '使用技能次数'], + ['ride_car_move_distance', 0, '驾驶或乘坐载具累计移动X米'], + ['ride_car_kills', 0, '驾驶或乘坐载具累计击杀X个敌人'], + ['max_hero_skill_lv', 0, '单局内英雄技能升级到X级'], + ['weapons_type', '', '武器信息 weapon_id:kills:damage_out:obtain_count|'], + ['weapons_slot', '', '武器信息 weapon_id:use_times|'], + ['heros', '', '武器信息 hero_id:skill_lv:weapon_lv|'], + + ['pvp_kill', 0, 'pvp击杀敌人数'], + ['pvp_damage', 0, 'pvp上海总量'], + ['pvp_assist', 0, 'pvp助攻'], + ['pvp_survia_time', 0, 'pvp存活时间(毫秒)'], + ['pvp_recover', 0, 'pvp治疗总量'], + ['pvp_rescue', 0, 'pvp救援'], + ['pvp_personal_rank', 0, 'pvp个人排名'], + + ['pve_order', 0, 'pve波次'], + ['pve_score', 0, 'pve分数'], + ['pve_star', 0, 'pve星'], + ['pve_damage', 0, 'pve伤害总量'], + ['pve_revive', 0, 'pve复活次数'], + ['pve_survia_time', 0, 'pve存活时间(毫秒)'], + ['pve_wave', 0, 'pve波次'], + ['pve_max_wave', 0, 'pve最大波次'], + ['pve_boss_killed', 0, 'pve副本boss是否被击杀'], + ['pve_rank_score', 0, 'pve积分'], + ] + +class TeamReportTeam(object): + + def __init__(self): + self.fields = [ + ['team_id', 0, '队伍id'], + ['!members', [['account_id', '', '账号id']], '枪械属性'], + ] + +class BattleSettlement(object): + + def __init__(self): + self.fields = [ + ['version', 0, '版本'], + ['battle_uuid', 0, '本次战斗唯一id'], + ['team_id', 0, '队伍id'], + ['room_uuid', 0, '房间唯一id'], + ['room_mode', 0, '0:pvp 1: pve'], + ['team_mode', 0, '0:个人 1:组队(保留)'], + ['game_over', 0, '游戏是否结束'], + ['victory', 0, '是否胜利(pvp:吃鸡 pve:是否通关)'], + ['watchable', 0, '是否可观战,小胡那的接口写死0(看历史不可观战)'], + ['map_id', 0, '地图id'], + ['settlement_status', 0, '0: 结算中(读取个人结算数据) 1:已结算(请求小胡接口)'], + ['pvp_settlement_type', 0, '結算類型0:個人 1:組隊(保留)'], + ['pvp_settlement_color', 0, '0:灰 1:黃'], + ['pvp_team_rank', 0, '队伍排名'], + ['pvp_total_human_num', 0, '房间总人数'], + ['pvp_alive_human_num', 0, '房间剩余存活人数'], + ['pvp_total_team_num', 0, '本次战斗队伍总数'], + ['pvp_match_mode', 0, '比赛模式 0: pvp 1:排位赛'], + ['pve_settlement_color', 0, '0:灰 1:黃'], + ['pve_wave', 0, 'pve波次'], + ['pve_max_wave', 0, 'pve总波次'], + ['pve_instance_id', 0, 'pve副本id'], + ['!members', [BattleSettlementMembersInfo()], '队伍成员信息'], + ] + +class BattleSettlementMembersInfo(object): + + def __init__(self): + self.fields = [ + ['account_id', 0, '账号id(真人才有account_id)'], + ['name', '', '玩家名字'], + ['head', 0, '头像id'], + ['head_frame', 0, '头像框'], + ['sex', 0, '性别'], + ['hero_uniid', 0, '英雄uniid'], + ['hero_id', 0, '英雄itemId'], + ['dead', 0, '是否已死亡'], + ['is_mvp', 0, '是否mvp'], + ['old_rank', 0, '老段位'], + ['new_rank', 0, '新段位'], + ['old_score', 0, '老段位积分'], + ['new_score', 0, '新段位积分'], + ['pvp_kill', 0, 'pvp击杀敌人数'], + ['pvp_damage', 0, 'pvp伤害总量'], + ['pvp_assist', 0, 'pvp助攻'], + ['pvp_survia_time', 0, 'pvp存活时间(毫秒)'], + ['pvp_recover', 0, 'pvp治疗总量'], + ['pvp_rescue', 0, 'pvp救援'], + ['pvp_personal_rank', 0, '个人排名'], + ['pve_order', 0, 'pve波次'], + ['pve_score', 0, 'pve分数'], + ['pve_star', 0, 'pve星'], + ['pve_damage', 0, 'pve伤害总量'], + ['pve_revive', 0, 'pve复活次数'], + ['pve_survia_time', 0, 'pvp存活时间(毫秒)'], + ['pve_wave', 0, 'pve波次'], + ['pve_max_wave', 0, 'pve总波次'], + ['pve_boss_killed', 0, 'pve副本boos是否被击杀'], + ['reward', BattleReward(), 'reward'], + ] + +class BattleReward(object): + + def __init__(self): + self.fields = [ + ['hero', BattleCegReward(), '英雄奖励'], + ['!items', [BattleItemReward()], '碎片奖励'], + ] + + +class Reward(object): + + def __init__(self): + self.fields = [ + ['id', 0, 'id'], + ['group', '', 'group'], + ['goods_id', 0, 'goods_id'], + ['goods_num', 0, '堆叠数量'], + ['shop_icon', 0, '商店图标'], + ] + + +class Sign(object): + + def __init__(self): + self.fields = [ + ['sign_id', 0, '签到id'], + ['days', 0, '累计天数'], + ['condition', 0, '签到条件(天数)'], + ['is_receive', 0, '领取状态 0:可领取 1:已领取 -1:未达到'], + ['!award', [AwardItem()], '奖励信息'], + ] + +class ShopTrans(object): + + def __init__(self): + self.fields = [ + ['trans_id', '', 'trans_id'], + ['!params', [''], 'params'], + ['item_id', 0, 'item_id'], + ['item_num', 0, 'item_num'], + ] + +class BlindBoxResult(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, 'item_id'], + ['item_num', 0, 'item_num'], + ] + +class InappPurchaseRecord(object): + def __init__(self): + self.fields = [ + ['productId', '', '商品id'], + ['gameOrderId', '', '游戏订单id'], + ['orderId', '', 'google订单id'], + ['status', 0, '订单状态'], + ] + +class TransactionRecordNew(object): + def __init__(self): + self.fields = [ + ['idx', '', 'idx'], + ['createtime', 0, '交易成功时间'], + ['order_id', 0, 'market订单id'], + ['o_link', '', '合约订单id'], + ['seller', '', '卖家'], + ['buyer', '', '买家'], + ['tokenid', '', 'tokenid'], + ['amount', 0, '商品数量'], + ['name', '', '商品名称'], + ['type', 0, '商品类型'], + ] + +class CurrencyType(object): + def __init__(self): + self.fields = [ + ['name', '', '货币名称'], + ['address', '', '货币地址'], + ] + +class MarketGoods(object): + + def __init__(self): + self.fields = [ + ['order_id', '', '订单id'], + ['token_id', '', 'token_id'], + ['nft_token', '', 'nft_token'], + ['amount', '', 'amount'], + ['seller', '', '售卖方'], + ['currency', '', '货币'], + ['price', '', '出售价格'], + ['selltime', 0, '上架时间'], + ['updatetime', 0, '修改时间(更新价格等)'], + ['details', NftDetail(), 'nft列表'], + ] + +class MallGoods(object): + + def __init__(self): + self.fields = [ + ['goods_uuid', '', '商品唯一id'], + ['seller', '', '出售方账号'], + ['seller_address', '', '出售方钱包地址'], + ['item_id', '', '商品道具id'], + ['item_num', '', '道具数量'], + ['currency', '', "选用币种 目前只支持CEG USDC USDT"], + ['price', '', '出售价格'], + ['selltime', 0, '上架时间'], + ['updatetime', 0, '修改时间(更新价格等)'], + ['cancel_countdown', 0, '可下架时间倒计时:-1不可下架'], + ['modify_countdown', 0, '可修改价格倒计时:-1不可修改价格'], + ] + +class ComputingPowerCurr(object): + + def __init__(self): + self.fields = [ +# ['current_state', '', '周期状态 -1:算力周期未开始 0:正常周期 1:等待周期 2:维护周期'], + ['period_begin', '', '本期开始时间(0 不显示)'], + ['period_end', '', '本期结束时间(0 不显示)'], + ['await_time', '', '结算等待时间'], + ['assignable_cec', '', '可分配的总cec奖励'], + ['cec_pool', '', '总cec奖励池'], +# ['total_target', '', '全服算力总目标'], + +# ['refresh_remain_time', '', '刷新剩余时间'], + ['total_hash_rate', '', '全服总兑换算力'], + ['total_exchange_hash_rate', '', "玩家已兑换算力"], + ] + +class ComputingPowerReward(object): + + def __init__(self): + self.fields = [ + ['cec', 0, 'cec奖励'], + ['point', 0, '科技值'], + ] + +class ComputingPower(object): + + def __init__(self): + self.fields = [ + ['period_state', 0, '周期状态 -1:算力周期未开始 0:正常周期 1:等待周期 2:维护周期'], + ['curr_period', ComputingPowerCurr(), '本期相关信息'], + ['curr_reward', ComputingPowerReward(), '本期奖励信息'], + ['listing_state', 0, 'listing状态 0:之前 1:之后'], + ['owned_cec', 0, '拥有的cec数量'], + ['owned_total_hash_rate', 0, '用户总科技值'], + ['owned_total_crystal', 0, '用户总晶体数'], + ] + +class CrystalUI(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, 'item_id'], + ['pending', 0, 'pending'], + ['total', CrystalUIParam(), '统计信息'], + ['claimed', 0, '已领取的数量'], + ['state', 0, '是否能领取 1:可领取 0:反之'], + ] + +class CrystalUIParam(object): + + def __init__(self): + self.fields = [ + ['param1', 0, '击杀数/其它晶体的价值数'], + ['param2', 0, '星星数'], + ['param3', 0, '升段数'], + ] + +class ExchangeCrystalRecord(object): + + def __init__(self): + self.fields = [ + ['item_id', 0, '晶体item'], + ['item_num', 0, '晶体数'], + ['createtime', 0, '领取时间'], + ] + +class ExchangeCrystalNum(object): + + def __init__(self): + self.fields = [ + ['num1', 0, '本期晶体260001兑换数'], + ['num2', 0, '本期晶体260002兑换数'], + ['num3', 0, '本期晶体260003兑换数'], + ['num4', 0, '本期晶体260004兑换数'], + ] + +class CECRewardHistory(object): + + def __init__(self): + self.fields = [ + ['hash_rate', 0, '算力数量'], + ['cec_num', 0, 'cec数量'], + ['state', 0, '领取状态 1:全部领取 0:反之'], + ['week1', 0, '1:已领取 反之则是发放的时间戳'], + ['week2', 0, '1:已领取 反之则是发放的时间戳'], + ['week3', 0, '1:已领取 反之则是发放的时间戳'], + ['week4', 0, '1:已领取 反之则是发放的时间戳'], + ['txHash1', 0, '第一周地址'], + ['txHash2', 0, '第二周地址'], + ['txHash3', 0, '第三周地址'], + ['txHash4', 0, '第四周地址'], + ['create_time', 0, '结算时间'], + ['pending_num', 0, '剩余未领取的cec数量'], + ] + +class Staking(object): + + def __init__(self): + self.fields = [ + ['type', 0, '1: planet 2: badge 3:cec'], + ['is_open', 0, '功能是否开启'], + ['staked_quant', 0, '质押数量'], + ['claim_rewards', 0, '当前类型自从已产出利息累计'], + ['daily_rewards', 0, '每天产出的利息总和'], + ['staking_value', 0, '在质押状态的价值总和'], + ['maturity_quant', 0, '已到期资产的数量'], + ] + +class StakingDetail(object): + + def __init__(self): + self.fields = [ + ['trans_id', '', '本次质押交易唯一id'], + ['token_id', '', 'token id'], + ['token_type', '', 'token type'], + ['contract_address', '', 'contract address'], + ['net_id', '', 'net_id'], + ['order_id', '', 'order_id'], + ['start_time', '', '质押开始时间'], + ['stake_time', '', '质押时间'], + ['redeem_time', '', '赎回时间'], + ['txhash', '', 'txhash'], + + ['item_id', 0, '道具id'], + ['stacked_num', 0, '质押数量'], + ['total_rewards', 0, '该nft已产生的利息'], + ['daily_rewards', 0, '该nft每天可以产生多少利息'], + ['cec_value', 0, '该nft的价值'], + ['cec_rewards', 0, '该nft结算得到的ceg数量'], + ['stacked_days', 0, '该nft质押的总天数'], + ['remain_days', 0, '该nft剩余质押天数'], + ] + +class StakingPreview(object): + + def __init__(self): + self.fields = [ + ['time', 0, '天数'], + ['interest', 0, '利息'], + ] + +class AvatarInfo(object): + + def __init__(self): + self.fields = [ + ['avatar_uniid', '', '装饰唯一id'], + ['account_id', '', 'account_id'], + ['token_id', '', 'token_id'], + ['item_id', 0, 'item_id'], + ['item_type', 0, '1:翅膀'], + ['status', 0, '0:为穿戴 1:已穿戴'], + ['hero_uniid', 0, '穿戴的英雄唯一id'], + ] + +class BattleData(object): + + def __init__(self): + self.fields = [ + ['account_id','','account_id'], + ['session_id','','session_id'], + ['battle_uuid','','battle_uuid'], + ['match_mode',0,'0:匹配 1:排位 2:pve'], + ['rank', 0, '当前段位'], + ['name','','用户名字'], + ['level',0,'用户等级'], + ['revive_coin',0,'复活币'], + ['hero_uniid',0,'英雄 uniid'], + ['hero_id',0,'英雄 item id'], + ['weapon_uuid1',0,'武器1 uniid'], + ['weapon_uuid2',0,'武器2 uniid'], + ['parachute',0,'降落伞 item id'], + ['hero_skin',0,'英雄皮肤 item id'], + ['skill_id',0,'备战技能 item id'], + ['battle_times',0,'战斗次数'], + ['chip_page', Attr(),'铭文页属性'], + ['hero_dto','','英雄详情'], + ['weapon_dto1','','武器1详情'], + ['weapon_dto2','','武器2详情'], + ] + +class BattleTeam(object): + + def __init__(self): + self.fields = [ + ['team_uuid','','队伍唯一id'], + ['!members', BattleData(), '成员数据'], + ]