java8通过LocaleDateTime获取上个月的第一天的0点0分0秒和最后一天的23点59分59秒

            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
            LocalDateTime now = LocalDateTime.now();
            LocalDateTime beginDateTime = now.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
            LocalDateTime endDateTime = now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);

            contractAmountSnapshotService.generateContractAmountSnapshot(institutionId, beginDateTime.format(dateTimeFormatter), endDateTime.format(dateTimeFormatter));
栏目