This commit is contained in:
aozhiwei 2024-10-08 16:08:13 +08:00
parent ace3e78cdd
commit 2f9c065b24

View File

@ -88,28 +88,25 @@ class BattleBoxService {
return empty($num) ? 0 : $num;
}
private static function setDailyPhaseDropLastTime($phase, $time)
private static function setDailyPhaseDropLastTime($phase, $time, $val)
{
$key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$lastTime = $r->get($key);
return empty($lastTime) ? 0 : $lastTime;
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
}
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;
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
}
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;
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
}
private static function getDailyPhaseAlreadyAllocNum($phase, $time)