1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| package com.hanju.video.app.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 "";
| }
|
|
| }
|
|