From e4f39d38cfa65b52ba037aa9c96630375334fe0e Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Mon, 4 Nov 2024 18:07:41 +0800 Subject: [PATCH] staff extra --- qyweixin/app_hr.go | 5 +++++ 1 file changed, 5 insertions(+) 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"]))