From 45ef0b8bc9f2c60fa282df04b83b6a1ea5612217 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Thu, 21 Sep 2023 23:39:15 +0800 Subject: [PATCH] fix --- model/gmodel/fs_user_logic.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index edb3fc2c..7cafa412 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -221,21 +221,17 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT Utime: &now, } - err = txUserInfo.Where("module = 'profile' and user_id = ?", uinfo.UserId).Take(nil).Error + err = txUserInfo.Where("module = 'profile' and user_id = ?", *uinfo.UserId).Take(nil).Error // txUserInfo.Statement.Table if err != nil { - if err == gorm.ErrRecordNotFound { - logx.Info(err) err = txUserInfo.Create(uinfo).Error - logx.Info(err) if err == gorm.ErrRecordNotFound { return nil } } } else { - logx.Info("找到user_id2") err = fssql.MetadataModulePATCH(txUserInfo, "profile", FsUserInfo{}, metadata, "user_id = ?", *uinfo.UserId) if err != nil { return err