| | |
| | | public void getConfig(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | LoggerUtil.getUserActiveLogger().info(UserActiveLogFactory.createAppSplash(new BaseLog(acceptData, ""))); |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | Map<String, String> map = configService.getConfigAsMap(detailSystem, acceptData.getVersion()); |
| | | Map<String, String> map = configService.getConfigAsMap(acceptData.getChildDetailSystem(), acceptData.getVersion()); |
| | | JSONObject data = new JSONObject(); |
| | | JSONObject ad = new JSONObject(); |
| | | JSONObject adNew = new JSONObject(); |
| | |
| | | adConfig = null; |
| | | adNew.put("splashHotStart", gson.toJson(adConfig)); |
| | | |
| | | //首页插屏 |
| | | adConfig = getAdShowType("home_ad_interstitial", acceptData.getChannel(), acceptData.getVersion(), map); |
| | | if (hiddenAll) |
| | | adConfig = null; |
| | | adNew.put("homeInterstitial", gson.toJson(adConfig)); |
| | | |
| | | //应用退出全屏 |
| | | adConfig = getAdShowType("ad_exit_app_fullvideo", acceptData.getChannel(), acceptData.getVersion(), map); |
| | | if (hiddenAll) |
| | | adConfig = null; |
| | | adNew.put("exitAppFullvideo", gson.toJson(adConfig)); |
| | | |
| | | |
| | | |
| | | //其他广告 |
| | | adConfig = getAdShowType("ad_other", acceptData.getChannel(), acceptData.getVersion(), map); |
| | | if (hiddenAll) |
| | | adConfig = null; |
| | | adNew.put("other", gson.toJson(adConfig)); |
| | | |
| | | //广告ID |
| | | if (!StringUtil.isNullOrEmpty(map.get("gdt_app_id"))) { |
| | | adNew.put("gdtAppId", map.get("gdt_app_id")); |
| | | } |
| | | |
| | | if (!StringUtil.isNullOrEmpty(map.get("csj_app_id"))) { |
| | | adNew.put("csjAppId", map.get("csj_app_id")); |
| | | } |
| | | |
| | | data.put("ad", ad); |
| | | data.put("adNew", adNew); |
| | |
| | | //获取购买记录链接 |
| | | data.put("buyRecordUrl", systemConfigService.getConfigValueByKeyCache("buyRecordUrl")); |
| | | |
| | | //联系我们 |
| | | data.put("contactUsLink", map.get("contact_us_link")); |
| | | //注销 |
| | | data.put("unRegisterLink", map.get("unregister_link")); |
| | | |
| | | |
| | | out.print(JsonUtil.loadTrueJson(data.toString())); |
| | | } |
| | | |