user update

This commit is contained in:
Gordon
2023-03-16 12:07:21 +08:00
parent 642743957e
commit e99753f188
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[stri
}
// 更新多个用户信息 非零值
func (u *UserGorm) Update(ctx context.Context, users []*relation.UserModel) (err error) {
return utils.Wrap(u.db(ctx).Updates(&users).Error, "")
func (u *UserGorm) Update(ctx context.Context, user *relation.UserModel) (err error) {
return utils.Wrap(u.db(ctx).Updates(&user).Error, "")
}
// 获取指定用户信息 不存在,也不返回错误