diff --git a/application/admin/controller/App.php b/application/admin/controller/App.php index ae8f984..8ae8aa3 100644 --- a/application/admin/controller/App.php +++ b/application/admin/controller/App.php @@ -138,7 +138,7 @@ class App extends Base { return $this->buildFailed(ReturnCode::DB_SAVE_ERROR); } $appInfo = AdminApp::get($id); - cache('AccessToken:' . $appInfo['app_secret'], null); + cache('AccessToken:Easy:' . $appInfo['app_secret'], null); if($oldWiki = cache('WikiLogin:' . $id)) { cache('WikiLogin:' . $oldWiki, null); } @@ -174,7 +174,7 @@ class App extends Base { return $this->buildFailed(ReturnCode::DB_SAVE_ERROR); } $appInfo = AdminApp::get($postData['id']); - cache('AccessToken:' . $appInfo['app_secret'], null); + cache('AccessToken:Easy:' . $appInfo['app_secret'], null); if($oldWiki = cache('WikiLogin:' . $postData['id'])) { cache('WikiLogin:' . $oldWiki, null); } @@ -194,7 +194,7 @@ class App extends Base { return $this->buildFailed(ReturnCode::EMPTY_PARAMS, '缺少必要参数'); } $appInfo = AdminApp::get($id); - cache('AccessToken:' . $appInfo['app_secret'], null); + cache('AccessToken:Easy:' . $appInfo['app_secret'], null); AdminApp::destroy($id); if($oldWiki = cache('WikiLogin:' . $id)) { diff --git a/database/migrations/20200324080953_update_admin_menu_data.php b/database/migrations/20200324080953_update_admin_menu_data.php index d41c998..fd43a64 100644 --- a/database/migrations/20200324080953_update_admin_menu_data.php +++ b/database/migrations/20200324080953_update_admin_menu_data.php @@ -25,8 +25,11 @@ class UpdateAdminMenuData extends Migrator { * with the Table class. */ public function up() { - $this->execute('UPDATE admin_menu SET show = 2 WHERE show = 0;'); - $this->execute('UPDATE admin_menu SET show = 0 WHERE show = 1;'); - $this->execute('UPDATE admin_menu SET show = 1 WHERE show = 2;'); + $this->execute('UPDATE `admin_menu` SET `show` = 2 WHERE `show` = 0;'); + $this->execute('UPDATE `admin_menu` SET `show` = 0 WHERE `show` = 1;'); + $this->execute('UPDATE `admin_menu` SET `show` = 1 WHERE `show` = 2;'); + $this->execute('UPDATE `admin_menu` SET `level` = 1 WHERE `fid` = 0;'); + $this->execute('UPDATE `admin_menu` SET `level` = 3 WHERE `url` != "";'); + $this->execute('UPDATE `admin_menu` SET `level` = 2 WHERE `level` = 0;'); } }