fix
This commit is contained in:
parent
7324aabbd6
commit
7aa4a57257
|
@ -67,8 +67,8 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
||||||
err = txRes.
|
err = txRes.
|
||||||
Where("guest_id = ? and source != 'temp'", guestId).
|
Where("guest_id = ? and source != 'temp'", guestId).
|
||||||
UpdateColumn("user_id", userId).Error
|
UpdateColumn("user_id", userId).Error
|
||||||
if err != nil && err != gorm.ErrRecordNotFound {
|
|
||||||
|
|
||||||
|
if err != nil && err != gorm.ErrRecordNotFound {
|
||||||
return err
|
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
|
err = txUserInfo.Where("module = 'profile' and user_id = ?", *uinfo.UserId).Take(nil).Error
|
||||||
// txUserInfo.Statement.Table
|
|
||||||
logx.Info(err, "*uinfo.UserId", *uinfo.UserId)
|
logx.Info(err, "*uinfo.UserId", *uinfo.UserId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
err = txUserInfo.Create(uinfo).Error
|
err = txUserInfo.Create(uinfo).Error
|
||||||
|
logx.Info(err, "*uinfo.UserId", *uinfo.UserId)
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user