Commit 672e7fe2400ae2d230d5f99dcc5ac6e311bc103f

Authored by chenhang4442024
1 parent ce51d4d3

定时检测超时任务

src/main/java/com/order/erp/common/utils/DateUtils.java
... ... @@ -567,4 +567,12 @@ public class DateUtils {
567 567 public static class Zone {
568 568 public static final String GMT8 = "GMT+8";
569 569 }
  570 +
  571 + /**
  572 + * 将yyyy-mm-dd HH:mm:ss转成yyyy-mm-dd(localDate)
  573 + * */
  574 + public static LocalDate parseDate(String dateStr) {
  575 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
  576 + return LocalDateTime.parse(dateStr, formatter).toLocalDate();
  577 + }
570 578 }
... ...