1
This commit is contained in:
parent
759a2c9b87
commit
0cc42134b4
@ -237,4 +237,16 @@ class BattleBoxService {
|
||||
}
|
||||
}
|
||||
|
||||
public static function incDropTotalNum($phase, $time, $val)
|
||||
{
|
||||
$key = self::DAILY_PHASE_ALREADY_ALLOC_NUM_KEY . $phase . ':' . $time;
|
||||
$r = myself()->_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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ require_once('mt/StakingVip.php');
|
||||
require_once('services/AwardService.php');
|
||||
require_once('services/PropertyChgService.php');
|
||||
require_once('services/LogService.php');
|
||||
require_once('services/BattleBoxService.php');
|
||||
require_once('phpcommon/tglog.php');
|
||||
|
||||
use models\Circuit;
|
||||
@ -360,6 +361,20 @@ class RoomBattleDataService extends BaseService {
|
||||
}
|
||||
}
|
||||
if (count($rewardBox) > 0){
|
||||
if ($battleSingleDb) {
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
't_box_alloc',
|
||||
array(
|
||||
'room_uuid' => $battleSingleDb['room_uuid'],
|
||||
)
|
||||
);
|
||||
if ($row) {
|
||||
services\BattleBoxService::incDropTotalNum($row['phase'],
|
||||
$row['createtime'],
|
||||
$member['box_num']);
|
||||
}
|
||||
}
|
||||
$rewardBoxResult = myself()->_mergeAlikeItemKey($rewardBox);
|
||||
foreach ($rewardBoxResult as $item){
|
||||
array_push($reward,$item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user