From 5e7b0ed4a154ad067cbcf4aa1a1c7cce32f9864c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 26 四月 2024 18:02:17 +0800 Subject: [PATCH] 唯品会链接解析升级 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java index a583ecb..d4fe2b3 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java @@ -721,20 +721,30 @@ @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); //鍔犺浇骞垮憡鏁版嵁 -- Gitblit v1.8.0