作者 yangfu

登录修改

... ... @@ -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
... ...
... ... @@ -4,10 +4,10 @@ import "time"
type LoginAccess struct {
tableName string `pg:"login_access,alias:login_access"`
//
LoginAccessId int64 `pg:",pk"`
UserBaseId int64
UserId int64
//UserBaseId int64
//UserId int64
// 账号
Account string
// 对应平台
... ...