diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index 1402f282..ed6affa2 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -6,8 +6,8 @@ require_once('mt/Parameter.php'); class BattleBoxService { - const DAILY_PHASE_DROP_LAST_TIME_KEY = ''; - const DAILY_PHASE_DROP_TOTAL_KEY = ''; + const DAILY_PHASE_DROP_LAST_TIME_KEY = ':'; + const DAILY_PHASE_DROP_TOTAL_KEY = ':'; public static function allocBox() { @@ -23,17 +23,17 @@ class BattleBoxService { return 0; } - private static function getDailyPhaseDropLastTime($phase, $lastTime) + private static function getDailyPhaseDropLastTime($phase, $time) { - $key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $lastTime; + $key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time; $r = $this->_getRedis($key); - $time = $r->get($key); - return empty($time) ? 0 : $time; + $lastTime = $r->get($key); + return empty($lastTime) ? 0 : $lastTime; } - private static function getDailyPhaseDropTotalNum($phase, $lastTime) + private static function getDailyPhaseDropTotalNum($phase, $time) { - $key = self::DAILY_PHASE_DROP_TOTAL_KEY . $phase . ':' . $lastTime; + $key = self::DAILY_PHASE_DROP_TOTAL_KEY . $phase . ':' . $time; $r = $this->_getRedis($key); $num = $r->get($key); return empty($num) ? 0 : $num;