Tree 22 godzin temu
rodzic
commit
4ab02c1588
1 zmienionych plików z 11 dodań i 23 usunięć
  1. 11 23
      app/Http/Controllers/Game/PayRechargeController.php

+ 11 - 23
app/Http/Controllers/Game/PayRechargeController.php

@@ -671,14 +671,10 @@ class PayRechargeController extends Controller
             // 添加奖励到用户账户
             // 添加奖励到用户账户
             if ($rewardAmount > 0) {
             if ($rewardAmount > 0) {
                 OuroGameService::AddScore($userId, $rewardAmount * NumConfig::NUM_VALUE, 52, true);  // 52=首充礼包奖励
                 OuroGameService::AddScore($userId, $rewardAmount * NumConfig::NUM_VALUE, 52, true);  // 52=首充礼包奖励
-                $userRecharge = DB::table('QPAccountsDB.dbo.YN_VIPAccount')->lock('with(nolock)')
-                    ->where('UserID', $userId)
-                    ->value('Recharge') ?: 0;
-                if ($userRecharge > 0) {
-                    app(PaidRewardStatisticsService::class)
-                        ->incrementRecordByDateIDAndType(date('Ymd'), 'first_recharge_claim',
-                            $rewardAmount * NumConfig::NUM_VALUE);
-                }
+
+                app(PaidRewardStatisticsService::class)
+                    ->incrementRecordByDateIDAndType(date('Ymd'), 'first_recharge_claim',
+                        $rewardAmount * NumConfig::NUM_VALUE);
 
 
                 \Log::info('首充礼包奖励领取', [
                 \Log::info('首充礼包奖励领取', [
                     'user_id' => $userId,
                     'user_id' => $userId,
@@ -1077,14 +1073,9 @@ class PayRechargeController extends Controller
         try {
         try {
             // 发放奖励
             // 发放奖励
             OuroGameService::AddScore($userId, $rewardAmount * NumConfig::NUM_VALUE, 52, true); // 52=礼包奖励
             OuroGameService::AddScore($userId, $rewardAmount * NumConfig::NUM_VALUE, 52, true); // 52=礼包奖励
-            $userRecharge = DB::table('QPAccountsDB.dbo.YN_VIPAccount')->lock('with(nolock)')
-                ->where('UserID', $userId)
-                ->value('Recharge') ?: 0;
-            if ($userRecharge > 0) {
-                app(PaidRewardStatisticsService::class)
-                    ->incrementRecordByDateIDAndType(date('Ymd'), 'daily_gift_claim',
-                        $rewardAmount * NumConfig::NUM_VALUE);
-            }
+            app(PaidRewardStatisticsService::class)
+                ->incrementRecordByDateIDAndType(date('Ymd'), 'daily_gift_claim',
+                    $rewardAmount * NumConfig::NUM_VALUE);
 
 
             // 标记已领取
             // 标记已领取
             Redis::setex($redisKey, 86400, 1); // 24小时过期
             Redis::setex($redisKey, 86400, 1); // 24小时过期
@@ -1575,13 +1566,10 @@ class PayRechargeController extends Controller
         try {
         try {
             // 发放奖励
             // 发放奖励
             OuroGameService::AddScore($userId, $amount * NumConfig::NUM_VALUE, 52, true); // 52=礼包奖励
             OuroGameService::AddScore($userId, $amount * NumConfig::NUM_VALUE, 52, true); // 52=礼包奖励
-            $userRecharge = DB::table('QPAccountsDB.dbo.YN_VIPAccount')->lock('with(nolock)')
-                ->where('UserID', $userId)
-                ->value('Recharge') ?: 0;
-            if ($userRecharge > 0) {
-                app(PaidRewardStatisticsService::class)
-                    ->incrementRecordByDateIDAndType(date('Ymd'), 'vip_inactive_claim', $amount * NumConfig::NUM_VALUE);
-            }
+
+            app(PaidRewardStatisticsService::class)
+                ->incrementRecordByDateIDAndType(date('Ymd'), 'vip_inactive_claim', $amount * NumConfig::NUM_VALUE);
+
 
 
             // 更新位标记
             // 更新位标记
             $newMask = $claimedMask | (1 << $dayIndex);
             $newMask = $claimedMask | (1 << $dayIndex);