This commit is contained in:
eson 2023-09-22 00:18:04 +08:00
parent 7324aabbd6
commit 7aa4a57257

View File

@ -67,8 +67,8 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
err = txRes.
Where("guest_id = ? and source != 'temp'", guestId).
UpdateColumn("user_id", userId).Error
if err != nil && err != gorm.ErrRecordNotFound {
if err != nil && err != gorm.ErrRecordNotFound {
return err
}
@ -222,11 +222,12 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
}
err = txUserInfo.Where("module = 'profile' and user_id = ?", *uinfo.UserId).Take(nil).Error
// txUserInfo.Statement.Table
logx.Info(err, "*uinfo.UserId", *uinfo.UserId)
if err != nil {
if err == gorm.ErrRecordNotFound {
err = txUserInfo.Create(uinfo).Error
logx.Info(err, "*uinfo.UserId", *uinfo.UserId)
if err == gorm.ErrRecordNotFound {
return nil
}