controactinfo

This commit is contained in:
jiangyong 2026-03-19 16:27:42 +08:00
parent ccc7894e50
commit 0820c34450
1 changed files with 3 additions and 4 deletions

View File

@ -59,10 +59,9 @@ func NewAppHr(cfg *AppConfig) *AppHr {
} }
func (h *AppHr) GetContactInfo(userId string) (*ContactInfo, error) { func (h *AppHr) GetContactInfo(userId string) (*ContactInfo, error) {
reqUrl := fmt.Sprintf("%s?access_token=%s", urlQyWeixinHrGetContactInfo, h.GetToken()) reqUrl := fmt.Sprintf("%s?access_token=%s&userid=%s", urlQyWeixinHrGetContactInfo, h.GetToken(), userId)
reqBody := make(map[string]interface{})
reqBody["userid"] = userId rspBody, err := util.HttpGet(reqUrl, nil)
rspBody, err := util.HttpPostJson(reqUrl, nil, []byte(goutil.EncodeJSON(reqBody)))
if err != nil { if err != nil {
return nil, err return nil, err
} }