admin
2021-04-24 77e706cca33c97a4428879cc9a6f98aae085c142
src/main/java/com/yeshi/buwan/controller/parser/HomeParser.java
@@ -330,6 +330,28 @@
                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++)