正在显示
3 个修改的文件
包含
36 行增加
和
25 行删除
| @@ -373,6 +373,12 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | @@ -373,6 +373,12 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | ||
| 373 | if err != nil { | 373 | if err != nil { |
| 374 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 374 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
| 375 | } | 375 | } |
| 376 | + resultOrg, err := creationUserGateway.OrgGet(allied_creation_user.ReqOrgGet{ | ||
| 377 | + OrgId: int(operator.OrgId), | ||
| 378 | + }) | ||
| 379 | + if err != nil { | ||
| 380 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
| 381 | + } | ||
| 376 | var user = map[string]interface{}{ | 382 | var user = map[string]interface{}{ |
| 377 | "userId": resultUser.UserId, | 383 | "userId": resultUser.UserId, |
| 378 | "userInfo": map[string]interface{}{ | 384 | "userInfo": map[string]interface{}{ |
| @@ -388,8 +394,14 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | @@ -388,8 +394,14 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | ||
| 388 | "companyName": resultUser.Company.CompanyName, | 394 | "companyName": resultUser.Company.CompanyName, |
| 389 | "logo": resultUser.Company.Log, | 395 | "logo": resultUser.Company.Log, |
| 390 | }, | 396 | }, |
| 391 | - "im": resultUser.IM, | ||
| 392 | - "org": resultUser.Org, | 397 | + "im": resultUser.IM, |
| 398 | + "org": map[string]interface{}{ | ||
| 399 | + "orgId": resultOrg.OrgID, | ||
| 400 | + "orgName": resultOrg.OrgName, | ||
| 401 | + "orgCode": resultOrg.OrgCode, | ||
| 402 | + "companyId": resultOrg.CompanyID, | ||
| 403 | + }, | ||
| 404 | + //"currentLoginOrg":resultUser.Org, | ||
| 393 | } | 405 | } |
| 394 | return user, nil | 406 | return user, nil |
| 395 | } | 407 | } |
| @@ -66,12 +66,12 @@ func (orgsService *OrgsService) OrgGet(orgGetQuery *query.OrgGetQuery) (interfac | @@ -66,12 +66,12 @@ func (orgsService *OrgsService) OrgGet(orgGetQuery *query.OrgGetQuery) (interfac | ||
| 66 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 66 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 67 | } | 67 | } |
| 68 | data := dto.OrgItem{ | 68 | data := dto.OrgItem{ |
| 69 | - OrgId: strconv.Itoa(result.Org.OrgID), | ||
| 70 | - OrgName: result.Org.OrgName, | ||
| 71 | - ParentId: strconv.Itoa(result.Org.ParentID), | ||
| 72 | - IsOrg: result.Org.IsOrg, | ||
| 73 | - OrgCode: result.Org.OrgCode, | ||
| 74 | - ParentDepName: result.Org.Ext.ParentDepName, | 69 | + OrgId: strconv.Itoa(result.OrgID), |
| 70 | + OrgName: result.OrgName, | ||
| 71 | + ParentId: strconv.Itoa(result.ParentID), | ||
| 72 | + IsOrg: result.IsOrg, | ||
| 73 | + OrgCode: result.OrgCode, | ||
| 74 | + ParentDepName: result.Ext.ParentDepName, | ||
| 75 | } | 75 | } |
| 76 | return data, nil | 76 | return data, nil |
| 77 | } | 77 | } |
| @@ -87,23 +87,22 @@ type ( | @@ -87,23 +87,22 @@ type ( | ||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | DataOrgGet struct { | 89 | DataOrgGet struct { |
| 90 | - Org struct { | ||
| 91 | - CompanyID int `json:"companyId"` | ||
| 92 | - Ext struct { | ||
| 93 | - DepName string `json:"depName"` | ||
| 94 | - OrgName string `json:"orgName"` | ||
| 95 | - ParentDepName string `json:"parentDepName"` | ||
| 96 | - Phone string `json:"phone"` | ||
| 97 | - UserName string `json:"userName"` | ||
| 98 | - } `json:"ext"` | ||
| 99 | - IsOrg int `json:"isOrg"` | ||
| 100 | - OrgCode string `json:"orgCode"` | ||
| 101 | - OrgID int `json:"orgId"` | ||
| 102 | - OrgName string `json:"orgName"` | ||
| 103 | - OrgStatus int `json:"orgStatus"` | ||
| 104 | - ParentID int `json:"parentId"` | ||
| 105 | - ParentPath string `json:"parentPath"` | ||
| 106 | - } `json:"org"` | 90 | + CompanyID int `json:"companyId"` |
| 91 | + Ext struct { | ||
| 92 | + DepName string `json:"depName"` | ||
| 93 | + OrgName string `json:"orgName"` | ||
| 94 | + ParentDepName string `json:"parentDepName"` | ||
| 95 | + Phone string `json:"phone"` | ||
| 96 | + UserName string `json:"userName"` | ||
| 97 | + } `json:"ext"` | ||
| 98 | + IsOrg int `json:"isOrg"` | ||
| 99 | + OrgCode string `json:"orgCode"` | ||
| 100 | + OrgID int `json:"orgId"` | ||
| 101 | + OrgName string `json:"orgName"` | ||
| 102 | + OrgStatus int `json:"orgStatus"` | ||
| 103 | + ParentID int `json:"parentId"` | ||
| 104 | + ParentPath string `json:"parentPath"` | ||
| 105 | + //} `json:"org"` | ||
| 107 | } | 106 | } |
| 108 | ) | 107 | ) |
| 109 | 108 |
-
请 注册 或 登录 后发表评论