From 5d5eb2fbd4ac3a1a551976257ee1078bc9f5ff5a Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 22 Mar 2019 17:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=B8=8A=E4=BC=A0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0sql=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/PluginsAdminService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php index 6edd74411..05fc85b14 100755 --- a/application/service/PluginsAdminService.php +++ b/application/service/PluginsAdminService.php @@ -12,6 +12,7 @@ namespace app\service; use think\Db; use app\service\ResourcesService; +use app\service\SqlconsoleService; /** * 应用管理服务层 @@ -308,6 +309,13 @@ class PluginsAdminService $ret = self::PluginsHookDeployment(); if($ret['code'] == 0) { + // sql运行 + $uninstall_sql = APP_PATH.'plugins'.DS.$plugins.DS.'uninstall.sql'; + if(file_exists($uninstall_sql)) + { + SqlconsoleService::Implement(['sql'=>file_get_contents($uninstall_sql)]); + } + // 删除应用文件 self::PluginsResourcesDelete($plugins); -- GitLab