食品采购接口优化

This commit is contained in:
2026-07-18 12:00:59 +08:00
parent a8e1379fd1
commit b3494db4ec
43 changed files with 530 additions and 86 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}
}