master
wangning 7 years ago
parent fecd1beb28
commit b257a7dfde

@ -958,10 +958,15 @@ 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强制更新
if (newAppVersion.compareToIgnoreCase(version) > 0) { String [] versionArr = version.split("\\.");
update_type = 1; String [] newVersionArr = newAppVersion.split("\\.");
if (isUpdate) { for (int i = 0; i < newVersionArr.length; i++) {
update_type = 2; if(Integer.valueOf(newVersionArr[i])>Integer.valueOf(versionArr[i])){
update_type = 1;
if (isUpdate) {
update_type = 2;
}
i=newVersionArr.length+1;
} }
} }
JSONObject res = new JSONObject(); JSONObject res = new JSONObject();

Loading…
Cancel
Save