1
0
forked from lxh/go-wxhelper

🐛 Fix a bug.

This commit is contained in:
李寻欢 2023-10-07 09:41:40 +08:00
parent a3a9c607fe
commit eb541a1b70

View File

@ -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"). 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`"). Select("tm.group_user", "tgu.nickname", "count( 1 ) AS `count`").
Where("tm.from_user = ?", gid). Where("tm.from_user = ?", gid).
Where("tm.type < 10000").
Where("DATEDIFF(tm.create_at,NOW()) = -1"). Where("DATEDIFF(tm.create_at,NOW()) = -1").
Group("tm.group_user, tgu.nickname").Order("`count` DESC"). Group("tm.group_user, tgu.nickname").Order("`count` DESC").
Limit(5).Find(&records).Error Limit(5).Find(&records).Error