| | |
| | | @RequestMapping(value = "getShowAd") |
| | | public void showAd(AcceptData acceptData, Long uid, PrintWriter out) { |
| | | String value = configService.getValue(ConfigKeyEnum.showSplashAd.getKey(), acceptData.getSystem()); |
| | | JSONObject configData = JSONObject.fromObject(value); |
| | | String channel = acceptData.getChannel().toLowerCase(); |
| | | if (configData.optString(channel) == null) { |
| | | channel = "qq"; |
| | | } |
| | | int version = configData.optInt(channel); |
| | | JSONObject data = new JSONObject(); |
| | | boolean show; |
| | | if (Integer.parseInt(acceptData.getVersion()) >= version) { |
| | | show = false; |
| | | } else { |
| | | show = true; |
| | | |
| | | boolean show = false; |
| | | try { |
| | | JSONObject configData = JSONObject.fromObject(value); |
| | | if (configData != null) { |
| | | String channel = acceptData.getChannel().toLowerCase(); |
| | | if (configData.optString(channel) == null) { |
| | | channel = "qq"; |
| | | } |
| | | int version = configData.optInt(channel); |
| | | |
| | | |
| | | if (Integer.parseInt(acceptData.getVersion()) >= version) { |
| | | show = false; |
| | | } else { |
| | | show = true; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | if (show) { |
| | | data.put("show", true); |
| | | //加载广告数据 |