Browse Source

add recharge stat

laowu 1 day ago
parent
commit
7435a8ac6c
1 changed files with 14 additions and 0 deletions
  1. 14 0
      app/Services/OrderServices.php

+ 14 - 0
app/Services/OrderServices.php

@@ -377,6 +377,20 @@ class  OrderServices
                 app(PaidRewardStatisticsService::class)
                 app(PaidRewardStatisticsService::class)
                     ->incrementRecordByDateIDAndType(date('Ymd'), $type, $give * NumConfig::NUM_VALUE);
                     ->incrementRecordByDateIDAndType(date('Ymd'), $type, $give * NumConfig::NUM_VALUE);
             }
             }
+            $typeMap= [
+                0 => 'normal_recharge_chips',
+                301 => 'first_recharge_gift_chips',
+                302 => 'bankrupt_gift_chips',
+                304 => 'daily_gift_chips',
+                305 => 'vip_inactive_gift_chips',
+                402 => 'christmas_gift_chips',
+            ];
+            $type = $typeMap[$GiftsID] ?? 'unknown';
+            app(PaidRewardStatisticsService::class)
+                ->incrementRecordByDateIDAndType(date('Ymd'), $type, ($Recharge+$give) * NumConfig::NUM_VALUE);
+            app(PaidRewardStatisticsService::class)
+                ->incrementRecordByDateIDAndType(date('Ymd'), 'RechageReal', $Recharge * NumConfig::NUM_VALUE);
+
 
 
         }
         }
         // free bonus 礼包:充值后赠送 InsureScore(单位为分)
         // free bonus 礼包:充值后赠送 InsureScore(单位为分)