admin
2021-12-24 b5e19564dcbf1b7ec12946209d74313479f9dfe1
src/main/java/com/yeshi/buwan/controller/api/VideoPlayController.java
@@ -7,6 +7,7 @@
import com.yeshi.buwan.domain.video.VideoWatchHistory;
import com.yeshi.buwan.domain.vip.VideoBuyRecord;
import com.yeshi.buwan.exception.ParamsException;
import com.yeshi.buwan.service.imp.DetailSystemConfigService;
import com.yeshi.buwan.videos.pptv.PPTVApiUtil;
import com.yeshi.buwan.videos.pptv.PPTVUtil;
import com.yeshi.buwan.videos.pptv.entity.PPTVProgram;
@@ -50,6 +51,9 @@
    @Resource
    private SystemConfigService systemConfigService;
    @Resource
    private DetailSystemConfigService detailSystemConfigService;
    @Resource
    private VIPService vipService;
@@ -276,7 +280,17 @@
        data.put("vipVideo", isVIPVideo);
        data.put("bought", isBought);
        data.put("canBuy", canBuy);
        data.put("showInterstitialAd", true);
        //华为是否在上线,在上线就不展示
        String onLiningVersionInfo = detailSystemConfigService.getConfigValueByKey("ad_hw_online_version_info", acceptData.getDetailSystem().getId(), acceptData.getVersion());
        net.sf.json.JSONObject onLiningVersionInfoJson = net.sf.json.JSONObject.fromObject(onLiningVersionInfo);
        int onLiningVersionCode = onLiningVersionInfoJson.optInt("versionCode");
        if ("huawei".equalsIgnoreCase(acceptData.getChannel()) && onLiningVersionCode <= acceptData.getVersion()) {
            data.put("showInterstitialAd", false);
        } else
            data.put("showInterstitialAd", true);
        data.put("showPreVideoAd", false);
        if (pptvSeries != null)
            data.put("title", pptvSeries.getName());