...
|
...
|
@@ -143,11 +143,10 @@ func (srv AuthService) GetAuthAccessToken(accessTokenCommand *command.AccessToke |
|
|
currentAccess.UpdatedTime = time.Now()
|
|
|
} else {
|
|
|
currentAccess = &domain.LoginAccess{
|
|
|
UserBaseId: int64(userSeachResult.Users[0].UserBaseId),
|
|
|
UserId: int64(userSeachResult.Users[0].UserId),
|
|
|
Account: userSeachResult.Users[0].UserInfo.Phone,
|
|
|
Platform: domain.LoginPlatformApp,
|
|
|
//CompanyId: int64(userSeachResult.Users[0].Company.CompanyId),
|
|
|
UserBaseId: int64(userSeachResult.Users[0].UserBaseId),
|
|
|
UserId: int64(userSeachResult.Users[0].UserId),
|
|
|
Account: userSeachResult.Users[0].UserInfo.Phone,
|
|
|
Platform: domain.LoginPlatformApp,
|
|
|
OrganizationId: int64(userSeachResult.Users[0].Org.OrgId),
|
|
|
AccessToken: "",
|
|
|
RefreshToken: "",
|
...
|
...
|
@@ -168,6 +167,7 @@ loopUser1: |
|
|
for _, vv := range v.UserOrg {
|
|
|
if vv.OrgID == int(currentAccess.OrganizationId) {
|
|
|
currentOrgIsOK = true
|
|
|
currentAccess.UserId = int64(v.UserId)
|
|
|
break loopUser1
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -180,6 +180,7 @@ loopUser1: |
|
|
for _, v := range userSeachResult.Users {
|
|
|
currentAccess.CompanyId = int64(v.Company.CompanyId)
|
|
|
for _, vv := range v.UserOrg {
|
|
|
currentAccess.UserId = int64(v.UserId)
|
|
|
currentAccess.OrganizationId = int64(vv.OrgID)
|
|
|
currentOrgIsOK = true
|
|
|
break loopUser2
|
...
|
...
|
|