Browse Source

Merge pull request #5325 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '0574e59ead8e606fd987d601977c592f5225a6dc':
  REPORT-54640 - 【10.0.19】设计器埋点重构剥离二期
feature/10.0
superman 3 years ago
parent
commit
fc749b3b82
  1. 14
      designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java
  2. 13
      designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java

14
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();
}

13
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());

Loading…
Cancel
Save