From 1e266c3a5682dce3e39ea4ae0e0e5c63fa18a0e6 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 5 Sep 2023 16:20:16 +0800 Subject: [PATCH] fix --- server/auth/internal/logic/userresetpasswordlogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/auth/internal/logic/userresetpasswordlogic.go b/server/auth/internal/logic/userresetpasswordlogic.go index df2d3e90..4416aa8c 100644 --- a/server/auth/internal/logic/userresetpasswordlogic.go +++ b/server/auth/internal/logic/userresetpasswordlogic.go @@ -55,8 +55,8 @@ func (l *UserResetPasswordLogic) UserResetPassword(req *types.RequestUserResetPa } err = l.svcCtx.AllModels.FsUser.Transaction(l.ctx, func(tx *gorm.DB) error { - user := &gmodel.FsUser{Id: int64(rt.UserId)} - err := tx.Take(user).Error + user := &gmodel.FsUser{} + err := tx.Where("id = ?", user.Id).Take(user).Error if err != nil { logx.Error(err) return err