Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用户退出群后 是用一个状态标记好 还是直接删除用户记录好 #147

Open
poembro opened this issue Aug 13, 2024 · 2 comments

Comments

@poembro
Copy link

poembro commented Aug 13, 2024

这个数据量小体验不到,数据量大了后是不是 状态标记更好

@poembro
Copy link
Author

poembro commented Aug 13, 2024

目前看项目是直接删除

// Delete 将用户从群组删除
func (d *groupUserRepo) Delete(groupId int64, userId int64) error {
	err := db.DB.Exec("delete from group_user where group_id = ? and user_id = ?",
		groupId, userId).Error
	if err != nil {
		return gerrors.WrapError(err)
	}
	return nil
}

@yowaimono
Copy link

你说的是伪删除吗?那不是看具体业务需求吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants