public static Date agoWeekByLocalDateTime(DayOfWeek weekIndex, int ago) {
int i = ago * -7;
// 用with是可以直接偏移过去,然后得到指定的日期
LocalDate localDate = LocalDate.now().plusDays(i).with(weekIndex);
Date from = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
return from;
}