| | |
| | | String platform = acceptData.getPlatform().toLowerCase(); |
| | | List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | //降级 |
| | | versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem()); |
| | | if(versionList!=null&&versionList.size()>0) { |
| | | version = versionList.get(versionList.size() - 1).getVersionCode(); |
| | | versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | } |
| | | } |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | list.clear(); |
| | | } else { |
| | | List<Long> sourceIdList = new ArrayList<>(); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getClass") |
| | | //TODO 改进版本过高的问题 |
| | | public void getClass(String callback, AcceptData acceptData, PrintWriter out) { |
| | | if (acceptData.getSystem() == null) |
| | | acceptData.setSystem(SystemEnum.blks); |
| | |
| | | String platform = acceptData.getPlatform().toLowerCase(); |
| | | List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | //降级 |
| | | versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem()); |
| | | if(versionList!=null&&versionList.size()>0) { |
| | | version = versionList.get(versionList.size() - 1).getVersionCode(); |
| | | versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | } |
| | | } |
| | | |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | resultList.clear(); |
| | | } else { |
| | | List<Long> sourceIdList = new ArrayList<>(); |