From 6c28ceb1283c3eebc5683ff380c26ce2a749ff2e Mon Sep 17 00:00:00 2001 From: Lanlan Date: Tue, 10 Aug 2021 17:47:29 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-54640=20-=20=E3=80=9010.0.19=E3=80=91?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=9F=8B=E7=82=B9=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=89=A5=E7=A6=BB=E4=BA=8C=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reuse/ComponentReuseNotificationInfo.java | 14 +++++++++++++- .../fr/design/share/ui/generate/ShareMainPane.java | 13 +++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java index 0ec6f26ad4..3d305d8ace 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java @@ -25,6 +25,8 @@ public class ComponentReuseNotificationInfo implements XMLable { private long lastGuidePopUpTime = 0; + private String historyCreatedReuses = "[]"; + public long getLastNotifyTime() { return lastNotifyTime; } @@ -62,12 +64,21 @@ public class ComponentReuseNotificationInfo implements XMLable { DesignerEnvManager.getEnvManager().saveXMLFile(); } + public String getHistoryCreatedReuses() { + return historyCreatedReuses; + } + + public void setHistoryCreatedReuses(String historyCreatedReuses) { + this.historyCreatedReuses = historyCreatedReuses; + } + @Override public void readXML(XMLableReader reader) { this.setLastNotifyTime(reader.getAttrAsLong("lastNotifyTime", 0L)); this.setNotifiedNumber(reader.getAttrAsInt("notifiedNumber", 0)); this.setClickedWidgetLib(reader.getAttrAsBoolean("clickedWidgetLib", false)); this.setLastGuidePopUpTime(reader.getAttrAsLong("lastGuidePopUpTime", 0L)); + this.setHistoryCreatedReuses(reader.getAttrAsString("historyCreatedReuses", "[]")); } @Override @@ -76,7 +87,8 @@ public class ComponentReuseNotificationInfo implements XMLable { writer.attr("lastNotifyTime", this.lastNotifyTime) .attr("notifiedNumber", this.notifiedNumber) .attr("clickedWidgetLib", this.clickedWidgetLib) - .attr("lastGuidePopUpTime", this.lastGuidePopUpTime); + .attr("lastGuidePopUpTime", this.lastGuidePopUpTime) + .attr("historyCreatedReuses", this.historyCreatedReuses);; writer.end(); } diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java index a4fc73fbe7..ea5298cf26 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java @@ -20,6 +20,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.login.DesignerLoginHelper; import com.fr.design.login.DesignerLoginSource; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; import com.fr.design.mainframe.share.constants.ComponentType; import com.fr.design.mainframe.share.constants.ComponentTypes; import com.fr.design.mainframe.share.constants.DisplayDevice; @@ -36,6 +37,9 @@ import com.fr.form.share.bean.StyleThemeBean; import com.fr.form.share.constants.ShareComponentConstants; import com.fr.form.share.group.DefaultShareGroupManager; import com.fr.form.share.Group; +import com.fr.json.JSON; +import com.fr.json.JSONArray; +import com.fr.json.JSONFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.manage.PluginManager; @@ -622,6 +626,15 @@ public class ShareMainPane extends JPanel { provider.setDesignerVersion(ProductConstants.VERSION); provider.setVendor(loginLabel.getText()); provider.setFileName(provider.getNameWithID()); + provider.setVendorUid(DesignerEnvManager.getEnvManager().getDesignerLoginUid()); + provider.setCreateTime(System.currentTimeMillis()); + JSONArray historyCreatedReuses = JSONFactory.createJSON( + JSON.ARRAY, + ComponentReuseNotificationInfo.getInstance().getHistoryCreatedReuses() + ); + historyCreatedReuses.add(uuid); + ComponentReuseNotificationInfo.getInstance().setHistoryCreatedReuses(historyCreatedReuses.toString()); + DesignerEnvManager.getEnvManager().saveXMLFile(); if (upload) { provider.setSummary(content.getText());