...
|
...
|
@@ -3,6 +3,7 @@ package service |
|
|
import (
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/application/auth/command"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/application/auth/dto"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/application/auth/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/application/factory"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
|
...
|
...
|
@@ -317,10 +318,18 @@ func (authService *AuthService) UserInfo(userInfoQuery *query.UserInfoQuery) (in |
|
|
defer func() {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
userBaseRepository, _, _ := factory.FastPgUserBase(transactionContext, 0)
|
|
|
userBase, err := userBaseRepository.FindOne(map[string]interface{}{"account": userInfoQuery.Account})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
ubDto := &dto.UserBaseDto{}
|
|
|
ubDto.LoadDto(userBase)
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
return ubDto, nil
|
|
|
}
|
|
|
|
|
|
func NewAuthService(options map[string]interface{}) *AuthService {
|
...
|
...
|
|