| | |
| | | Map<String, String> map = configService.getConfigAsMap(); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | |
| | | if ("huawei".equalsIgnoreCase(channel) |
| | | && Integer.parseInt(version) >= Integer.parseInt(map.get("huawei_online_version"))) { |
| | | data.put("showAd", false); |
| | | } else |
| | | data.put("showAd", true); |
| | | //分渠道控制 |
| | | String onLiningInfo = map.get("onlining_channel_info"); |
| | | if (!StringUtil.isNullOrEmpty(onLiningInfo)) { |
| | | JSONObject obj = JSONObject.fromObject(onLiningInfo); |
| | | String v = obj.optString(channel.toLowerCase()); |
| | | if (!StringUtil.isNullOrEmpty(v) && Integer.parseInt(version) >= Integer.parseInt(v)) { |
| | | data.put("showAd", false); |
| | | } |
| | | } |
| | | |
| | | out.print(JsonUtil.loadTrueJson(data.toString())); |
| | | } |