admin
2023-04-12 651f2856e9ae10aacbfb8327d967aacbb6d58333
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);
            //加载广告数据