From ace3e78cdd2a725db5aa13236b9315885563c766 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Oct 2024 16:04:18 +0800 Subject: [PATCH] 1 --- webapp/services/BattleBoxService.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index 789c1734..09020de5 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -88,6 +88,30 @@ class BattleBoxService { return empty($num) ? 0 : $num; } + private static function setDailyPhaseDropLastTime($phase, $time) + { + $key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time; + $r = $this->_getRedis($key); + $lastTime = $r->get($key); + return empty($lastTime) ? 0 : $lastTime; + } + + private static function setDailyPhaseDropTotalNum($phase, $time) + { + $key = self::DAILY_PHASE_DROP_TOTAL_KEY . $phase . ':' . $time; + $r = $this->_getRedis($key); + $num = $r->get($key); + return empty($num) ? 0 : $num; + } + + private static function setDailyPhaseAllocNum($phase, $time) + { + $key = self::DAILY_PHASE_ALLOC_NUM_KEY . $phase . ':' . $time; + $r = $this->_getRedis($key); + $num = $r->get($key); + return empty($num) ? 0 : $num; + } + private static function getDailyPhaseAlreadyAllocNum($phase, $time) { $key = self::DAILY_PHASE_ALREADY_ALLOC_NUM_KEY . $phase . ':' . $time;