From 4011b8d0b377af33e2bc435f7726329630d706cb Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 02 三月 2021 18:28:52 +0800 Subject: [PATCH] 搜索引擎接口更新 --- src/main/java/com/yeshi/buwan/job/AdJob.java | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/job/AdJob.java b/src/main/java/com/yeshi/buwan/job/AdJob.java index 30e74ce..df60b3a 100644 --- a/src/main/java/com/yeshi/buwan/job/AdJob.java +++ b/src/main/java/com/yeshi/buwan/job/AdJob.java @@ -54,6 +54,34 @@ return ReturnT.SUCCESS; } + //鎵撳紑vivo搴旂敤甯傚満骞垮憡 + + //鎵撳紑鍗庝负搴旂敤甯傚満鐨勫箍鍛� + @XxlJob("ad-vivo-check") + public ReturnT<String> openVIVOAd(String params) throws Exception { + JSONObject paramsJson = JSONObject.fromObject(params); + String appId = paramsJson.optString("appId"); + String systemId = paramsJson.optString("detailSystemId"); + //搴旂敤甯傚満鐨勭増鏈� + Integer onLineVersion = AppMarketUtil.getVIVOLatestVersionCode(appId); + if (onLineVersion == null) { + throw new Exception("搴旂敤甯傚満鐗堟湰鑾峰彇澶辫触锛�" + appId); + } + + //鑾峰彇姝e湪涓婄嚎鐨勭増鏈� + DetailSystem detailSystem = systemService.getDetailSystemById(systemId); + Map<String, String> map = configService.getConfigAsMap(detailSystem, 1); + //姝e湪涓婄嚎鐨勭増鏈� + String onLiningVersionCode = map.get("ad_click_download_version"); + //鏄惁宸茬粡涓婄嚎瀹屾垚 + if (onLineVersion >= Integer.parseInt(onLiningVersionCode)) { + //宸茬粡涓婄嚎,璁剧疆 + showAd("vivo", detailSystem, onLineVersion + 1); + } + return ReturnT.SUCCESS; + } + + /** * 鎵撳紑骞垮憡 * @@ -71,14 +99,18 @@ } config = configService.getConfigByKey("ad_play_video_pre", detailSystem, version); updateVersionConfig(channel, config, version); + config = configService.getConfigByKey("ad_exit_app", detailSystem, version); updateVersionConfig(channel, config, version); config = configService.getConfigByKey("ad_video_detail_full_video", detailSystem, version); updateVersionConfig(channel, config, version); + config = configService.getConfigByKey("ad_video_search", detailSystem, version); + updateVersionConfig(channel, config, version); + //鍒犻櫎缂撳瓨 - ehCacheManager.removeCacheByCacheName("configCache"); + ehCacheManager.clearCacheByCacheName("configCache"); } /** -- Gitblit v1.8.0