diff --git a/backend/src/main/java/io/dataease/controller/sys/SysPluginController.java b/backend/src/main/java/io/dataease/controller/sys/SysPluginController.java index a43458f112..0f1c32c9af 100644 --- a/backend/src/main/java/io/dataease/controller/sys/SysPluginController.java +++ b/backend/src/main/java/io/dataease/controller/sys/SysPluginController.java @@ -49,4 +49,14 @@ public class SysPluginController { return pluginService.uninstall(pluginId); } + @ApiOperation("更新插件") + @PostMapping("/update/id") + @RequiresPermissions("plugin:upload") + public Map update(@PathVariable("id") Long id, @RequestParam("file") MultipartFile file) throws Exception{ + if (pluginService.uninstall(id)) { + return pluginService.localInstall(file); + } + return null; + } + }