添加日志确认近一月计算逻辑

This commit is contained in:
Your Name 2026-01-13 19:48:33 +08:00
parent e9a090963a
commit d2768d5264

View File

@ -436,7 +436,9 @@ public class AnalyticsService {
return now.minusWeeks(1);
case "month":
// 近一月:从当月1号开始计算
return LocalDateTime.of(LocalDate.now().withDayOfMonth(1), LocalTime.MIN);
LocalDateTime monthStart = LocalDateTime.of(LocalDate.now().withDayOfMonth(1), LocalTime.MIN);
log.info("计算近一月范围: dateRange={}, 从当月1号开始: {}", dateRange, monthStart);
return monthStart;
case "quarter":
return now.minusMonths(3);
case "year":