This commit is contained in:
aozhiwei 2024-07-31 14:09:45 +08:00
parent 08282ac0d0
commit 44ed34f1e6

View File

@ -1289,4 +1289,16 @@ class BattleController extends BaseAuthedController {
return empty($num) ? 0 : $num;
}
private function incAlreadyAllocBoxNum($val)
{
$key = 'box_daily_already_alloc_num:' . myself()->_getNowDaySeconds();
$r = $this->_getRedis($key);
$num = intval($r->get($key));
if (empty($num)) {
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
} else {
$r->setPx($key, $num + $val, 1000 * 3600 * 24 * 7);
}
}
}