shish hace 8 meses
padre
commit
b7c497ab77
Se han modificado 1 ficheros con 5 adiciones y 14 borrados
  1. 5 14
      app-hd/controllers/GhsController.php

+ 5 - 14
app-hd/controllers/GhsController.php

@@ -129,19 +129,6 @@ class GhsController extends BaseController
     //是否屏蔽 ssh 20230226
     public function actionChangeDelStatus()
     {
-
-        $adminId = $this->adminId;
-        //只有石少华才能删除商家
-        if (getenv('YII_ENV') == 'production') {
-            if ($adminId != 4) {
-                util::fail('开发中');
-            }
-        } else {
-            if ($adminId != 919) {
-                util::fail('开发中');
-            }
-        }
-
         $get = Yii::$app->request->get();
         $ghsId = $get['ghsId'] ?? 0;
         $delStatus = $get['delStatus'] ?? 0;
@@ -151,10 +138,14 @@ class GhsController extends BaseController
         }
         $ownMainId = $ghs->ownMainId ?? 0;
         if ($ownMainId != $this->mainId) {
-            util::fail('无法操作');
+            util::fail('不是你的供货商,无法操作');
         }
         $ghs->delStatus = $delStatus;
         $ghs->save();
+        $customId = $ghs->customId ?? 0;
+        $custom = CustomClass::getById($customId, true)
+        $custom->delStatus = $delStatus;
+        $custom->save();
         util::complete('操作成功');
     }