shish hace 4 años
padre
commit
aa9d609ed9
Se han modificado 1 ficheros con 20 adiciones y 0 borrados
  1. 20 0
      app-ghs/controllers/PurchaseOrderController.php

+ 20 - 0
app-ghs/controllers/PurchaseOrderController.php

@@ -155,6 +155,16 @@ class PurchaseOrderController extends BaseController
     //订单列表
     public function actionList()
     {
+
+        if (getenv('YII_ENV') == 'production') {
+            if ($this->mainId == 742) {
+                $staff = $this->shopAdmin;
+                if (isset($staff['founder']) == false || $staff['founder'] != 2) {
+                    util::fail('没有权限');
+                }
+            }
+        }
+
         $get = Yii::$app->request->get();
         $orderStatus = $get['status'] ?? '';
         if ($orderStatus) {
@@ -176,6 +186,16 @@ class PurchaseOrderController extends BaseController
     //订单详情
     public function actionDetail()
     {
+
+        if (getenv('YII_ENV') == 'production') {
+            if ($this->mainId == 742) {
+                $staff = $this->shopAdmin;
+                if (isset($staff['founder']) == false || $staff['founder'] != 2) {
+                    util::fail('没有权限');
+                }
+            }
+        }
+
         $orderSn = Yii::$app->request->get('orderSn', '');
         $orderData = PurchaseOrderClass::getOrderDetail($orderSn, $this->shopId);
         util::success($orderData);