Sfoglia il codice sorgente

小蔡鲜花的几个分店的零售店不能修改体系

shish 2 anni fa
parent
commit
c8aa4edf8a
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      app-hd/controllers/ProductController.php

+ 13 - 0
app-hd/controllers/ProductController.php

@@ -202,10 +202,23 @@ class ProductController extends BaseController
     public function actionBatchChangePrice()
     {
         $shop = $this->shop ?? [];
+        $shopId = $shop->id ?? 0;
         $default = $shop->default ?? 0;
         $join = $shop->join ?? 0;
         $shopAdmin = $this->shopAdmin;
         $adminId = $this->adminId ?? 0;
+
+        if (getenv('YII_ENV') == 'production') {
+            //小蔡鲜花的几个分店的零售店不能修改体系
+            if (in_array($shopId, [29153, 29155, 29157, 29162, 29164])) {
+                util::fail('本店无法改价');
+            }
+        } else {
+            if (in_array($shopId, [36545])) {
+                util::fail('本店无法改价哦');
+            }
+        }
+
         if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
             util::fail('超管才能修改');
         }