| | |
| | | homeType.setHomeVideoList(tempHomeVideoList); |
| | | } |
| | | |
| | | try { |
| | | if (VersionUtil.isGraterThan387(acceptData.getPlatform(), acceptData.getVersion()) && dataKey.equalsIgnoreCase("recommend")) { |
| | | DetailSystemConfig adContent = configService.getConfigByKey("home_banner_ad_content", acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | DetailSystemConfig adPosition = configService.getConfigByKey("home_banner_ad_position", acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | if (adContent != null && adPosition != null) { |
| | | HomeType.HomeTypeAd ad = new Gson().fromJson(adContent.getValue(), HomeType.HomeTypeAd.class); |
| | | int adP = Integer.parseInt(adPosition.getValue()); |
| | | if (adP < homeTypeList.size() && adP > -1) { |
| | | HomeType homeType = new HomeType(); |
| | | homeType.setAd(ad); |
| | | if ("1".equalsIgnoreCase(page)) { |
| | | homeTypeList.add(adP, homeType); |
| | | } |
| | | count++; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | |
| | | JSONObject object = new JSONObject(); |
| | | JSONArray array = new JSONArray(); |
| | | for (int i = 0; i < homeTypeList.size(); i++) |