调用 getAfterDay 传入后推的天数,就能获取到当前时间往后推N天的时间
public static Date asDate(LocalDateTime localDateTime) {
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
public static Date getAfterDay(int afterDay) {
LocalDateTime localDateTime = LocalDateTime.now().plusDays(afterDay);
return asDate(localDateTime);
}