hotfix #92

Merged
李寻欢 merged 2 commits from hotfix into main 2024-07-28 00:59:16 +08:00
Showing only changes of commit 80a010680c - Show all commits

View File

@ -57,10 +57,11 @@ func ClearGroupUser() {
// @param days 需要清理的未活跃的天数 // @param days 需要清理的未活跃的天数
// @return members // @return members
func getNeedDeleteMembers(groupId string, days int) (members []entity.GroupUser) { func getNeedDeleteMembers(groupId string, days int) (members []entity.GroupUser) {
err := client.MySQL.Model(&entity.GroupUser{}).Where("group_id = ?", groupId). err := client.MySQL.Model(&entity.GroupUser{}).
Where("group_id = ?", groupId).
Where("wxid != ?", current.GetRobotInfo().WxId).
Where("is_member IS TRUE"). Where("is_member IS TRUE").
Where("DATEDIFF( NOW(), last_active ) >= ?", days). Where("DATEDIFF( NOW(), last_active ) >= ?", days).
Where("wxid != ?", current.GetRobotInfo().WxId).
Order("last_active DESC"). Order("last_active DESC").
Find(&members).Error Find(&members).Error
if err != nil { if err != nil {