|
@@ -143,11 +143,10 @@ func (srv AuthService) GetAuthAccessToken(accessTokenCommand *command.AccessToke |
|
@@ -143,11 +143,10 @@ func (srv AuthService) GetAuthAccessToken(accessTokenCommand *command.AccessToke |
143
|
currentAccess.UpdatedTime = time.Now()
|
143
|
currentAccess.UpdatedTime = time.Now()
|
144
|
} else {
|
144
|
} else {
|
145
|
currentAccess = &domain.LoginAccess{
|
145
|
currentAccess = &domain.LoginAccess{
|
146
|
- UserBaseId: int64(userSeachResult.Users[0].UserBaseId),
|
|
|
147
|
- UserId: int64(userSeachResult.Users[0].UserId),
|
|
|
148
|
- Account: userSeachResult.Users[0].UserInfo.Phone,
|
|
|
149
|
- Platform: domain.LoginPlatformApp,
|
|
|
150
|
- //CompanyId: int64(userSeachResult.Users[0].Company.CompanyId),
|
146
|
+ UserBaseId: int64(userSeachResult.Users[0].UserBaseId),
|
|
|
147
|
+ UserId: int64(userSeachResult.Users[0].UserId),
|
|
|
148
|
+ Account: userSeachResult.Users[0].UserInfo.Phone,
|
|
|
149
|
+ Platform: domain.LoginPlatformApp,
|
151
|
OrganizationId: int64(userSeachResult.Users[0].Org.OrgId),
|
150
|
OrganizationId: int64(userSeachResult.Users[0].Org.OrgId),
|
152
|
AccessToken: "",
|
151
|
AccessToken: "",
|
153
|
RefreshToken: "",
|
152
|
RefreshToken: "",
|
|
@@ -168,6 +167,7 @@ loopUser1: |
|
@@ -168,6 +167,7 @@ loopUser1: |
168
|
for _, vv := range v.UserOrg {
|
167
|
for _, vv := range v.UserOrg {
|
169
|
if vv.OrgID == int(currentAccess.OrganizationId) {
|
168
|
if vv.OrgID == int(currentAccess.OrganizationId) {
|
170
|
currentOrgIsOK = true
|
169
|
currentOrgIsOK = true
|
|
|
170
|
+ currentAccess.UserId = int64(v.UserId)
|
171
|
break loopUser1
|
171
|
break loopUser1
|
172
|
}
|
172
|
}
|
173
|
}
|
173
|
}
|
|
@@ -180,6 +180,7 @@ loopUser1: |
|
@@ -180,6 +180,7 @@ loopUser1: |
180
|
for _, v := range userSeachResult.Users {
|
180
|
for _, v := range userSeachResult.Users {
|
181
|
currentAccess.CompanyId = int64(v.Company.CompanyId)
|
181
|
currentAccess.CompanyId = int64(v.Company.CompanyId)
|
182
|
for _, vv := range v.UserOrg {
|
182
|
for _, vv := range v.UserOrg {
|
|
|
183
|
+ currentAccess.UserId = int64(v.UserId)
|
183
|
currentAccess.OrganizationId = int64(vv.OrgID)
|
184
|
currentAccess.OrganizationId = int64(vv.OrgID)
|
184
|
currentOrgIsOK = true
|
185
|
currentOrgIsOK = true
|
185
|
break loopUser2
|
186
|
break loopUser2
|