Skip to content

Commit

Permalink
Merge pull request #257 from ArtisanCloud/dev/michaelhu
Browse files Browse the repository at this point in the history
feat(account): get info with accountId
  • Loading branch information
Matrix-X authored Sep 26, 2023
2 parents 2af0638 + 44a7c6c commit f5f9cb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/admin/crm/customerdomain/customer.api
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type (

Customer {
Id int64 `json:"id,optional"`
AccountId string `json:"accountId,optional"`
Name string `json:"name"`
Mobile string `json:"mobile"`
Email string `json:"email,optional"`
Expand Down
3 changes: 2 additions & 1 deletion internal/logic/web/customer/auth/getuserinfologic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"PowerX/internal/types"
"PowerX/internal/uc/powerx/customerdomain"
"context"
"fmt"

"github.com/zeromicro/go-zero/core/logx"
)
Expand All @@ -31,7 +32,7 @@ func (l *GetUserInfoLogic) GetUserInfo() (resp *types.GetUserInfoReplyToWeb, err
authCustomer := vAuthCustomer.(*customerdomain2.Customer)

customer := customer.TransformCustomerToReply(l.svcCtx, authCustomer)

customer.AccountId = fmt.Sprintf("%d", customer.Id)
return &types.GetUserInfoReplyToWeb{
Customer: customer,
}, nil
Expand Down
1 change: 1 addition & 0 deletions internal/types/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5f9cb8

Please sign in to comment.