|
@@ -1,6 +1,7 @@
|
|
|
package com.ruixuan.common.utils;
|
|
|
|
|
|
import java.lang.management.ManagementFactory;
|
|
|
+import java.sql.Timestamp;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
@@ -272,4 +273,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|
|
return timeStemp;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 时间戳转换为字符串
|
|
|
+ *
|
|
|
+ * @param time
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static String timestamptoStr(Long timestamp) {
|
|
|
+ Date date = new Date();
|
|
|
+ date.setTime(timestamp);
|
|
|
+ return DateFormatUtils.format(date, YYYYMMDD);
|
|
|
+ }
|
|
|
+
|
|
|
}
|