From a4338f82f3c780ded65c8b9da4038eac078a4fb9 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 5 Sep 2023 13:47:41 +0800 Subject: [PATCH] 1 --- sql/gamedb.sql | 10 -------- sql/gamedb2006_migrate_230816_01.sql | 9 -------- webapp/models/User.php | 34 ++++++++++++++-------------- webapp/mt/HashRateCommon.php | 2 +- 4 files changed, 18 insertions(+), 37 deletions(-) diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 0e8ad0ee..9e655da4 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -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` -- diff --git a/sql/gamedb2006_migrate_230816_01.sql b/sql/gamedb2006_migrate_230816_01.sql index a2ae571f..db8e4cba 100644 --- a/sql/gamedb2006_migrate_230816_01.sql +++ b/sql/gamedb2006_migrate_230816_01.sql @@ -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, diff --git a/webapp/models/User.php b/webapp/models/User.php index 47c949eb..c1513817 100644 --- a/webapp/models/User.php +++ b/webapp/models/User.php @@ -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) { diff --git a/webapp/mt/HashRateCommon.php b/webapp/mt/HashRateCommon.php index 0db608a7..19aac82d 100644 --- a/webapp/mt/HashRateCommon.php +++ b/webapp/mt/HashRateCommon.php @@ -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; } }