This commit is contained in:
77
2024-04-22 01:01:02 +08:00
parent 8651be4284
commit 0295814ddb
3 changed files with 61 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
@Component
@Slf4j
@@ -48,7 +49,7 @@ public class RankJob {
log.error("保存邀请 日榜失败", e);
}
DayOfWeek week = now.getDayOfWeek();
if (week.getValue() == 1) { // 天是周一 做一下持久化
if (week.getValue() == 1) { // 天是周一 做一下持久化
LocalDate lastWeekDate = now.plusDays(-7);
try {
rankService.saveWeekRank(lastWeekDate,1);