This commit is contained in:
hujiabin 2023-09-05 13:47:41 +08:00
parent 4cf3f502e3
commit a4338f82f3
4 changed files with 18 additions and 37 deletions

View File

@ -1581,16 +1581,6 @@ CREATE TABLE `t_power_exchange_record` (
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!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`
--

View File

@ -43,15 +43,6 @@ CREATE TABLE `t_power_exchange_record` (
KEY `account_id` (`account_id`)
) 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` (
`idx` bigint(20) NOT NULL AUTO_INCREMENT,

View File

@ -141,7 +141,7 @@ class User extends BaseModel {
'ring_list' => UserSeasonRing::ringList($row['account_id']),
'current_star_num' => $current_star_num,
'next_star_num' => $next_star_num,
'status_bar' => self::_getState(),
// 'status_bar' => self::_getState(),
'honor_info' => $honorInfo
);
}
@ -219,26 +219,26 @@ class User extends BaseModel {
'parachute_list' => Parachute::getMyParachute(),
'current_star_num' => $current_star_num,
'next_star_num' => $next_star_num,
'status_bar' => self::_getState(),
// 'status_bar' => self::_getState(),
'honor_info' => $honorInfo
);
}
private static function _getState(){
$sign_state = 0;
$signDb = SignLog::find();
// $paramMeta = \mt\Parameter::getByName('sign_daily_duration');
// $end_time = myself()->_getDaySeconds($signDb['createtime'])+$paramMeta['param_value']*24*60*60;
if($signDb['days'] == 7 && $signDb['is_receive'] == 1){
// if ( myself()->_getNowTime() - $end_time > 0){
$sign_state = 1;
}
return array(
"first_top_up" => myself()->_getV(TN_FIRST_TUPOP_STATUS,0),
"sign_day" => $sign_state
);
}
// private static function _getState(){
// $sign_state = 0;
// $signDb = SignLog::find();
//// $paramMeta = \mt\Parameter::getByName('sign_daily_duration');
//// $end_time = myself()->_getDaySeconds($signDb['createtime'])+$paramMeta['param_value']*24*60*60;
// if($signDb['days'] == 7 && $signDb['is_receive'] == 1){
//// if ( myself()->_getNowTime() - $end_time > 0){
// $sign_state = 1;
// }
//
// return array(
// "first_top_up" => myself()->_getV(TN_FIRST_TUPOP_STATUS,0),
// "sign_day" => $sign_state
// );
// }
public static function toSimple($row)
{

View File

@ -13,7 +13,7 @@ class HashRateCommon {
public static function getLatestPeriod(){
$period = self::getMetaList() ? self::getMetaList()[1] : array();
foreach (self::getMetaList() as $key => $meta) {
if (myself()->_getNowTime() >= strtotime($meta['start_time'])) {
if (myself()->_getNowTime() >= strtotime($meta['end_time'])) {
$period = $meta;
}
}