Browse Source

修改库存

shish 1 year ago
parent
commit
629df655cc
1 changed files with 16 additions and 0 deletions
  1. 16 0
      app-ghs/controllers/CheckOrderController.php

+ 16 - 0
app-ghs/controllers/CheckOrderController.php

@@ -217,6 +217,22 @@ class CheckOrderController extends BaseController
         if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
             util::fail('超管才能盘点');
         }
+
+        if (getenv('YII_ENV') == 'production') {
+            //花大苪只有三个人可以修改库存
+            if ($this->mainId == 8164) {
+                if (!in_array($this->adminId, [9273, 9303, 47576])) {
+                    util::fail('不能修改库存哦');
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+                if (!in_array($this->adminId, [919, 0])) {
+                    util::fail('不能修改库存哦!');
+                }
+            }
+        }
+
         $post = Yii::$app->request->post();
         $post['sjId'] = $this->sjId;
         $post['shopId'] = $this->shopId;