forked from lxh/go-wxhelper
🐛 Fix a bug.
This commit is contained in:
parent
a3a9c607fe
commit
eb541a1b70
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user