Browse Source

REPORT-64811 保持设计器商城下载reu文件名中的版本信息

【问题原因】
更新在线组件时也要保持下载下来的reu文件与商城中的reu文件名一致

【改动思路】
同上
bugfix/11.0
Starryi 3 years ago
parent
commit
ea134f0535
  1. 5
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetUpdater.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java

5
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<Double> {
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<Double> {
}
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;

2
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;

Loading…
Cancel
Save