|
@@ -60,12 +60,13 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface |
|
@@ -60,12 +60,13 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface |
60
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
60
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
61
|
}
|
61
|
}
|
62
|
userAuth := &domain.UserAuth{
|
62
|
userAuth := &domain.UserAuth{
|
63
|
- UserId: user.Id,
|
|
|
64
|
- CompanyId: user.CompanyId,
|
|
|
65
|
- Phone: user.Account,
|
|
|
66
|
- PlatformId: loginCommand.PlatformId,
|
|
|
67
|
- Name: user.Name,
|
|
|
68
|
- AdminType: user.AdminType,
|
63
|
+ UserId: user.Id,
|
|
|
64
|
+ CompanyId: user.CompanyId,
|
|
|
65
|
+ CompanyName: company.Name,
|
|
|
66
|
+ Phone: user.Account,
|
|
|
67
|
+ PlatformId: loginCommand.PlatformId,
|
|
|
68
|
+ Name: user.Name,
|
|
|
69
|
+ AdminType: user.AdminType,
|
69
|
}
|
70
|
}
|
70
|
accessToken, err := userAuth.CreateAccessToken()
|
71
|
accessToken, err := userAuth.CreateAccessToken()
|
71
|
if err != nil {
|
72
|
if err != nil {
|
|
@@ -132,12 +133,13 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[ |
|
@@ -132,12 +133,13 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[ |
132
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
133
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
133
|
}
|
134
|
}
|
134
|
userAuth := &domain.UserAuth{
|
135
|
userAuth := &domain.UserAuth{
|
135
|
- UserId: user.Id,
|
|
|
136
|
- CompanyId: user.CompanyId,
|
|
|
137
|
- Phone: user.Account,
|
|
|
138
|
- PlatformId: constant.IdPlatformUser,
|
|
|
139
|
- Name: user.Name,
|
|
|
140
|
- AdminType: user.AdminType,
|
136
|
+ UserId: user.Id,
|
|
|
137
|
+ CompanyId: user.CompanyId,
|
|
|
138
|
+ CompanyName: company.Name,
|
|
|
139
|
+ Phone: user.Account,
|
|
|
140
|
+ PlatformId: constant.IdPlatformUser,
|
|
|
141
|
+ Name: user.Name,
|
|
|
142
|
+ AdminType: user.AdminType,
|
141
|
}
|
143
|
}
|
142
|
accessToken, err := userAuth.CreateAccessToken()
|
144
|
accessToken, err := userAuth.CreateAccessToken()
|
143
|
if err != nil {
|
145
|
if err != nil {
|