|
@@ -605,6 +605,11 @@ class GlobalUser extends BaseApiLogic
|
|
|
// 全局报表 - 游戏相关
|
|
// 全局报表 - 游戏相关
|
|
|
public function games($StartDataID, $EndDataID)
|
|
public function games($StartDataID, $EndDataID)
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
|
|
+ $redis = \Illuminate\Support\Facades\Redis::connection();
|
|
|
|
|
+ $gameRtp =$redis->get("SomeConfigSpecial");
|
|
|
|
|
+ $gameRtp = json_decode($gameRtp,true);
|
|
|
|
|
+
|
|
|
// 流水、输赢、彩金
|
|
// 流水、输赢、彩金
|
|
|
$gameInfo = DB::connection('read')->table('QPRecordDB.dbo.RecordUserTotalStatistics')
|
|
$gameInfo = DB::connection('read')->table('QPRecordDB.dbo.RecordUserTotalStatistics')
|
|
|
// ->selectRaw('sum(TotalBet) as flowing_water,Isnull(sum(Revenue),0) as Revenue,IsNull((sum(LostScore) + sum(WinScore)),0) Score,Isnull(SUM(Handsel),0) as ChangeScore')
|
|
// ->selectRaw('sum(TotalBet) as flowing_water,Isnull(sum(Revenue),0) as Revenue,IsNull((sum(LostScore) + sum(WinScore)),0) Score,Isnull(SUM(Handsel),0) as ChangeScore')
|
|
@@ -641,6 +646,8 @@ class GlobalUser extends BaseApiLogic
|
|
|
|
|
|
|
|
$gameRoomInfo->free_win_lose = $gameRoomInfo->win_lose-$gameRoomInfo->pay_win_lose;
|
|
$gameRoomInfo->free_win_lose = $gameRoomInfo->win_lose-$gameRoomInfo->pay_win_lose;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 游戏人数
|
|
// 游戏人数
|
|
|
$totalGameCount = DB::table(TableName::QPRecordDB() . 'RecordUserGameDayCount')
|
|
$totalGameCount = DB::table(TableName::QPRecordDB() . 'RecordUserGameDayCount')
|
|
|
->whereBetween('DateID', [$StartDataID, $EndDataID])
|
|
->whereBetween('DateID', [$StartDataID, $EndDataID])
|
|
@@ -656,6 +663,8 @@ class GlobalUser extends BaseApiLogic
|
|
|
$value = number_float($value / NumConfig::NUM_VALUE);
|
|
$value = number_float($value / NumConfig::NUM_VALUE);
|
|
|
}
|
|
}
|
|
|
unset($value);
|
|
unset($value);
|
|
|
|
|
+
|
|
|
|
|
+ $gameRoomInfo->Rtp = @$gameRtp['g0'];
|
|
|
if (!empty($gameRoomInfo)) {
|
|
if (!empty($gameRoomInfo)) {
|
|
|
// 平台输赢 = 输赢 + 税收
|
|
// 平台输赢 = 输赢 + 税收
|
|
|
// $gameRoomInfo->win_lose = $gameRoomInfo->win_lose;
|
|
// $gameRoomInfo->win_lose = $gameRoomInfo->win_lose;
|
|
@@ -691,6 +700,8 @@ class GlobalUser extends BaseApiLogic
|
|
|
// dd($gameList);
|
|
// dd($gameList);
|
|
|
$gamesorts=[];
|
|
$gamesorts=[];
|
|
|
$revenueGames = config('games.revenueGames');
|
|
$revenueGames = config('games.revenueGames');
|
|
|
|
|
+
|
|
|
|
|
+// dd($gameRtp);
|
|
|
foreach ($gameList as &$value) {
|
|
foreach ($gameList as &$value) {
|
|
|
$value->ServerName = '';
|
|
$value->ServerName = '';
|
|
|
$value->flowing_water = is_null($value->flowing_water) ? 0 : number_float($value->flowing_water / NumConfig::NUM_VALUE);
|
|
$value->flowing_water = is_null($value->flowing_water) ? 0 : number_float($value->flowing_water / NumConfig::NUM_VALUE);
|
|
@@ -727,6 +738,10 @@ class GlobalUser extends BaseApiLogic
|
|
|
$value->win_lose = is_null($val->Winlost) ? $value->win_lose : $value->win_lose + ($val->Winlost / NumConfig::NUM_VALUE);
|
|
$value->win_lose = is_null($val->Winlost) ? $value->win_lose : $value->win_lose + ($val->Winlost / NumConfig::NUM_VALUE);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if(is_array($gameRtp)){
|
|
|
|
|
+ $value->Rtp = @$gameRtp['g'.$value->GameID]??'';
|
|
|
|
|
+ }
|
|
|
// if($value->SortID == 1){
|
|
// if($value->SortID == 1){
|
|
|
// $chu += $value->flowing_water;
|
|
// $chu += $value->flowing_water;
|
|
|
// $chu_n += $value->flowing_water_new;
|
|
// $chu_n += $value->flowing_water_new;
|
|
@@ -760,6 +775,8 @@ class GlobalUser extends BaseApiLogic
|
|
|
$oldvalue->free_win_lose += $value->free_win_lose;
|
|
$oldvalue->free_win_lose += $value->free_win_lose;
|
|
|
$oldvalue->free_flowing_water += $value->free_flowing_water;
|
|
$oldvalue->free_flowing_water += $value->free_flowing_water;
|
|
|
|
|
|
|
|
|
|
+ $oldvalue->Rtp = $value->Rtp;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
$gameList=array_values($gamesorts);
|
|
$gameList=array_values($gamesorts);
|
|
|
$gameList=Util::arraySort($gameList,'flowing_water_new',SORT_DESC);
|
|
$gameList=Util::arraySort($gameList,'flowing_water_new',SORT_DESC);
|