fix
This commit is contained in:
parent
461772efc3
commit
0977c8aed2
@ -136,14 +136,17 @@ type UserProfile struct {
|
|||||||
|
|
||||||
// 自平台的注册流程
|
// 自平台的注册流程
|
||||||
func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (*FsUser, error) {
|
func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (*FsUser, error) {
|
||||||
|
|
||||||
|
var err error
|
||||||
|
|
||||||
user := &FsUser{}
|
user := &FsUser{}
|
||||||
|
|
||||||
logcontent := ""
|
logcontent := ""
|
||||||
defer func() {
|
defer func() {
|
||||||
logx.Info("aaaa:", logcontent)
|
logx.Info("aaaa:", logcontent, err)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err := u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
err = u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
UserTx := tx.Model(user)
|
UserTx := tx.Model(user)
|
||||||
@ -204,7 +207,6 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||||||
})
|
})
|
||||||
|
|
||||||
logcontent += "end"
|
logcontent += "end"
|
||||||
logx.Error(err)
|
|
||||||
if err != nil && err != gorm.ErrRecordNotFound {
|
if err != nil && err != gorm.ErrRecordNotFound {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user