Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
5 个修改的文件
包含
34 行增加
和
2 行删除
@@ -657,10 +657,9 @@ loopUser1: | @@ -657,10 +657,9 @@ loopUser1: | ||
657 | 657 | ||
658 | //GetCompanyOrgsByUser 获取登录用户的公司组织列表 | 658 | //GetCompanyOrgsByUser 获取登录用户的公司组织列表 |
659 | func (svr AuthService) GetCompanyOrgsByUser(queryParam *query.GetCompanyOrgsByUserQuery) (interface{}, error) { | 659 | func (svr AuthService) GetCompanyOrgsByUser(queryParam *query.GetCompanyOrgsByUserQuery) (interface{}, error) { |
660 | - | ||
661 | creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(queryParam.Operator) | 660 | creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(queryParam.Operator) |
662 | result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ | 661 | result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ |
663 | - UserBaseId: queryParam.Operator.UserBaseId, | 662 | + Phone: queryParam.Operator.Phone, |
664 | UserType: domain.UserTypeEmployee, | 663 | UserType: domain.UserTypeEmployee, |
665 | PullRealTime: true, | 664 | PullRealTime: true, |
666 | }) | 665 | }) |
@@ -247,3 +247,26 @@ func (srv UserService) UpdateMenuFavorite(menuFavoriteCommand *command.MenuFavor | @@ -247,3 +247,26 @@ func (srv UserService) UpdateMenuFavorite(menuFavoriteCommand *command.MenuFavor | ||
247 | } | 247 | } |
248 | return result, nil | 248 | return result, nil |
249 | } | 249 | } |
250 | + | ||
251 | +// 共创组织列表 | ||
252 | +func (srv UserService) CooperationOrg(operator domain.Operator) (interface{}, error) { | ||
253 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(operator) | ||
254 | + orgs, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{ | ||
255 | + IsOrg: domain.IsOrgFlag, | ||
256 | + Limit: 50, | ||
257 | + }) | ||
258 | + if err != nil { | ||
259 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
260 | + } | ||
261 | + var ret = make([]interface{}, 0) | ||
262 | + for i := range orgs.Orgs { | ||
263 | + item := orgs.Orgs[i] | ||
264 | + ret = append(ret, map[string]interface{}{ | ||
265 | + "orgId": item.OrgID, | ||
266 | + "orgName": item.OrgName, | ||
267 | + }) | ||
268 | + } | ||
269 | + return map[string]interface{}{ | ||
270 | + "orgs": ret, | ||
271 | + }, nil | ||
272 | +} |
@@ -138,3 +138,10 @@ func (controller *UserController) UpdateMenuFavorite() { | @@ -138,3 +138,10 @@ func (controller *UserController) UpdateMenuFavorite() { | ||
138 | data, err := svr.UpdateMenuFavorite(cmd) | 138 | data, err := svr.UpdateMenuFavorite(cmd) |
139 | controller.Response(data, err) | 139 | controller.Response(data, err) |
140 | } | 140 | } |
141 | + | ||
142 | +func (controller *UserController) CooperationOrg() { | ||
143 | + svr := service.UserService{} | ||
144 | + operator := controller.GetOperator() | ||
145 | + data, err := svr.CooperationOrg(operator) | ||
146 | + controller.Response(data, err) | ||
147 | +} |
@@ -113,6 +113,7 @@ func CheckAccessToken2() web.FilterFunc { | @@ -113,6 +113,7 @@ func CheckAccessToken2() web.FilterFunc { | ||
113 | "/v1/app/cooperation-projects/person/search": "", | 113 | "/v1/app/cooperation-projects/person/search": "", |
114 | "/v1/common/dictionary/search": "", | 114 | "/v1/common/dictionary/search": "", |
115 | "/v1/common/app-sharing": "", | 115 | "/v1/common/app-sharing": "", |
116 | + "/v1/user/cooperation-org": "", | ||
116 | } | 117 | } |
117 | var err error | 118 | var err error |
118 | if filterUrl, err := url.Parse(ctx.Request.RequestURI); err == nil { | 119 | if filterUrl, err := url.Parse(ctx.Request.RequestURI); err == nil { |
@@ -24,6 +24,8 @@ func init() { | @@ -24,6 +24,8 @@ func init() { | ||
24 | web.Router("/v1/user/msgs", &mobile_client.UserController{}, "Post:Messages") | 24 | web.Router("/v1/user/msgs", &mobile_client.UserController{}, "Post:Messages") |
25 | web.Router("/v1/user/msgs/mark-read", &mobile_client.UserController{}, "Post:MessagesMarkRead") | 25 | web.Router("/v1/user/msgs/mark-read", &mobile_client.UserController{}, "Post:MessagesMarkRead") |
26 | 26 | ||
27 | + web.Router("/v1/user/cooperation-org", &mobile_client.UserController{}, "Post:CooperationOrg") | ||
28 | + | ||
27 | // 特殊处理 | 29 | // 特殊处理 |
28 | web.Router("/v1/app/orgs/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers") | 30 | web.Router("/v1/app/orgs/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers") |
29 | web.Router("/v1/web/orgs/department-users", &web_client.OrgController{}, "Post:DepartmentUsers") | 31 | web.Router("/v1/web/orgs/department-users", &web_client.OrgController{}, "Post:DepartmentUsers") |
-
请 注册 或 登录 后发表评论