This commit is contained in:
aozhiwei 2024-10-09 10:38:09 +08:00
parent 71905d628c
commit 7b8beb94fb

View File

@ -117,7 +117,7 @@ class BattleBoxService {
private static function getDailyPhaseDropLastTime($phase, $time)
{
$key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$lastTime = $r->get($key);
return empty($lastTime) ? 0 : $lastTime;
}
@ -125,7 +125,7 @@ class BattleBoxService {
private static function getDailyPhaseDropTotalNum($phase, $time)
{
$key = self::DAILY_PHASE_DROP_TOTAL_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$num = $r->get($key);
return empty($num) ? 0 : $num;
}
@ -133,7 +133,7 @@ class BattleBoxService {
private static function getDailyPhaseAllocNum($phase, $time)
{
$key = self::DAILY_PHASE_ALLOC_NUM_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$num = $r->get($key);
return empty($num) ? 0 : $num;
}
@ -141,28 +141,28 @@ class BattleBoxService {
private static function setDailyPhaseDropLastTime($phase, $time, $val)
{
$key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$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);
$r = myself()->_getRedis($key);
$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);
$r = myself()->_getRedis($key);
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
}
private static function getDailyPhaseAlreadyAllocNum($phase, $time)
{
$key = self::DAILY_PHASE_ALREADY_ALLOC_NUM_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$num = $r->get($key);
return empty($num) ? 0 : $num;
}
@ -170,7 +170,7 @@ class BattleBoxService {
private static function incAlreadyAllocNum($phase, $time, $val)
{
$key = self::DAILY_PHASE_ALREADY_ALLOC_NUM_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$r = myself()->_getRedis($key);
$num = intval($r->get($key));
if (empty($num)) {
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);