Ver Fonte

同步脚本

shish há 3 anos atrás
pai
commit
11279ac220
1 ficheiros alterados com 6 adições e 4 exclusões
  1. 6 4
      console/controllers/ItemController.php

+ 6 - 4
console/controllers/ItemController.php

@@ -18,12 +18,13 @@ use bizHd\saas\services\ApplyService;
 use common\components\dict;
 use common\components\imgUtil;
 use common\components\stringUtil;
+use common\components\util;
 use yii\console\Controller;
 use Yii;
 use bizGhs\product\classes\ProductClass;
 
 /**
- * 花材初始化 ssh 2021.2.18
+ * 花材同步脚本 ssh 20230619
  */
 class ItemController extends Controller
 {
@@ -105,11 +106,12 @@ class ItemController extends Controller
     public function actionCj()
     {
         if (getenv('YII_ENV') == 'production') {
-            $mtMainId = 3974;
-            $ttMainId = 53;
+            $mtMainId = 7756;
+            $ttMainId = 7615;
         } else {
             $mtMainId = 703;
             $ttMainId = 644;
+            util::stop('已取消');
         }
         $list = ItemClass::getAllByCondition(['mainId' => $mtMainId], null, '*');
         if (!empty($list)) {
@@ -118,7 +120,7 @@ class ItemController extends Controller
         }
         $classList = ItemClassClass::getAllByCondition(['mainId' => $ttMainId], null, '*', null, true);
         if (empty($classList)) {
-            echo '没有找到天天鲜花的分类';
+            echo '没有找到目标门店的分类';
             exit();
         }
         $connection = Yii::$app->db;