From ef4c5e72f7524e083bd5fd285e3772083f7d3011 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 11 Sep 2023 12:10:35 +0800 Subject: [PATCH] update --- app/db/db_user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/db/db_user.go b/app/db/db_user.go index 7392934..0d0afb6 100644 --- a/app/db/db_user.go +++ b/app/db/db_user.go @@ -84,9 +84,9 @@ func (userDb *UserDb) UpdateUser(m *model.User, columns ...string) (int64, error func (userDb *UserDb) DeleteUser(id interface{}) (int64, error) { if reflect.TypeOf(id).Kind() == reflect.Slice { - return userDb.Db.In("enterprise_id", id).Delete(model.User{}) + return userDb.Db.In("id", id).Delete(model.User{}) } else { - return userDb.Db.Where("enterprise_id = ?", id).Delete(model.User{}) + return userDb.Db.Where("id = ?", id).Delete(model.User{}) } }