admin
2020-08-14 aeab5e7844802a3324b8677ef3e43e9760c5f41e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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");
        return (StringUtils.isBlank(watchCount) ? "0" : (Integer.parseInt(watchCount)) / 10000 > 0 ? df.format(Integer.parseInt(watchCount) / 10000f) + "万" : watchCount);
    }
 
 
}