diff --git a/doc/OutAppCircuit.py b/doc/OutAppCircuit.py index 79890d2d..e3baac01 100644 --- a/doc/OutAppCircuit.py +++ b/doc/OutAppCircuit.py @@ -16,6 +16,16 @@ class OutAppTools(object): _common.RspHead(), ['!data', [rewardInfo()], '奖励信息'], ] + },{ + 'name': 'circuitSettlement', + 'desc': '巡回赛结算奖励', + 'group': 'OutAppCircuit', + 'url': 'webapp/index.php?c=OutAppCircuit&a=circuitSettlement', + 'params': [ + ], + 'response': [ + _common.RspHead(), + ] }, ] diff --git a/sql/gamedb2006_migrate_241001_01.sql b/sql/gamedb2006_migrate_241001_01.sql index 4b687bed..2e07eb8e 100644 --- a/sql/gamedb2006_migrate_241001_01.sql +++ b/sql/gamedb2006_migrate_241001_01.sql @@ -62,6 +62,16 @@ CREATE TABLE `t_hashrate_shop_buy_record` ( UNIQUE KEY `account_id_goods_id` (`account_id`, `goods_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +CREATE TABLE `t_circuit_task_value` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `task_type` int(11) NOT NULL DEFAULT '0' COMMENT '任务id', + `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`), + UNIQUE KEY `account_id_task` (`account_id`, `task_type`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; insert into version (version) values(2024092401); diff --git a/webapp/controller/CircuitController.class.php b/webapp/controller/CircuitController.class.php index 82a9fffa..07d20844 100644 --- a/webapp/controller/CircuitController.class.php +++ b/webapp/controller/CircuitController.class.php @@ -30,6 +30,14 @@ class CircuitController extends BaseAuthedController { } } + public function CircuitTaskList(){ + $circuitCircuitMeta = mt\CircuitTime::getCurrentCircuit(); + $nextCircuitMeta = mt\CircuitTime::getNextCircuit(); + if (!$circuitCircuitMeta){ + + } + } + public function getCurrentStage(){ $circuitStageMeta = mt\CircuitTime::getCurrentStage(); if (!$circuitStageMeta){ diff --git a/webapp/mt/CircuitTime.php b/webapp/mt/CircuitTime.php index 75c1040d..03b515c7 100644 --- a/webapp/mt/CircuitTime.php +++ b/webapp/mt/CircuitTime.php @@ -18,6 +18,17 @@ class CircuitTime { return null; } + public static function getNextCircuit(){ + $next = array(); + foreach (self::getCircuitAll(self::WHOLE_SEASON__TYPE) as $meta){ + if (myself()->_getNowTime() < strtotime($meta['start_time'])){ + $next = $meta; + break; + } + } + return $next; + } + public static function getPrevStage(){ $prev = array(); foreach (self::getCircuitAll(self::STAGE_SEASON_TYPE) as $meta){