Kaynağa Gözat

custom/batch-command

shish 4 yıl önce
ebeveyn
işleme
39353ff8a1
1 değiştirilmiş dosya ile 1 ekleme ve 18 silme
  1. 1 18
      console/controllers/CustomController.php

+ 1 - 18
console/controllers/CustomController.php

@@ -23,23 +23,6 @@ use Yii;
 class CustomController extends Controller
 {
 
-    //黑名单设置 ./yii custom/black
-    public function actionBlack()
-    {
-        $list = CustomClass::getAllByCondition(['black' => 2], null, '*', null, true);
-        if (!empty($list)) {
-            foreach ($list as $c) {
-                $ghsId = $c->ghsId ?? 0;
-                $ghs = GhsClass::getById($ghsId, true);
-                if (!empty($ghs)) {
-                    $ghs->black = 2;
-                    $ghs->save();
-                    echo $ghs->name . " id:{$ghs->id} 已经黑了\n";
-                }
-            }
-        }
-    }
-
     //欠款信息不一致跟踪 ssh 20220307 ./yii custom/adjust-debt
     public function actionAdjustDebt()
     {
@@ -135,7 +118,7 @@ class CustomController extends Controller
 
     }
 
-    public function actionCreateCustomer()
+    public function actionBatchCommand()
     {
         //批量创建客户
         $this->createCustomer();