Browse Source

退款信息

laowu 2 weeks ago
parent
commit
6f925f0916

+ 10 - 15
app/Http/logic/admin/GlobalLogicController.php

@@ -720,7 +720,7 @@ class GlobalLogicController extends BaseLogicController
         // 退款信息
         $data['refund_flag'] = DB::table('agent.dbo.order')
             ->where(['user_id' => $UserID, 'pay_status' => 9])
-            ->count() > 0;
+            ->sum('amount');
         $data['refund_total'] = 0;
         if ($data['refund_flag']) {
             $samePhoneUids = [];
@@ -728,21 +728,16 @@ class GlobalLogicController extends BaseLogicController
                 $samePhoneUids = DB::connection('read')->table('QPAccountsDB.dbo.AccountPhone')
                     ->where('PhoneNum', $userInfo->phone)->pluck('UserID')->toArray();
             }
+            $awi = DB::table('QPAccountsDB.dbo.AccountWithDrawInfo')
+                ->where(['UserID' => $UserID])
+                ->first();
+            $sameEmailUids = [];
+            if ($awi && $awi->EmailAddress) {
+                $sameEmailUids = DB::connection('read')->table('QPAccountsDB.dbo.AccountWithDrawInfo')
+                    ->where('EmailAddress', $awi->EmailAddress)->pluck('UserID')->toArray();
+            }
 
-            $sameRegIpUids = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
-                ->where('IsAndroid', 0)
-                ->where('RegisterIP', $userInfo->RegisterIP)
-                ->pluck('UserID')->toArray();
-            $ips = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics')
-                ->where('UserID', $user->UserID ?? 0)
-                ->distinct()
-                ->pluck('LogonIP');
-
-            $sameLoginIpUids = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics')
-                ->whereIn('LogonIP', $ips)
-                ->selectRaw('UserID')
-                ->pluck('UserID')->toArray();
-            $uids = array_unique(array_merge($samePhoneUids, $sameRegIpUids, $sameLoginIpUids));
+            $uids = array_unique(array_merge($samePhoneUids, $sameEmailUids));
             $uids[] = $UserID;
             if (count($uids) > 0) {
                 $data['refund_total'] = DB::table('agent.dbo.order')->lock('WITH(NOLOCK)')

+ 1 - 1
resources/views/admin/global/id_list.blade.php

@@ -78,7 +78,7 @@
                             </tr>
                             <tr>
                                 <td>{{ __('auto.会员') }}ID</td>
-                                <td>{{$userInfo->GameID}} @if($data['refund_flag']) <b style="color:red;">退款({{round($data['refund_total']/100, 2)}})</b> @endif</td>
+                                <td>{{$userInfo->GameID}} @if($data['refund_flag']) <b style="color:red;">退款({{round($data['refund_flag']/100, 2)}}/{{round($data['refund_total']/100, 2)}})</b> @endif</td>
                             </tr>
 
                             <tr>