瀏覽代碼

Merge branch 'dev/v4.8.98_dx' of qmx/jy into release/v4.8.98

duxin 1 年之前
父節點
當前提交
bd6bf5c2bf
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/jfw/timetask/timetask.go

+ 2 - 2
src/jfw/timetask/timetask.go

@@ -52,9 +52,9 @@ func updateHotKeys() {
 	})
 	c.AddFunc("0 0 1 * * 1", func() { //每周1清理匿名用户日志表 保留最近30天
 		tm := time.Now().AddDate(0, 0, -qutil.IntAllDef(config.Sysconfig["anonymousTime"], 30)).Unix()
-		count := public.BaseMysql.CountBySql(fmt.Sprintf(`SELECT count(*) FROM anonymous_identity WHERE  creation_time < %d and refer = ''  and   fid is null`, tm))
+		count := public.BaseMysql.CountBySql(fmt.Sprintf(`SELECT count(*) FROM anonymous_identity WHERE  creation_time < %d and fid is null`, tm))
 		for i := 0; i < int(math.Ceil(float64(count)/float64(2000))); i++ {
-			public.BaseMysql.SelectBySql(fmt.Sprintf(`DELETE FROM anonymous_identity WHERE creation_time < %d and refer = '' AND fid IS NULL LIMIT 2000;`, tm))
+			public.BaseMysql.SelectBySql(fmt.Sprintf(`DELETE FROM anonymous_identity WHERE creation_time < %d AND fid IS NULL LIMIT 2000;`, tm))
 		}
 	})