laowu 2 hete
szülő
commit
19b06ca450
1 módosított fájl, 10 hozzáadás és 0 törlés
  1. 10 0
      app/Services/SuperballActivityService.php

+ 10 - 0
app/Services/SuperballActivityService.php

@@ -42,6 +42,16 @@ class SuperballActivityService
         $vipLevel = $this->getUserVipLevel($userId);
         $level = VipService::getVipByField('VIP', $vipLevel);
         $vipFreeBalls = $level ? ($level->SuperballNum ?? 0) : 0;
+        if ($vipFreeBalls == 0 && $userTask === null) {
+            try {
+                $this->selectTier($userId, 'E');
+            } catch (QueryException $e) {
+                if (stripos($e->getMessage(), 'duplicate key') === false) {
+                    throw $e;
+                }
+            }
+            $userTask = $this->getUserTask($userId, $today);
+        }
 
         $rechargeToday = $this->getUserRechargeForDate($userId, $today);
         $turnoverToday = $this->getUserTotalBetForDate($userId, $today);