From 959d8b953d9abe66337c6d1d7c99a8aa34552e67 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 3 Sep 2021 15:29:01 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58746=20zip=E5=AE=89=E8=A3=85=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/share/action/InstallComponentAction.java | 4 +++- .../com/fr/design/mainframe/share/util/InstallUtils.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java index a845759f7..6cb00b6ff 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java @@ -95,7 +95,9 @@ public class InstallComponentAction extends UpdateAction { } ShareWidgetInfoManager.getInstance().saveXmlInfo(); - boolean needShowMessage = (chosenFiles.length > 1 && chosenFiles.length != failureList.size()) || containRues(chosenFiles); + boolean reuNeedShowMessage = chosenFiles.length > 1 && chosenFiles.length != failureList.size(); + boolean reusNeedShowMessage = containRues(chosenFiles) && !failureList.isEmpty(); + boolean needShowMessage = reuNeedShowMessage || reusNeedShowMessage; return new InstallBackInfo(installStatus, needShowMessage, failureList); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java index 610f688a4..cd3e8c1ad 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java @@ -30,9 +30,14 @@ public class InstallUtils { * 安装组件包 */ public static boolean installReusFile(File chosenFile, long installTime, List list) { - return installReusFile(chosenFile, installTime, list, o -> { + InstallResult installResult = installReusFile(chosenFile, installTime, list, o -> { //do nothing - }).installStatus; + }); + Group group = installResult.group; + if (group.getAllBindInfoList().length == 0) { + DefaultShareGroupManager.getInstance().removeGroup(group); + } + return installResult.installStatus; } /**