shish 2 jaren geleden
bovenliggende
commit
e191dbf3e6
1 gewijzigde bestanden met toevoegingen van 21 en 2 verwijderingen
  1. 21 2
      app-ghs/controllers/CheckOrderController.php

+ 21 - 2
app-ghs/controllers/CheckOrderController.php

@@ -210,9 +210,28 @@ class CheckOrderController extends BaseController
         ini_set('memory_limit', '2045M');
         set_time_limit(0);
         $staff = $this->shopAdmin;
-        if ($staff->mobile != '15280215347' && $staff->founder == 1) {
-            util::fail('不能清空');
+
+        $could = $staff->mobile == '15280215347' ? true : false;
+
+        $mainId = $this->mainId;
+        if (getenv('YII_ENV') == 'production') {
+            if ($mainId == 10536) {
+                if (in_array($this->adminId, [11648])) {
+                    $could = true;
+                }
+            }
+        } else {
+            if ($mainId == 812) {
+                if (in_array($this->adminId, [1091])) {
+                    $could = true;
+                }
+            }
         }
+
+        if ($could == false) {
+            util::fail('无法操作');
+        }
+
         $mainId = $this->mainId ?? 0;
         $adminId = $this->adminId ?? 0;
         $shopId = $this->shopId ?? 0;