|
|
@ -1032,15 +1032,12 @@ 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[] versionArr = version.split("\\.");
|
|
|
|
String versionInt = version.replace(".","");
|
|
|
|
String[] newVersionArr = newAppVersion.split("\\.");
|
|
|
|
String newAppVersionInt = newAppVersion.replace(".","");
|
|
|
|
for (int i = 0; i < newVersionArr.length; i++) {
|
|
|
|
if (Integer.valueOf(versionInt)<Integer.valueOf(newAppVersionInt)){
|
|
|
|
if (Integer.valueOf(newVersionArr[i]) > Integer.valueOf(versionArr[i])) {
|
|
|
|
|
|
|
|
update_type = 1;
|
|
|
|
update_type = 1;
|
|
|
|
if (isUpdate) {
|
|
|
|
if(isUpdate){
|
|
|
|
update_type = 2;
|
|
|
|
update_type=2;
|
|
|
|
}
|
|
|
|
|
|
|
|
i = newVersionArr.length + 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|