From eb541a1b7088444bb64e7f39ac051986b06abd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Sat, 7 Oct 2023 09:41:40 +0800 Subject: [PATCH] :bug: Fix a bug. --- tasks/water_group.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/water_group.go b/tasks/water_group.go index 49600c2f..92383c39 100644 --- a/tasks/water_group.go +++ b/tasks/water_group.go @@ -58,6 +58,7 @@ func dealYesterday(gid string) { Joins("LEFT JOIN t_group_user AS tgu ON tgu.wxid = tm.group_user AND tm.from_user = tgu.group_id"). Select("tm.group_user", "tgu.nickname", "count( 1 ) AS `count`"). Where("tm.from_user = ?", gid). + Where("tm.type < 10000"). Where("DATEDIFF(tm.create_at,NOW()) = -1"). Group("tm.group_user, tgu.nickname").Order("`count` DESC"). Limit(5).Find(&records).Error