| | |
| | | package com.weikou.beibeivideo.util; |
| | | |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.weikou.beibeivideo.entity.VideoDetailInfo; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class VideoUtil { |
| | | |
| | | public final static List<VideoDetailInfo> videoEpisodeList = new ArrayList<>(); |
| | | |
| | | |
| | | public static String getWatchCountShortName(String watchCount) { |
| | | DecimalFormat df = new DecimalFormat("###.0"); |
| | | return (StringUtils.isBlank(watchCount) ? "0" : (Integer.parseInt(watchCount)) / 10000 > 0 ? df.format(Integer.parseInt(watchCount) / 10000f) + "万" : watchCount); |
| | | try { |
| | | return (StringUtils.isBlank(watchCount) ? "0" : (Integer.parseInt(watchCount)) / 10000 > 0 ? df.format(Integer.parseInt(watchCount) / 10000f) + "万" : watchCount); |
| | | } catch (Exception e) { |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |