Browse Source

REPORT-40496 【10.0.10回归】设计器里的更新升级与平台的更新升级不一致

feature/big-screen
Lanlan 4 years ago
parent
commit
78473a8c34
  1. 6
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

6
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -544,7 +544,7 @@ public class UpdateMainDialog extends UIDialog {
private void showDownLoadInfo() {
//形如 Build#release-2018.07.31.03.03.52.80
String buildNO = downloadFileConfig.optString("buildNO");
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1));
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1));
String serverVersionNO = downloadFileConfig.optString("versionNO");
String currentVersionNO = ProductConstants.RELEASE_VERSION;
String[] serverVersionSplitStr = serverVersionNO.split("\\.");
@ -556,8 +556,8 @@ public class UpdateMainDialog extends UIDialog {
//形如 Build#release-2018.07.31.03.03.52.80
String currentNO = GeneralUtils.readBuildNO();
if (!".".equals(StableUtils.getInstallHome())) {
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.DAY) > 0) {
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) {
updateButton.setEnabled(true);
updateLabel.setVisible(true);
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO);

Loading…
Cancel
Save