1
This commit is contained in:
parent
08282ac0d0
commit
44ed34f1e6
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user