正在显示
2 个修改的文件
包含
5 行增加
和
1 行删除
@@ -62,6 +62,7 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface | @@ -62,6 +62,7 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface | ||
62 | userAuth := &domain.UserAuth{ | 62 | userAuth := &domain.UserAuth{ |
63 | UserId: user.Id, | 63 | UserId: user.Id, |
64 | CompanyId: user.CompanyId, | 64 | CompanyId: user.CompanyId, |
65 | + CompanyName: company.Name, | ||
65 | Phone: user.Account, | 66 | Phone: user.Account, |
66 | PlatformId: loginCommand.PlatformId, | 67 | PlatformId: loginCommand.PlatformId, |
67 | Name: user.Name, | 68 | Name: user.Name, |
@@ -134,6 +135,7 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[ | @@ -134,6 +135,7 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[ | ||
134 | userAuth := &domain.UserAuth{ | 135 | userAuth := &domain.UserAuth{ |
135 | UserId: user.Id, | 136 | UserId: user.Id, |
136 | CompanyId: user.CompanyId, | 137 | CompanyId: user.CompanyId, |
138 | + CompanyName: company.Name, | ||
137 | Phone: user.Account, | 139 | Phone: user.Account, |
138 | PlatformId: constant.IdPlatformUser, | 140 | PlatformId: constant.IdPlatformUser, |
139 | Name: user.Name, | 141 | Name: user.Name, |
@@ -2,14 +2,16 @@ package domain | @@ -2,14 +2,16 @@ package domain | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "errors" | 4 | "errors" |
5 | - "github.com/dgrijalva/jwt-go" | ||
6 | "time" | 5 | "time" |
6 | + | ||
7 | + "github.com/dgrijalva/jwt-go" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type UserAuth struct { | 10 | type UserAuth struct { |
10 | jwt.StandardClaims `json:"-"` | 11 | jwt.StandardClaims `json:"-"` |
11 | UserId int64 `json:"userId"` | 12 | UserId int64 `json:"userId"` |
12 | CompanyId int64 `json:"companyId"` | 13 | CompanyId int64 `json:"companyId"` |
14 | + CompanyName string `json:"companyName"` | ||
13 | Phone string `json:"phone"` | 15 | Phone string `json:"phone"` |
14 | PlatformId int `json:"platformId"` | 16 | PlatformId int `json:"platformId"` |
15 | Name string `json:"name"` | 17 | Name string `json:"name"` |
-
请 注册 或 登录 后发表评论