Tree 4 дней назад
Родитель
Сommit
fb7ab88386

+ 1 - 0
app/Console/Commands/CheckIosAppStore.php

@@ -20,6 +20,7 @@ class CheckIosAppStore extends Command
         'Slots Magnet Revolution' => 'https://apps.apple.com/us/app/slots-magnet-revolution/id6759797102',
         'Slots Magnet Revolution' => 'https://apps.apple.com/us/app/slots-magnet-revolution/id6759797102',
         'Viking Mysteric Slots'   => 'https://apps.apple.com/us/app/viking-mysteric-slots/id6759851510',
         'Viking Mysteric Slots'   => 'https://apps.apple.com/us/app/viking-mysteric-slots/id6759851510',
         'Slots Chemistry Pirate'  => 'https://apps.apple.com/us/app/slots-chemistry-pirate/id6759852588',
         'Slots Chemistry Pirate'  => 'https://apps.apple.com/us/app/slots-chemistry-pirate/id6759852588',
+//        'ceshi' => 'https://apps.apple.com/us/app/pixiepineslotsgrid/id6758513278'
     ];
     ];
 
 
     /** 页面内容中表示“已下架”的关键词(不区分大小写) */
     /** 页面内容中表示“已下架”的关键词(不区分大小写) */

+ 30 - 4
app/Http/Controllers/Admin/GameDataController.php

@@ -549,7 +549,6 @@ class GameDataController extends Controller
         $GameID = $request->get('GameID');
         $GameID = $request->get('GameID');
         $SortID = $request->get('SortID');
         $SortID = $request->get('SortID');
         $uid = $request->get('uid');
         $uid = $request->get('uid');
-
         if($uid){
         if($uid){
             $where = [];
             $where = [];
             $where[] = ['ai.GameID', $uid];
             $where[] = ['ai.GameID', $uid];
@@ -560,17 +559,44 @@ class GameDataController extends Controller
             !empty($SortID) && $where[] = ['gi.SortID', $SortID];
             !empty($SortID) && $where[] = ['gi.SortID', $SortID];
         }
         }
 
 
-
-
         $list = DB::connection('read')->table('QPTreasureDB.dbo.GameScoreLocker as gl')
         $list = DB::connection('read')->table('QPTreasureDB.dbo.GameScoreLocker as gl')
             ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'gl.UserID', 'ai.UserID')
             ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'gl.UserID', 'ai.UserID')
             ->leftJoin('QPPlatformDB.dbo.GameRoomInfo as gi','gl.ServerID','gi.ServerID')
             ->leftJoin('QPPlatformDB.dbo.GameRoomInfo as gi','gl.ServerID','gi.ServerID')
             ->leftJoin('QPTreasureDB.dbo.GameScoreInfo as gsi','gl.UserID','=','gsi.UserID')
             ->leftJoin('QPTreasureDB.dbo.GameScoreInfo as gsi','gl.UserID','=','gsi.UserID')
             ->where($where)
             ->where($where)
             ->selectRaw('ai.GameID,ai.NickName,Channel,gi.ServerName,gi.SortID,gl.CollectDate,gl.UserID,gsi.Score')
             ->selectRaw('ai.GameID,ai.NickName,Channel,gi.ServerName,gi.SortID,gl.CollectDate,gl.UserID,gsi.Score')
-//            ->orderByDesc('CreateTime')
+            // 按进入游戏时间倒序
+            ->orderByDesc('gl.CollectDate')
             ->paginate(10);
             ->paginate(10);
 
 
+        // 计算库存模式:总充值 > StockMode2SwitchRecharge
+        if ($list->count() > 0) {
+            $userIds = [];
+            foreach ($list as $item) {
+                $userIds[] = $item->UserID;
+            }
+            $userIds = array_unique($userIds);
+
+            // 获取模式切换充值阈值
+            $switchRecharge = DB::connection('read')
+                ->table('QPAccountsDB.dbo.SystemStatusInfo')
+                ->where('StatusName', 'StockMode2SwitchRecharge')
+                ->value('StatusValue');
+            $switchRecharge = $switchRecharge ?? 0;
+
+            // 获取用户总充值(YN_VIPAccount.Recharge)
+            $rechargeMap = DB::connection('read')
+                ->table('QPAccountsDB.dbo.YN_VIPAccount')
+                ->whereIn('UserID', $userIds)
+                ->pluck('Recharge', 'UserID')
+                ->toArray();
+
+            foreach ($list as $item) {
+                $totalRecharge = $rechargeMap[$item->UserID] ?? 0;
+                $item->is_stock_mode = $totalRecharge > $switchRecharge ? 1 : 0;
+            }
+        }
+
         $games = DB::connection('read')->table(TableName::QPPlatformDB() . 'GameKindItem')
         $games = DB::connection('read')->table(TableName::QPPlatformDB() . 'GameKindItem')
             ->whereIn('GameID', config('games.openKGame'))
             ->whereIn('GameID', config('games.openKGame'))
             ->select('KindName', 'GameID')
             ->select('KindName', 'GameID')

+ 2 - 0
resources/views/admin/game_data/game_online.blade.php

@@ -64,6 +64,7 @@
                                 <th width="6%">{{ __('auto.渠道') }}</th>
                                 <th width="6%">{{ __('auto.渠道') }}</th>
                                 <th width="6%">{{ __('auto.金豆') }}</th>
                                 <th width="6%">{{ __('auto.金豆') }}</th>
                                 <th width="6%">{{ __('auto.进入游戏时间') }}</th>
                                 <th width="6%">{{ __('auto.进入游戏时间') }}</th>
+                                <th width="6%">{{ __('auto.库存模式') }}</th>
                             </tr>
                             </tr>
                             </thead>
                             </thead>
                             <tbody>
                             <tbody>
@@ -80,6 +81,7 @@
                                     <td>{{ $v->Channel}}</td>
                                     <td>{{ $v->Channel}}</td>
                                     <td>{{ $v->Score/100 }}</td>
                                     <td>{{ $v->Score/100 }}</td>
                                     <td>{{$v->CollectDate}}</td>
                                     <td>{{$v->CollectDate}}</td>
+                                    <td>{{ !empty($v->is_stock_mode) ? '是' : '否' }}</td>
                                 </tr>
                                 </tr>
                             @endforeach
                             @endforeach
                             </tbody>
                             </tbody>