admin
2020-10-17 2f9e1cb327b1d58e4035b77bd903a452774ce66b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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");
        try {
            return (StringUtils.isBlank(watchCount) ? "0" : (Integer.parseInt(watchCount)) / 10000 > 0 ? df.format(Integer.parseInt(watchCount) / 10000f) + "万" : watchCount);
        } catch (Exception e) {
        }
        return "";
    }
 
 
}