Browse Source

申请完整功能

shish 3 years ago
parent
commit
ef2021455d
2 changed files with 30 additions and 0 deletions
  1. 19 0
      app-hd/controllers/GhsController.php
  2. 11 0
      app-hd/controllers/ShopController.php

+ 19 - 0
app-hd/controllers/GhsController.php

@@ -24,6 +24,25 @@ class GhsController extends BaseController
         'zs' => ['name' => '金店', 'num' => 0, 'amount' => 0, 'key' => 'zs'],
     ];
 
+    //是否屏蔽 ssh 20230226
+    public function actionChangeDelStatus()
+    {
+        $get = Yii::$app->request->get();
+        $ghsId = $get['ghsId'] ?? 0;
+        $delStatus = $get['delStatus'] ?? 0;
+        $ghs = GhsClass::getById($ghsId, true);
+        if (empty($ghs)) {
+            util::fail('没有找到供货商');
+        }
+        $ownMainId = $ghs->ownMainId ?? 0;
+        if ($ownMainId != $this->mainId) {
+            util::fail('没有权限操作');
+        }
+        $ghs->delStatus = $delStatus;
+        $ghs->save();
+        util::complete('操作成功');
+    }
+
     //获取供货商物流 ssh 20230105
     public function actionGetAllWl()
     {

+ 11 - 0
app-hd/controllers/ShopController.php

@@ -22,6 +22,17 @@ class ShopController extends BaseController
 
     public $guestAccess = ['all', 'gathering-img-url', 'check-shop'];
 
+    //是否开启完整功能 ssh 20230226
+    public function actionChangeOnlyCg()
+    {
+        $shop = $this->shop;
+        $get = Yii::$app->request->get();
+        $onlyCg = $get['onlyCg'] ?? 0;
+        $shop->onlyCg = $onlyCg;
+        $shop->save();
+        util::complete('操作成功');
+    }
+
     public function actionCheckShop()
     {
         $get = Yii::$app->request->get();