作者 tangxvhui

更新接口 获取登录用户信息

... ... @@ -62,6 +62,7 @@ func (service *AuthService) Login(loginCommand *command.LoginCommand) (interface
userAuth := &domain.UserAuth{
UserId: user.Id,
CompanyId: user.CompanyId,
CompanyName: company.Name,
Phone: user.Account,
PlatformId: loginCommand.PlatformId,
Name: user.Name,
... ... @@ -134,6 +135,7 @@ func (service *AuthService) MobileLogin(param *command.MobileLoginCommand) (map[
userAuth := &domain.UserAuth{
UserId: user.Id,
CompanyId: user.CompanyId,
CompanyName: company.Name,
Phone: user.Account,
PlatformId: constant.IdPlatformUser,
Name: user.Name,
... ...
... ... @@ -2,14 +2,16 @@ package domain
import (
"errors"
"github.com/dgrijalva/jwt-go"
"time"
"github.com/dgrijalva/jwt-go"
)
type UserAuth struct {
jwt.StandardClaims `json:"-"`
UserId int64 `json:"userId"`
CompanyId int64 `json:"companyId"`
CompanyName string `json:"companyName"`
Phone string `json:"phone"`
PlatformId int `json:"platformId"`
Name string `json:"name"`
... ...