rename service
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user