This commit is contained in:
eson 2023-09-05 16:20:16 +08:00
parent d9de812728
commit 1e266c3a56

View File

@ -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