Browse Source

REPORT-14865 更新日志推送=>调整代码

research/10.0
plough 6 years ago
parent
commit
a2b246c1dc
  1. 13
      designer-base/src/main/java/com/fr/design/onlineupdate/push/DesignerPushUpdateManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/onlineupdate/push/DesignerUpdateInfo.java

13
designer-base/src/main/java/com/fr/design/onlineupdate/push/DesignerPushUpdateManager.java

@ -5,12 +5,14 @@ import com.fr.design.mainframe.DesignerFrame;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.general.http.HttpClient;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import java.io.IOException;
/**
* Created by plough on 2019/4/8.
*/
@ -40,8 +42,13 @@ public class DesignerPushUpdateManager {
}
private String getFullLatestVersion() {
HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("jar10.update"));
return new JSONObject(hc.getResponseText()).optString("buildNO");
try {
String res = HttpToolbox.get(CloudCenter.getInstance().acquireUrlByKind("jar10.update"));
return new JSONObject(res).optString("buildNO");
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return StringUtils.EMPTY;
}
private String getVersionByFullNO(String fullNO) {

2
designer-base/src/main/java/com/fr/design/onlineupdate/push/DesignerUpdateInfo.java

@ -58,7 +58,7 @@ class DesignerUpdateInfo {
return latestVersion;
}
public String getLastIgnoredVersion() {
String getLastIgnoredVersion() {
return lastIgnoredVersion;
}

Loading…
Cancel
Save