From ea134f0535f75fc8360ae118a13d57ba9cb6f16e Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 28 Dec 2021 09:58:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-64811=20=E4=BF=9D=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=95=86=E5=9F=8E=E4=B8=8B=E8=BD=BDreu?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=AD=E7=9A=84=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 更新在线组件时也要保持下载下来的reu文件与商城中的reu文件名一致 【改动思路】 同上 --- .../design/mainframe/share/ui/block/LocalWidgetUpdater.java | 5 +++-- .../design/mainframe/share/ui/local/LocalWidgetRepoPane.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetUpdater.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetUpdater.java index 68a3123f7..b7d9e7f50 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetUpdater.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetUpdater.java @@ -13,6 +13,7 @@ import com.fr.form.share.DefaultSharableWidget; import com.fr.form.share.Group; import com.fr.form.share.GroupManege; import com.fr.form.share.SharableWidgetProvider; +import com.fr.form.share.bean.OnlineShareWidget; import com.fr.form.share.group.DefaultShareGroupManager; import com.fr.log.FineLoggerFactory; import com.fr.stable.StableUtils; @@ -54,7 +55,7 @@ public class LocalWidgetUpdater implements Process { return 0 <= processValue && processValue <= 1; } - public void updateWidget(String remoteLatestWidgetId, UpdateListener updateListener) { + public void updateWidget(OnlineShareWidget remoteLatestWidget, UpdateListener updateListener) { if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) { ComponentCollector.getInstance().collectDownloadPktNum(); } @@ -77,7 +78,7 @@ public class LocalWidgetUpdater implements Process { } String filePath; try { - filePath = DownloadUtils.download(remoteLatestWidgetId, widget.getName() + "." + widget.getId(), LocalWidgetUpdater.this); + filePath = DownloadUtils.download(remoteLatestWidget.getId(), remoteLatestWidget.getFileLoca(), LocalWidgetUpdater.this); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); return false; diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java index 169b4b5e7..f344d59b0 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java @@ -438,7 +438,7 @@ public class LocalWidgetRepoPane extends BasicPane { LocalWidgetRepoUpdater updater = LocalWidgetRepoUpdater.getInstance(); for (LocalWidgetBlock block: blockList) { OnlineShareWidget remoteLatestWidget = updater.findLatestRemoteWidget(block.getWidget()); - block.getUpdater().updateWidget(remoteLatestWidget.getId(), new LocalWidgetUpdater.UpdateListener() { + block.getUpdater().updateWidget(remoteLatestWidget, new LocalWidgetUpdater.UpdateListener() { @Override public void onUpdated(boolean success, String group, String id) { updateGuard -= 1;