Browse Source

虚拟库存

shish 1 year ago
parent
commit
6fa410de5a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      console/controllers/LiveController.php

+ 4 - 0
console/controllers/LiveController.php

@@ -3,6 +3,7 @@
 namespace console\controllers;
 
 use bizGhs\live\classes\LiveSeatClass;
+use bizGhs\product\classes\ProductClass;
 use common\components\util;
 use yii\console\Controller;
 use Yii;
@@ -17,6 +18,9 @@ class LiveController extends Controller
         } else {
             $mainId = 644;
         }
+
+        ProductClass::updateByCondition(['mainId' => $mainId], ['stock' => 99999, 'virtualStock' => 1]);
+
         $has = LiveSeatClass::getByCondition(['mainId' => $mainId], true);
         if (!empty($has)) {
             util::stop('已经有了');