This commit is contained in:
dute7liang
2024-01-20 22:07:35 +08:00
parent 3b6070428c
commit 96570448b5
12 changed files with 122 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ package com.ruoyi.cai.job;
import com.ruoyi.cai.service.RankService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.time.DayOfWeek;
@@ -16,6 +17,7 @@ public class RankJob {
@Autowired
private RankService rankService;
@Scheduled(cron = "0 1 0 * * ? ")
public void persistentDb() {
LocalDate date = LocalDateTime.now().plusDays(-1).toLocalDate();
try {