gorden 4 mesiacov pred
rodič
commit
b9a5242e6b
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      app/admin/service/coupon/CardService.php

+ 5 - 5
app/admin/service/coupon/CardService.php

@@ -56,11 +56,11 @@ class CardService
         $rand = $demandConfig['rand'] ?? 0;
         $begin = $demandConfig['begin'] ?? 1;
         if (!empty($lastCard)) {
-            $oldCardId = $lastCard->card_id;
-            $oldCardId = ltrim($oldCardId, $demandConfig['prefix']);
-            $oldCardId = rtrim($oldCardId, $demandConfig['suffix']);
-            $oldCardId = ltrim($oldCardId, $rand);
-            $number = intval($oldCardId) + 1;
+            $oldCardId = (string)$lastCard->card_id;dump('1>>>'.$oldCardId);
+            $oldCardId = ltrim($oldCardId, $demandConfig['prefix']);dump('2>>>'.$oldCardId);
+            $oldCardId = rtrim($oldCardId, $demandConfig['suffix']);dump('3>>>'.$oldCardId);
+            $oldCardId = ltrim($oldCardId, $rand);dump('4>>>'.$oldCardId);
+            $number = intval($oldCardId) + 1;dump('5>>>'.$oldCardId);
         } else {
             $number = $begin;
         }