This commit is contained in:
aozhiwei 2024-10-08 14:51:35 +08:00
parent cfe7d17c53
commit b85a1903e0

View File

@ -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;