rename service

This commit is contained in:
2026-01-07 13:45:12 +01:00
parent c010f34479
commit ec0615f6df
3 changed files with 13 additions and 15 deletions
@@ -1,9 +1,8 @@
package SuMoC.backend.dev;
import SuMoC.backend.scheduling.ScheduledTasks;
import SuMoC.backend.trenddetection.services.UpdateStatsTablesService;
import SuMoC.backend.trenddetection.services.StatTableUpdateService;
import lombok.RequiredArgsConstructor;
import org.springframework.cglib.core.Local;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -19,15 +18,15 @@ public class DevController {
private final ScheduledTasks scheduledTasks;
private final UpdateStatsTablesService updateStatsTablesService;
private final StatTableUpdateService statTableUpdateService;
@PostMapping("/trigger-trend-calculation")
public void triggerTrendCalculation() {
LocalDate dayOfLastWeek = LocalDate.now().minusDays(7);
LocalDate day2WeeksAgo = LocalDate.now().minusDays(14);
LocalDate day3WeeksAgo = LocalDate.now().minusDays(21);
updateStatsTablesService.updateWeeklyMobilityStatsForAllUsers(dayOfLastWeek);
updateStatsTablesService.updateWeeklyMobilityStatsForAllUsers(day2WeeksAgo);
updateStatsTablesService.updateWeeklyMobilityStatsForAllUsers(day3WeeksAgo);
statTableUpdateService.updateWeeklyMobilityStatsForAllUsers(dayOfLastWeek);
statTableUpdateService.updateWeeklyMobilityStatsForAllUsers(day2WeeksAgo);
statTableUpdateService.updateWeeklyMobilityStatsForAllUsers(day3WeeksAgo);
}
}