From b37275dba6b782bf3bb3817c4504f6cdef1bef7c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 18 三月 2021 18:38:51 +0800 Subject: [PATCH] APP首页顶部标签兼容 --- src/main/java/com/yeshi/buwan/funtv/FunTVUtil2.java | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/funtv/FunTVUtil2.java b/src/main/java/com/yeshi/buwan/funtv/FunTVUtil2.java index 1a6d025..94712ed 100644 --- a/src/main/java/com/yeshi/buwan/funtv/FunTVUtil2.java +++ b/src/main/java/com/yeshi/buwan/funtv/FunTVUtil2.java @@ -15,6 +15,7 @@ import com.yeshi.buwan.util.StringUtil; import com.yeshi.buwan.util.TimeUtil; import com.yeshi.buwan.util.video.VideoConstant; +import com.yeshi.buwan.vo.AcceptData; import org.hibernate.HibernateException; import org.hibernate.Session; import org.springframework.orm.hibernate4.HibernateCallback; @@ -51,10 +52,10 @@ vinfo.setTag(p.getName()); vinfo.setName(p.getName()); } else if ("鐢佃鍓�".equalsIgnoreCase(p.getChannel())) { - vinfo.setTag(pv.getNum()); + vinfo.setTag(pv.getNum() + ""); vinfo.setName(p.getName() + " 绗�" + pv.getNum() + "闆�"); } else { - vinfo.setTag(pv.getNum()); + vinfo.setTag(pv.getNum() + ""); vinfo.setName(p.getName()); } vinfo.setType("funtv"); @@ -92,8 +93,8 @@ Comparator<FunTVVideo2> cm = new Comparator<FunTVVideo2>() { public int compare(FunTVVideo2 o1, FunTVVideo2 o2) { - int t2 = Integer.parseInt(o2.getNum()); - int t1 = Integer.parseInt(o1.getNum()); + int t2 = o2.getNum(); + int t1 = o1.getNum(); return (t2 - t1);// 鍊掑簭鎺掑垪 } }; @@ -470,12 +471,28 @@ } - public static int getPlayType(FunTVVideo2 video2) { - if (video2.getStatus().equalsIgnoreCase("1")) - return PLAY_SDK; - else + /** + * 鑾峰彇鎾斁绫诲瀷 + * + * @param acceptData + * @param video2 + * @return + */ + public static int getPlayType(AcceptData acceptData, FunTVVideo2 video2) { + if (video2.getStatus().equalsIgnoreCase("1")) { + if (acceptData.getPlatform().equalsIgnoreCase("android") && acceptData.getVersion() >= 100) { + return PLAY_SDK; + } else { + return PLAY_HTML; + } + } else { return PLAY_NONE; + } } + public void update(int channelId, Date startTime, Date endTime) { + + } + } -- Gitblit v1.8.0