From 9a0f9c2270c1dcb34492263601079fef568fda9e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 16 Mar 2023 12:32:25 +0800 Subject: [PATCH] user update --- pkg/common/db/relation/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 734e22a50..83d75f713 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -27,7 +27,7 @@ func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[stri // 更新多个用户信息 非零值 func (u *UserGorm) Update(ctx context.Context, user *relation.UserModel) (err error) { - return utils.Wrap(u.db(ctx).Updates(&user).Error, "") + return utils.Wrap(u.db(ctx).Model(user).Updates(user).Error, "") } // 获取指定用户信息 不存在,也不返回错误