master
wangning 7 years ago
parent 1c471262e4
commit 3b7ff0c889

@ -1032,15 +1032,12 @@ public class RetailAppServiceImp implements RetailAppService {
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate(clientType);
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent(clientType);
int update_type = 0;// 0:不更新 1更新 2强制更新
String[] versionArr = version.split("\\.");
String[] newVersionArr = newAppVersion.split("\\.");
for (int i = 0; i < newVersionArr.length; i++) {
if (Integer.valueOf(newVersionArr[i]) > Integer.valueOf(versionArr[i])) {
update_type = 1;
if (isUpdate) {
update_type = 2;
}
i = newVersionArr.length + 1;
String versionInt = version.replace(".","");
String newAppVersionInt = newAppVersion.replace(".","");
if (Integer.valueOf(versionInt)<Integer.valueOf(newAppVersionInt)){
update_type = 1;
if(isUpdate){
update_type=2;
}
}
JSONObject res = new JSONObject();

Loading…
Cancel
Save