diff --git a/qyweixin/app_hr.go b/qyweixin/app_hr.go index da49e65..0ecf2df 100644 --- a/qyweixin/app_hr.go +++ b/qyweixin/app_hr.go @@ -22,6 +22,7 @@ type AppHr struct { type StaffInfo struct { UserName string RealName string + Extra map[string]string Phone string StaffType string Idno string @@ -68,6 +69,10 @@ func (h *AppHr) GetStaffInfo(userId string) (*StaffInfo, error) { log.Errorf("GetUserInfo error:%s", err.Error()) return nil, err } + for k, v := range fieldMap { + staff.Extra[k] = h.getFieldValue(v) + } + staff.UserName = userId staff.RealName = userInfo.RealName staff.Salary = cast.ToFloat64(h.getFieldValue(fieldMap["20001"]))