admin
2020-10-14 b2fc802bf35143ed957a86d95e2de49934ea9ea5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.weikou.beibeivideo.util;
 
import com.lcjian.library.util.common.StringUtils;
 
import java.text.DecimalFormat;
 
public class VideoUtil {
 
    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 "";
    }
 
 
}