cauto %!s(int64=2) %!d(string=hai) anos
pai
achega
5d85f09589
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      internal/logic/tasklog/tasklog.go

+ 1 - 1
internal/logic/tasklog/tasklog.go

@@ -50,7 +50,7 @@ func (c *sTaskLog) ClearTasLog(ctx context.Context) error {
 	if err != nil {
 		return err
 	}
-	_, err = dao.Tasklog.Ctx(ctx).Where("create_at < DATE_SUB(NOW(),INTERVAL ? DAY)", config.Value).Delete()
+	_, err = dao.Tasklog.Ctx(ctx).Where("TO_DAYS(NOW())-TO_DAYS(create_at) = 1", config.Value).Delete()
 	if err != nil {
 		return err
 	}