瀏覽代碼

提现限制

shish 5 年之前
父節點
當前提交
8c1cc2b0bc

+ 3 - 0
app-ghs/controllers/CashController.php

@@ -23,6 +23,9 @@ class CashController extends BaseController
         $get = Yii::$app->request->get();
         $get['shopAdminId'] = $this->shopAdminId;
         $shopAdmin = $this->shopAdmin;
+        if (isset($shopAdmin['super']) == false || $shopAdmin['super'] != 1) {
+            util::fail('超管才能申请提现');
+        }
         $get['shopAdminName'] = $shopAdmin->name ?? '';
         $get['shopId'] = $this->shopId;
         $get['sjId'] = $this->sjId;

+ 1 - 1
app-ghs/controllers/ShopController.php

@@ -205,7 +205,7 @@ class ShopController extends BaseController
         }
         $shopAdmin = $this->shopAdmin->attributes;
         $shopId = $shopAdmin['shopId'];
-        if ($shopAdmin['super'] != 1) {
+        if (isset($shopAdmin['super']) == false || $shopAdmin['super'] != 1) {
             util::fail('超管才能操作');
         }
         ShopClass::updateById($shopId, ['cashAccount' => $cashAccount, 'cashName' => $cashName]);

+ 3 - 0
app-hd/controllers/CashController.php

@@ -23,6 +23,9 @@ class CashController extends BaseController
         $get = Yii::$app->request->get();
         $get['shopAdminId'] = $this->shopAdminId;
         $shopAdmin = $this->shopAdmin;
+        if (isset($shopAdmin['super']) == false || $shopAdmin['super'] != 1) {
+            util::fail('超管才能申请提现');
+        }
         $get['shopAdminName'] = $shopAdmin->name ?? '';
         $get['shopId'] = $this->shopId;
         $get['sjId'] = $this->sjId;

+ 1 - 1
app-hd/controllers/ShopController.php

@@ -218,7 +218,7 @@ class ShopController extends BaseController
         }
         $shopAdmin = $this->shopAdmin->attributes;
         $shopId = $shopAdmin['shopId'];
-        if ($shopAdmin['super'] != 1) {
+        if (isset($shopAdmin['super']) == false || $shopAdmin['super'] != 1) {
             util::fail('超管才能操作');
         }
         ShopClass::updateById($shopId, ['cashAccount' => $cashAccount, 'cashName' => $cashName]);