Skip to content

Commit

Permalink
GetCompanyMembersByStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanJey committed Sep 19, 2024
1 parent cc3c023 commit 70bbafd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/consts/api_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
ChangeMemberDeptWeightPath = "/org/dev/v1/companies/%s/depts/%s/members/%s/weight"

// GetCompanyMembersByStatusPath 根据状态获取企业成员列表
GetCompanyMembersByStatusPath = "/org/dev/v1/companies/%s/members/dept?status=%s&offset=%s&limit=%s"
GetCompanyMembersByStatusPath = " /org/dev/v1/companies/%s/members?status=%s&offset=%s&limit=%s&platform_id=%s"

///org/dev/v1/batch/companies/{company_id}/bind/thirdusers
BatchBindThirdMemberPath = "/org/dev/v1/batch/companies/%s/bind/thirdusers"
Expand Down
10 changes: 5 additions & 5 deletions user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ func (u *User) BatchBindThirdMember(operationID string, req api_req.BatchBindThi
resp := api_resp.CommonResp{}
err := http_client.Post(operationID, fmt.Sprintf(u.addr+consts.BatchBindThirdMemberPath, u.companyId), req, &resp, *u.sign)
if err != nil {
log.Error(operationID, "BatchBindThirdMemberPath err ", err.Error())
log.Error(operationID, "BatchBindThirdMember err ", err.Error())
return nil, err
}
return &resp, nil
}

func (u *User) GetCompanyMembersByStatus(operationID string, status, offset, limit string) (*api_resp.BatchGetCompanyMembersResp, error) {
resp := api_resp.BatchGetCompanyMembersResp{}
err := http_client.Get(operationID, fmt.Sprintf(u.addr+consts.GetCompanyMembersByStatusPath, u.companyId, status, offset, limit), nil, &resp, *u.sign)
err := http_client.Get(operationID, fmt.Sprintf(u.addr+consts.GetCompanyMembersByStatusPath, u.companyId, status, offset, limit, config.Config.WPS.PlatformId), nil, &resp, *u.sign)
if err != nil {
log.Error(operationID, "GetCompanyMembersByStatusPath err ", err.Error())
log.Error(operationID, "GetCompanyMembersByStatus err ", err.Error())
return nil, err
}
return &resp, nil
Expand All @@ -82,7 +82,7 @@ func (u *User) ChangeMemberDeptWeight(operationID, deptId, accountId string, req
resp := api_resp.CommonResp{}
err := http_client.Post(operationID, fmt.Sprintf(u.addr+consts.ChangeMemberDeptWeightPath, u.companyId, deptId, accountId), req, &resp, *u.sign)
if err != nil {
log.Error(operationID, "ChangeMemberDeptWeightPath err ", err.Error())
log.Error(operationID, "ChangeMemberDeptWeight err ", err.Error())
return nil, err
}
return &resp, nil
Expand All @@ -92,7 +92,7 @@ func (u *User) GetDepartmentMembers(operationID string, deptId, offset, limit st
getMembersResp := api_resp.GetDepartmentMembersResp{}
err := http_client.Get(operationID, fmt.Sprintf(u.addr+consts.GetDepartmentMembersPath, u.companyId, deptId, offset, limit), nil, &getMembersResp, *u.sign)
if err != nil {
log.Error(operationID, "GetDepartmentMembersPath err ", err.Error())
log.Error(operationID, "GetDepartmentMembers err ", err.Error())
return nil, err
}
return &getMembersResp, nil
Expand Down

0 comments on commit 70bbafd

Please sign in to comment.