From fde8b72a8ba2810066fdd7ebf32aef2dc8feecd9 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 19 Aug 2024 17:29:43 +0800 Subject: [PATCH 1/4] 1 --- webapp/controller/AnncController.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/controller/AnncController.class.php b/webapp/controller/AnncController.class.php index 3979f5cc..f5d52bcc 100644 --- a/webapp/controller/AnncController.class.php +++ b/webapp/controller/AnncController.class.php @@ -12,8 +12,10 @@ class AnncController extends BaseController { $data = json_decode($redis->get(self::ANNC_REDIS_KEY),true); }else{ $data = $this->_findAnnc(); - $redis->set(self::ANNC_REDIS_KEY,json_encode($data)); - $redis->pexpire(self::ANNC_REDIS_KEY , max(0, min(15, myself()->_getNowTime() - $data['end_time'])) * 1000); + if ($data){ + $redis->set(self::ANNC_REDIS_KEY,json_encode($data)); + $redis->pexpire(self::ANNC_REDIS_KEY , max(0, min(15, myself()->_getNowTime() - $data['end_time'])) * 1000); + } } myself()->_rspData($data); From ee3103c7f3ce658f9471189878a5c3c1b7aaab48 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 19 Aug 2024 19:30:29 +0800 Subject: [PATCH 2/4] 1 --- webapp/models/Nft.php | 1 - webapp/mt/PveGeminiMode.php | 71 ++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/webapp/models/Nft.php b/webapp/models/Nft.php index 617c34eb..785378e2 100644 --- a/webapp/models/Nft.php +++ b/webapp/models/Nft.php @@ -130,7 +130,6 @@ class Nft extends BaseModel array_push($nftList, $row); } ); - error_log(json_encode($nftList)); return $nftList; } diff --git a/webapp/mt/PveGeminiMode.php b/webapp/mt/PveGeminiMode.php index 4893ec8a..1dfb28c7 100644 --- a/webapp/mt/PveGeminiMode.php +++ b/webapp/mt/PveGeminiMode.php @@ -1,36 +1,35 @@ -= 0; --$i) { - if ($score > $strs[$i]) { - return count($strs) - $i ; - } - } - return 0; - } - - protected static function getMetaList() - { - if (!self::$metaList) { - self::$metaList = getMetaTable('pveGeminiMode@pveGeminiMode.php'); - } - return self::$metaList; - } - - protected static $metaList; - -} += 0; --$i) { + if ($score > $strs[$i]) { + return count($strs) - $i ; + } + } + return 0; + } + + protected static function getMetaList() + { + if (!self::$metaList) { + self::$metaList = getMetaTable('pveGeminiMode@pveGeminiMode.php'); + } + return self::$metaList; + } + + protected static $metaList; + +} From 9c67d5a1b6deba43afc2f74a29892591623382e2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 20 Aug 2024 10:40:41 +0800 Subject: [PATCH 3/4] 1 --- sql/gamedb.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 8e9ad83d..348423cd 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -695,7 +695,8 @@ CREATE TABLE `t_battle_settlement_single` ( `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), - UNIQUE KEY `account_id_battle_uniid` (`account_id`, `battle_uuid`) + UNIQUE KEY `account_id_battle_uniid` (`account_id`, `battle_uuid`), + KEY `idx_account_id` (`account_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; From 96a38362027d0fb3c9b49282c519773277d586bd Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 20 Aug 2024 11:06:56 +0800 Subject: [PATCH 4/4] 1 --- config/config.php | 1 + webapp/services/NoticeService.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.php b/config/config.php index 86748b62..28265a71 100644 --- a/config/config.php +++ b/config/config.php @@ -23,4 +23,5 @@ const SAPI_SECRET_KEYS = array( const GS_SECRET_KEYS = array( 'BIgDh5J%uUktooKxT!IM7#m$NtB51%la' ); +const NOTICE_CHANNEL_ID = 'world_room_1'; define('PRESENT_FREE_ITEM', 1); diff --git a/webapp/services/NoticeService.php b/webapp/services/NoticeService.php index da4d45d5..50c63ea7 100644 --- a/webapp/services/NoticeService.php +++ b/webapp/services/NoticeService.php @@ -43,7 +43,7 @@ class NoticeService extends BaseService { $data = [ "Notice"=>[ - "ChannelID"=>"world_room_1",//频道 ID,app 内唯一,字符串 + "ChannelID"=>NOTICE_CHANNEL_ID,//频道 ID,app 内唯一,字符串 "NoticeType"=>1,//1 为跑马灯公告,2 为聊天框公告,3 为置顶公告,整数 "LoopType"=>1,// 公告循环类型,1 为一次性公告,2 为周期性公告,整数 "Title"=>"",// 公告标题,字符串 @@ -77,4 +77,4 @@ class NoticeService extends BaseService { // error_log($response); } } -} \ No newline at end of file +}