switch (timeUnitEnum){
      case WEEK:
        condition.setTimeBegin(condition.getTime().with(DayOfWeek.MONDAY).with(LocalTime.MIN));
        condition.setTimeBegin(condition.getTime().with(DayOfWeek.SUNDAY).with(LocalTime.MAX));
        break;
      case MONTH:
        condition.setTimeBegin(condition.getTime().with(TemporalAdjusters.firstDayOfMonth()).with(LocalTime.MIN));
        condition.setTimeBegin(condition.getTime().with(TemporalAdjusters.lastDayOfMonth()).with(LocalTime.MAX));
        break;
      default:break;
    }

LocalDateTime 获取当前(年/月)第一天及最后一天 及 获取当天起始时间

LocalDateTime获取每周,每月,每年的第一天和最后一天,获取一周七天的日期,获取每月的所有日期


拾柒_
87 声望1 粉丝