1
This commit is contained in:
parent
4cf3f502e3
commit
a4338f82f3
@ -1581,16 +1581,6 @@ CREATE TABLE `t_power_exchange_record` (
|
|||||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
CREATE TABLE `t_computing_power_period` (
|
|
||||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`period` int(11) NOT NULL DEFAULT '0' COMMENT '第几期',
|
|
||||||
`total_num` varchar(60) COMMENT '全服算力总量',
|
|
||||||
`createtime` int(11) NOT NULL COMMENT '创建时间',
|
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`idx`),
|
|
||||||
UNIQUE KEY `period` (`period`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `t_computing_power_period`
|
-- Table structure for table `t_computing_power_period`
|
||||||
--
|
--
|
||||||
|
@ -43,15 +43,6 @@ CREATE TABLE `t_power_exchange_record` (
|
|||||||
KEY `account_id` (`account_id`)
|
KEY `account_id` (`account_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `t_computing_power_period` (
|
|
||||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`period` int(11) NOT NULL DEFAULT '0' COMMENT '第几期',
|
|
||||||
`total_num` varchar(60) COMMENT '全服算力总量',
|
|
||||||
`createtime` int(11) NOT NULL COMMENT '创建时间',
|
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`idx`),
|
|
||||||
UNIQUE KEY `period` (`period`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `t_hash_rate_reward` (
|
CREATE TABLE `t_hash_rate_reward` (
|
||||||
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
|
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
@ -141,7 +141,7 @@ class User extends BaseModel {
|
|||||||
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
||||||
'current_star_num' => $current_star_num,
|
'current_star_num' => $current_star_num,
|
||||||
'next_star_num' => $next_star_num,
|
'next_star_num' => $next_star_num,
|
||||||
'status_bar' => self::_getState(),
|
// 'status_bar' => self::_getState(),
|
||||||
'honor_info' => $honorInfo
|
'honor_info' => $honorInfo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -219,26 +219,26 @@ class User extends BaseModel {
|
|||||||
'parachute_list' => Parachute::getMyParachute(),
|
'parachute_list' => Parachute::getMyParachute(),
|
||||||
'current_star_num' => $current_star_num,
|
'current_star_num' => $current_star_num,
|
||||||
'next_star_num' => $next_star_num,
|
'next_star_num' => $next_star_num,
|
||||||
'status_bar' => self::_getState(),
|
// 'status_bar' => self::_getState(),
|
||||||
'honor_info' => $honorInfo
|
'honor_info' => $honorInfo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function _getState(){
|
// private static function _getState(){
|
||||||
$sign_state = 0;
|
// $sign_state = 0;
|
||||||
$signDb = SignLog::find();
|
// $signDb = SignLog::find();
|
||||||
// $paramMeta = \mt\Parameter::getByName('sign_daily_duration');
|
//// $paramMeta = \mt\Parameter::getByName('sign_daily_duration');
|
||||||
// $end_time = myself()->_getDaySeconds($signDb['createtime'])+$paramMeta['param_value']*24*60*60;
|
//// $end_time = myself()->_getDaySeconds($signDb['createtime'])+$paramMeta['param_value']*24*60*60;
|
||||||
if($signDb['days'] == 7 && $signDb['is_receive'] == 1){
|
// if($signDb['days'] == 7 && $signDb['is_receive'] == 1){
|
||||||
// if ( myself()->_getNowTime() - $end_time > 0){
|
//// if ( myself()->_getNowTime() - $end_time > 0){
|
||||||
$sign_state = 1;
|
// $sign_state = 1;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return array(
|
// return array(
|
||||||
"first_top_up" => myself()->_getV(TN_FIRST_TUPOP_STATUS,0),
|
// "first_top_up" => myself()->_getV(TN_FIRST_TUPOP_STATUS,0),
|
||||||
"sign_day" => $sign_state
|
// "sign_day" => $sign_state
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
public static function toSimple($row)
|
public static function toSimple($row)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ class HashRateCommon {
|
|||||||
public static function getLatestPeriod(){
|
public static function getLatestPeriod(){
|
||||||
$period = self::getMetaList() ? self::getMetaList()[1] : array();
|
$period = self::getMetaList() ? self::getMetaList()[1] : array();
|
||||||
foreach (self::getMetaList() as $key => $meta) {
|
foreach (self::getMetaList() as $key => $meta) {
|
||||||
if (myself()->_getNowTime() >= strtotime($meta['start_time'])) {
|
if (myself()->_getNowTime() >= strtotime($meta['end_time'])) {
|
||||||
$period = $meta;
|
$period = $meta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user