YYC
2023-08-22 05e8b6c56a6c1743f2ca8a4d642c3c7ee3b63007
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
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.fzzy.push.gd2020;
 
import org.apache.commons.lang.time.DateFormatUtils;
 
import java.math.BigDecimal;
import java.util.Date;
 
/**
 * @Desc:
 * @author: andy.jia
 * @update-time: 2022/10/10 21:48
 */
public class GDUtils {
 
 
    public static String formatStr(String str) {
        return null == str ? "" : str;
    }
 
    public static String formatDate(Date date, String format) {
        if (null == date) return "";
 
        return DateFormatUtils.format(date, format);
    }
 
    public static String formatNum(Double num) {
        return null == num ? "" : num + "";
    }
 
    public static String formatNum(BigDecimal num) {
        return null == num ? "" : num + "";
    }
 
    public static String formatNum(Integer num) {
        return null == num ? "" : num + "";
    }
 
}