Browse Source

feat:清除缓存

lizhi 2 months ago
parent
commit
ec6826b3c0

+ 1 - 0
protected/controllers/CanteenController.php

@@ -181,6 +181,7 @@ class CanteenController extends Controller
             $trans->rollback();
             Helper::error($e->getMessage());
         }
+        $this->clearAuth();
         Helper::ok();
     }
 

+ 2 - 3
protected/controllers/CompanyController.php

@@ -211,9 +211,8 @@ class CompanyController extends Controller
             $trans->rollback();
             Helper::error($e->getMessage());
         }
-        if (!$isEdit && $data['city']) {
-            $this->clearAuthByCity($data['city']);
-        }
+        $this->clearAuth();
+        $this->clearAuthByCity($data['city']);
         Helper::ok();
     }
 

+ 2 - 5
protected/controllers/SchoolController.php

@@ -187,11 +187,8 @@ class SchoolController extends Controller
             $trans->rollback();
             Helper::error($e->getMessage());
         }
-
-        if (!$isEdit && $data['city']) {
-            $this->clearAuthByCity($data['city']);
-        }
-
+        $this->clearAuth();
+        $this->clearAuthByCity($data['city']);
         Helper::ok();
     }