This commit is contained in:
2025-05-11 01:22:25 +08:00
parent d7f8e9c090
commit 1ecac19098
100 changed files with 1233 additions and 467 deletions

View File

@@ -27,7 +27,7 @@ func (l *CleanQueryDataHandler) ProcessTask(ctx context.Context, t *asynq.Task)
logx.Infof("%s - 开始执行查询数据清理任务", now)
// 计算3天前的时间
threeDaysAgo := time.Now().AddDate(0, 0, -3)
threeDaysAgo := time.Now().AddDate(0, 0, -30)
// 调用QueryModel删除3天前的数据
result, err := l.svcCtx.QueryModel.DeleteBefore(ctx, threeDaysAgo)