修改bug

master
ljl 1 year ago
parent 8936c55334
commit b1bc78c71e

@ -524,8 +524,9 @@ class RebateService extends Service
public function getDayAccumulativeRoleGiftGropMap($baseGame, $gifts, $roles) {
if ($baseGame->id == 17) {
$roleGiftGroupMap = [];
$serverIds = $roles->pluck('server_id')->toArray();
$servers = Server::whereIn('server_id', $serverIds)->get(['server_id', 'create_time'])->keyBy('server_id');
$serverIds = array_unique($roles->pluck('server_id')->toArray());
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$servers = Server::whereIn('game_id', $gameIds)->whereIn('server_id', $serverIds)->get(['server_id', 'create_time'])->keyBy('server_id');
foreach ($roles as $role) {
$serverCreateTime = $servers[$role->server_id] ? $servers[$role->server_id]->create_time : time();
$serverCreateTime = strtotime(date('Y-m-d 00:00:00', $serverCreateTime));
@ -546,6 +547,7 @@ class RebateService extends Service
$roleGiftGroupMap[$role->role_id] = 7;
}
}
var_dump($roleGiftGroupMap);
return $roleGiftGroupMap;
} else {
return [];

Loading…
Cancel
Save