Parcourir la source

添加手机展示和筛选

Tree il y a 1 semaine
Parent
commit
12f7f571af

+ 4 - 2
app/Http/Controllers/Admin/GlobalController.php

@@ -528,6 +528,7 @@ class GlobalController extends Controller
         $phoneNum = $request->PhoneNum ?? "";
         $spreaderID = (int)$request->SpreaderID ?: "";
         $nickName = $request->NickName ?? "";
+        $mobileModel = trim($request->MobileModel ?? "");
         $startTime = str_replace('T', ' ', $request->start_time ?? "");
         $endTime = str_replace('T', ' ', $request->end_time ?? "");
 
@@ -542,12 +543,13 @@ class GlobalController extends Controller
         $channel = $request->channel;
         $user_tab = $request->user_tab ?: '';
         $packgeName = $request->PackgeName ?: '';
+        $mobileModelOptions = ['iPhone', 'iPad', 'Android', 'PC', 'Mac'];
 
         // 快速搜索
         $quickSearch = $request->quickSearch ?: '';
 
 
-        $list = (new GlobalUser())->userlist($gameID, $phoneNum, $spreaderID, $nickName, $startTime, $endTime, $obj, $vip, $excel, $accounts_type, $channel, $user_tab, $packgeName, $quickSearch, $score,$MachineID,$startLoginTime,$endLoginTime);
+        $list = (new GlobalUser())->userlist($gameID, $phoneNum, $spreaderID, $nickName, $mobileModel, $startTime, $endTime, $obj, $vip, $excel, $accounts_type, $channel, $user_tab, $packgeName, $quickSearch, $score,$MachineID,$startLoginTime,$endLoginTime);
 //        $channels = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')->where('IsAndroid', 0)->groupBy('Channel')->pluck('Channel');
         $channels=$adminChannels;
 //        $webLogonTimes = [1 => 'facebook', 2 => '游客', 3 => '手机号'];
@@ -560,7 +562,7 @@ class GlobalController extends Controller
 //        $ChannelPackageName[] = 'com.teenpatti.queen';
 
         $typeList = [1 => __('auto.游戏中'), 2 => __('auto.未实名'), 3 => __('auto.无手机号'), 5 =>  __('auto.无渠道'), 6 =>  __('auto.未充值'), 7 =>  __('auto.无上级'), 8 =>  __('auto.封号中'), 9 => __('auto.官方账号')];
-        return view('admin.global.userlist', compact('list','MachineID', 'gameID', 'phoneNum', 'spreaderID', 'nickName', 'startTime', 'endTime','startLoginTime', 'endLoginTime', 'obj', 'vip', 'excel', 'accounts_type'
+        return view('admin.global.userlist', compact('list','MachineID', 'gameID', 'phoneNum', 'spreaderID', 'nickName', 'mobileModel', 'mobileModelOptions', 'startTime', 'endTime','startLoginTime', 'endLoginTime', 'obj', 'vip', 'excel', 'accounts_type'
             , 'channel', 'user_tab', 'packgeName', 'channels', 'webLogonTimes', 'ChannelPackageName', 'score', 'quickSearch', 'typeList'
         ));
 

+ 4 - 2
app/Services/GlobalUser.php

@@ -58,7 +58,7 @@ class GlobalUser extends BaseApiLogic
         return $data;
     }
 
-    public function userlist($gameID, $phoneNum, $spreaderID, $nickName, $startTime, $endTime, $obj, $vip, $excel, $accountsType, $channel, $user_tab, $packgeName, $quickSearch, $score,$MachineID,$startLoginTime='',$endLoginTime='')
+    public function userlist($gameID, $phoneNum, $spreaderID, $nickName, $mobileModel, $startTime, $endTime, $obj, $vip, $excel, $accountsType, $channel, $user_tab, $packgeName, $quickSearch, $score,$MachineID,$startLoginTime='',$endLoginTime='')
     {
         $quickSearch = explode(',', trim($quickSearch, ','));
 
@@ -68,7 +68,7 @@ class GlobalUser extends BaseApiLogic
             ->select('StatusValue')
             ->first()->StatusValue ?? 0;
         $adminChannels=session('admin_channels');
-        $field = ['ai.GameID', 'ai.UserID', 'ai.SpreaderID', 'ai.NickName', 'ai.MemberOrder', 'ai.Nullity', 'ai.WebLogonTimes', 'ai.LastLogonIP', 'ai.LastLogonDate', 'ai.RegisterIP', 'ai.RegisterDate', 'ai.Channel', 'gi.Score', 'gi.InsureScore', 'gi.MaxScore', 'gi.MaxWinScore'];
+        $field = ['ai.GameID', 'ai.UserID', 'ai.SpreaderID', 'ai.NickName', 'ai.MemberOrder', 'ai.Nullity', 'ai.WebLogonTimes', 'ai.LastLogonIP', 'ai.LastLogonDate', 'ai.LastLogonMobile', 'ai.RegisterIP', 'ai.RegisterDate', 'ai.Channel', 'gi.Score', 'gi.InsureScore', 'gi.MaxScore', 'gi.MaxWinScore'];
         $Sql = DB::connection('read')->table(TableName::QPAccountsDB() . 'AccountsInfo as ai')
             ->leftJoin(TableName::QPTreasureDB() . 'GameScoreInfo as gi', 'ai.UserID', 'gi.UserID')
             ->where('ai.IsAndroid', 0)
@@ -84,6 +84,8 @@ class GlobalUser extends BaseApiLogic
 
         if (!empty($nickName))
             $where[] = ['ai.NickName', $nickName];
+        if (!empty($mobileModel))
+            $where[] = ['ai.LastLogonMobile', '=', $mobileModel];
         if (!empty($startTime))
             $where[] = ['ai.RegisterDate', '>=', $startTime];
         if (!empty($endTime))

+ 11 - 1
resources/views/admin/global/userlist.blade.php

@@ -43,6 +43,13 @@
                                     <input class="form-control" type="text" name="SpreaderID" id="SpreaderID" value="{{$spreaderID}}" >
                                     <span style="padding-left: 10px" >{{ __('auto.昵称:') }}</span>
                                     <input class="form-control" type="text" name="NickName" id="Compellation" value="{{$nickName}}">
+                                    <span style="padding-left: 10px" >{{ __('auto.手机型号:') }}</span>
+                                    <select class="form-control" name="MobileModel" id="MobileModel" style="color: black">
+                                        <option value="">{{ __('auto.请选择') }}</option>
+                                        @foreach(($mobileModelOptions ?? []) as $model)
+                                            <option value="{{$model}}" @if(($mobileModel ?? '') === $model) selected @endif>{{$model}}</option>
+                                        @endforeach
+                                    </select>
                                     <span style="padding-left: 10px" >{{ __('auto.注册时间:') }}</span>
                                     <input type="datetime-local"  step="01" name="start_time" id="start_time" class="form-control" value="{{$startTime}}" onclick="start_times()"/>
                                     <input type="datetime-local"  step="01" name="end_time" id='end_time' class="form-control" value="{{$endTime}}" onclick="end_times()"/><br>
@@ -122,6 +129,7 @@
                                         &PhoneNum={{$phoneNum}}
                                         &SpreaderID={{$spreaderID}}
                                         &NickName={{$nickName}}
+                                        &MobileModel={{$mobileModel ?? ''}}
                                         &start_time={{$startTime}}
                                         &end_time={{$endTime}}
                                         &vip={{$vip}}
@@ -206,7 +214,7 @@
                                                 {{$item->GameID}}
                                             </a>
                                         </td>
-                                        <td>{{$item->NickName}}</td>
+                                        <td>{{$item->NickName}}{{ !empty($item->LastLogonMobile) ? '(' . $item->LastLogonMobile . ')' : '' }}</td>
                                         <td>{{$item->PhoneNum}}</td>
                                         <td>{{ $item->Score }}</td>
                                         <td>{{ $item->InsureScore }}</td>
@@ -265,6 +273,7 @@
                                         'PhoneNum'=>$phoneNum,
                                         'SpreaderID'=>$spreaderID,
                                         'NickName'=>$nickName,
+                                        'MobileModel'=>$mobileModel ?? '',
                                         'start_time'=>$startTime,
                                         'end_time'=>$endTime,
                                         'start_logintime'=>$startLoginTime,
@@ -328,6 +337,7 @@
             'PhoneNum':"{{$phoneNum}}",
             'SpreaderID':"{{$spreaderID}}",
             'NickName':"{{$nickName}}",
+            'MobileModel':"{{ $mobileModel ?? '' }}",
             'start_time':"{{$startTime}}",
             'end_time':"{{$endTime}}",
             'obj':"{{$obj}}",