|
|
@ -1112,17 +1112,21 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate(clientType);
|
|
|
|
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate(clientType);
|
|
|
|
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent(clientType);
|
|
|
|
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent(clientType);
|
|
|
|
int update_type = 0;// 0:不更新 1:更新 2:强制更新
|
|
|
|
int update_type = 0;// 0:不更新 1:更新 2:强制更新
|
|
|
|
String versionInt = version.replace(".", "");
|
|
|
|
String [] oldVersion = version.split("\\.");
|
|
|
|
String newAppVersionInt = newAppVersion.replace(".", "");
|
|
|
|
String [] newVersion = newAppVersion.split("\\.");
|
|
|
|
if (Integer.valueOf(versionInt) < Integer.valueOf(newAppVersionInt)) {
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
|
|
|
res.put("update_content", updateContent);
|
|
|
|
|
|
|
|
for (int i = 0; i < newVersion.length; i++) {
|
|
|
|
|
|
|
|
if(Integer.valueOf(newVersion[i])>Integer.valueOf(oldVersion[i])){
|
|
|
|
update_type = 1;
|
|
|
|
update_type = 1;
|
|
|
|
if (isUpdate) {
|
|
|
|
if (isUpdate) {
|
|
|
|
update_type = 2;
|
|
|
|
update_type = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
res.put("update_type", update_type);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
|
|
|
res.put("update_type", update_type);
|
|
|
|
res.put("update_type", update_type);
|
|
|
|
res.put("update_content", updateContent);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1428,4 +1432,5 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sourceStr;
|
|
|
|
return sourceStr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|