shish hace 7 meses
padre
commit
7428f1a4e4
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      console/controllers/ShopExtController.php

+ 1 - 2
console/controllers/ShopExtController.php

@@ -21,7 +21,7 @@ class ShopExtController extends Controller
         $query = new \yii\db\Query();
         $query->from(Shop::tableName());
 
-        foreach ($query->batch() as $batch) {
+        foreach ($query->batch(1000) as $batch) {
             foreach ($batch as $shop) {
                 $mainId = $shop['mainId'] ?? 0;
                 $hasRecharge = RechargeSqClass::getByCondition(['mainId' => $mainId], true);
@@ -31,7 +31,6 @@ class ShopExtController extends Controller
                 $hasLevel = MemberLevelClass::getByCondition(['mainId' => $mainId], true);
                 if (empty($hasLevel)) {
                     MemberLevelClass::initData($shop);
-                    echo $mainId;die;
                 }
             }
         }