1
0
forked from lxh/go-wxhelper

🐛 Fix a bug.

This commit is contained in:
李寻欢 2023-10-12 14:12:33 +08:00
parent af4b4d1b4f
commit e1e61fb518

View File

@ -120,7 +120,7 @@ func syncGroupUsers(tx *gorm.DB, gid string) {
"is_member": false, "is_member": false,
"leave_time": time.Now().Local(), "leave_time": time.Now().Local(),
} }
err = tx.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Where("wxid NOT IN (?)", wxIds).Updates(pm).Error err = tx.Model(&entity.GroupUser{}).Where("group_id = ?", gid).Where("is_member IS TRUE").Where("wxid NOT IN (?)", wxIds).Updates(pm).Error
if err != nil { if err != nil {
log.Printf("修改群成员状态失败: %s", err.Error()) log.Printf("修改群成员状态失败: %s", err.Error())
return return