This commit is contained in:
hujiabin 2024-10-16 16:57:44 +08:00
parent e2cf8485e2
commit 776818f7f6
4 changed files with 39 additions and 0 deletions

View File

@ -16,6 +16,16 @@ class OutAppTools(object):
_common.RspHead(), _common.RspHead(),
['!data', [rewardInfo()], '奖励信息'], ['!data', [rewardInfo()], '奖励信息'],
] ]
},{
'name': 'circuitSettlement',
'desc': '巡回赛结算奖励',
'group': 'OutAppCircuit',
'url': 'webapp/index.php?c=OutAppCircuit&a=circuitSettlement',
'params': [
],
'response': [
_common.RspHead(),
]
}, },
] ]

View File

@ -62,6 +62,16 @@ CREATE TABLE `t_hashrate_shop_buy_record` (
UNIQUE KEY `account_id_goods_id` (`account_id`, `goods_id`) UNIQUE KEY `account_id_goods_id` (`account_id`, `goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) 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); insert into version (version) values(2024092401);

View File

@ -30,6 +30,14 @@ class CircuitController extends BaseAuthedController {
} }
} }
public function CircuitTaskList(){
$circuitCircuitMeta = mt\CircuitTime::getCurrentCircuit();
$nextCircuitMeta = mt\CircuitTime::getNextCircuit();
if (!$circuitCircuitMeta){
}
}
public function getCurrentStage(){ public function getCurrentStage(){
$circuitStageMeta = mt\CircuitTime::getCurrentStage(); $circuitStageMeta = mt\CircuitTime::getCurrentStage();
if (!$circuitStageMeta){ if (!$circuitStageMeta){

View File

@ -18,6 +18,17 @@ class CircuitTime {
return null; 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(){ public static function getPrevStage(){
$prev = array(); $prev = array();
foreach (self::getCircuitAll(self::STAGE_SEASON_TYPE) as $meta){ foreach (self::getCircuitAll(self::STAGE_SEASON_TYPE) as $meta){