This commit is contained in:
aozhiwei 2024-10-08 15:26:54 +08:00
parent 41ab453c08
commit 9abaecfbfb

View File

@ -29,6 +29,19 @@ class BattleBoxService {
}
}
}
if ($boxNum > 0) {
SqlHelper::insert(
$this->_getSelfMysql(),
't_box_alloc',
array(
'room_uuid' => $roomUuid,
'account_id' => myself()->_getAccountId(),
'box_num' => $boxNum,
'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime(),
)
);
}
return $boxNum;
}
@ -69,9 +82,9 @@ class BattleBoxService {
return empty($num) ? 0 : $num;
}
private static function incAlreadyTodayAllocBoxNum($val)
private static function incAlreadyAllocNum($phase, $time, $val)
{
$key = 'box_daily_already_alloc_num:' . myself()->_getNowDaySeconds();
$key = self::DAILY_PHASE_ALREADY_ALLOC_NUM_KEY . $phase . ':' . $time;
$r = $this->_getRedis($key);
$num = intval($r->get($key));
if (empty($num)) {