| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() ==0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本过低!");
|
| | | }
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() ==0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本过低!");
|
| | | }
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() == 0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本过低!");
|
| | | }
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() == 0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本不能低于1.4.8");
|
| | | }
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
| | | * @param listVersion
|
| | | * @return
|
| | | */
|
| | | private String getCanPushVersions(int versionCode, List<String> listVersion) {
|
| | | private String getCanPushVersions(int versionCode, List<String> listVersion) throws PushException{
|
| | | List<AppVersionInfo> list = appVersionService.listByVersions(AppVersionInfo.PLATFORM_ANDROID, listVersion);
|
| | | String versions = "";
|
| | |
|
| | |
| | | versions += appVersion.getVersion() + ",";
|
| | | }
|
| | | }
|
| | | } else {
|
| | | throw new PushException(1, "推送的版本不存在,请核实版本信息");
|
| | | }
|
| | |
|
| | | if (versions.endsWith(",")) {
|
| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() ==0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本不能低于1.4.8");
|
| | | }
|
| | | |
| | | } else if (minVersionCode > 0){
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | if (appVersion == null || appVersion.trim().length() ==0) {
|
| | | throw new PushException(1, "小米推送失败,推送的版本不能低于1.5.1");
|
| | | }
|
| | | } else if (minVersionCode > 0){
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|