食品采购接口优化
This commit is contained in:
@@ -271,4 +271,14 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
System.out.println(getStartOfDay(now).getTime());
|
||||
}
|
||||
|
||||
public static String getShortYearMonth(Date date) {
|
||||
String dateTime = DateFormatUtils.format(date, "yyMM");
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public static String getShortYearMonthDay(Date date) {
|
||||
String dateTime = DateFormatUtils.format(date, "yyMMdd");
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -694,4 +694,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||
.collect(Collectors.toList()); // 收集为List<Long>
|
||||
}
|
||||
|
||||
public static String formatNumTwo(int num) {
|
||||
return String.format("%02d", num);
|
||||
}
|
||||
|
||||
public static String formatNumThree(int num) {
|
||||
return String.format("%03d", num);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user