...
|
...
|
@@ -60,12 +60,13 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
|
|
}
|
|
|
userAuth := &domain.UserAuth{
|
|
|
UserId: user.Id,
|
|
|
CompanyId: user.CompanyId,
|
|
|
Phone: user.Account,
|
|
|
PlatformId: loginCommand.PlatformId,
|
|
|
Name: user.Name,
|
|
|
AdminType: user.AdminType,
|
|
|
UserId: user.Id,
|
|
|
CompanyId: user.CompanyId,
|
|
|
CompanyName: company.Name,
|
|
|
Phone: user.Account,
|
|
|
PlatformId: loginCommand.PlatformId,
|
|
|
Name: user.Name,
|
|
|
AdminType: user.AdminType,
|
|
|
}
|
|
|
accessToken, err := userAuth.CreateAccessToken()
|
|
|
if err != nil {
|
...
|
...
|
@@ -132,12 +133,13 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[ |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户被禁用")
|
|
|
}
|
|
|
userAuth := &domain.UserAuth{
|
|
|
UserId: user.Id,
|
|
|
CompanyId: user.CompanyId,
|
|
|
Phone: user.Account,
|
|
|
PlatformId: constant.IdPlatformUser,
|
|
|
Name: user.Name,
|
|
|
AdminType: user.AdminType,
|
|
|
UserId: user.Id,
|
|
|
CompanyId: user.CompanyId,
|
|
|
CompanyName: company.Name,
|
|
|
Phone: user.Account,
|
|
|
PlatformId: constant.IdPlatformUser,
|
|
|
Name: user.Name,
|
|
|
AdminType: user.AdminType,
|
|
|
}
|
|
|
accessToken, err := userAuth.CreateAccessToken()
|
|
|
if err != nil {
|
...
|
...
|
|