|
|
@@ -32,12 +32,35 @@ class StockModeController extends Controller
|
|
|
->where('GameID', 0)
|
|
|
->orderBy('SortID')
|
|
|
->get();
|
|
|
+ // 今日税收 rtp 中间率
|
|
|
+ $todayID = date('Ymd');
|
|
|
+
|
|
|
+ $gameRoom = DB::connection('read')
|
|
|
+ ->table('QPPlatformDB.dbo.GameRoomInfo')
|
|
|
+ ->select('RevenueRatio')
|
|
|
+ ->first();
|
|
|
+ // 将千分比转换为百分比显示(例如:50 -> 5%)
|
|
|
+ $revenueRatio = $gameRoom ? ($gameRoom->RevenueRatio / 10) : 0;
|
|
|
+
|
|
|
+ $rst2 = DB::Table('QPPlatformDB.dbo.RoomStockDay2')
|
|
|
+ ->lock('with(nolock)')
|
|
|
+ ->selectRaw('SUM(Winlost) as SumWinlost, SUM(Turnover) as SumTurnover')
|
|
|
+ ->groupBy('SortID')
|
|
|
+ ->where('DateID', $todayID)
|
|
|
+ ->get();
|
|
|
+ foreach ($rst2 as $k => $v) {
|
|
|
+ $rst2[$k]->todayRevenue = $v->SumTurnover*$revenueRatio/100;
|
|
|
+ $rst2[$k]->todayRtp = round($v->SumWinlost/$v->SumTurnover, 4);
|
|
|
+ $rst2[$k]->todayWinRatio = 0; // today 获取中奖率并赋值
|
|
|
+ }
|
|
|
+ $rst2 = $rst2->keyBy('SortID');
|
|
|
|
|
|
return view('admin.stock_mode.index', compact(
|
|
|
'systemConfig',
|
|
|
'betMaxLimits',
|
|
|
'rechargeMinLimits',
|
|
|
- 'roomStocks'
|
|
|
+ 'roomStocks',
|
|
|
+ 'rst2'
|
|
|
));
|
|
|
}
|
|
|
|