Documentation
¶
Overview ¶
doc: https://ding-doc.dingtalk.com/doc#/serverapi2/potcn9b doc: https://ding-doc.dingtalk.com/doc#/serverapi2/ul33mm
Index ¶
- Constants
- Variables
- type AccessTokenContent
- type AccessTokenResp
- type AttendanceGetleavestatusResp
- type AttendanceGetsimplegroupsReq
- type AttendanceGetsimplegroupsResp
- type AttendanceGetusergroupResp
- type AttendanceGroupMemberListResp
- type AttendanceGroupMemberListbyidsResp
- type AttendanceGroupMemberUpdateReq
- type AttendanceGroupMemberUpdateResp
- type AttendanceGroupMemberuserListResp
- type AttendanceGroupMinimalismListResp
- type AttendanceGroupQueryResp
- type AttendanceGroupSearchResp
- type AttendanceListRecordReq
- type AttendanceListRecordResp
- type AttendanceListReq
- type AttendanceListResp
- type AttendanceListscheduleReq
- type AttendanceListscheduleResp
- type AttendanceScheduleListbydayReq
- type AttendanceScheduleListbydayResp
- type AttendanceScheduleListbyusersReq
- type AttendanceScheduleListbyusersResp
- type AttendanceScheduleResultListbyidsReq
- type AttendanceScheduleResultListbyidsResp
- type AttendanceShiftListReq
- type AttendanceShiftListResp
- type AttendanceShiftQueryReq
- type AttendanceShiftQueryResp
- type AttendanceShiftSearchReq
- type AttendanceShiftSearchResp
- type AuthScopesResp
- type Base
- type DepartmentCreateReq
- type DepartmentCreateResp
- type DepartmentDeleteResp
- type DepartmentGetResp
- type DepartmentListIdsResp
- type DepartmentListParentDeptsByDeptResp
- type DepartmentListParentDeptsResp
- type DepartmentListResp
- type DingtalkClient
- func (d *DingtalkClient) Init() error
- func (d *DingtalkClient) OapiAttendanceGetleavestatusRequest(useridList []string, startTime, endTime, offset, size int64) (AttendanceGetleavestatusResp, error)
- func (d *DingtalkClient) OapiAttendanceGetsimplegroupsRequest(offset int64, size int64) (AttendanceGetsimplegroupsResp, error)
- func (d *DingtalkClient) OapiAttendanceGetusergroupRequest(userid string) (AttendanceGetusergroupResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupMemberListRequest(opUserID string, cursor, groupID int64) (AttendanceGroupMemberListResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupMemberListbyidsRequest(opUserid string, memberIds []string, memberType, groupID int64) (AttendanceGroupMemberListbyidsResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupMemberUpdateRequest(reqData AttendanceGroupMemberUpdateReq) (AttendanceGroupMemberUpdateResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupMemberusersListRequest(opUserID string, cursor, groupID int64) (AttendanceGroupMemberuserListResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupMinimalismListRequest(opUserID string, cursor int64) (AttendanceGroupMinimalismListResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupQueryRequest(opUserID string, groupID int) (AttendanceGroupQueryResp, error)
- func (d *DingtalkClient) OapiAttendanceGroupSearchRequest(opUserID, groupName string) (AttendanceGroupSearchResp, error)
- func (d *DingtalkClient) OapiAttendanceListRecordRequest(userIDs []string, checkDateFrom string, checkDateTo string, isI18n bool) (AttendanceListRecordResp, error)
- func (d *DingtalkClient) OapiAttendanceListRequest(userIDList []string, workDateFrom, workDateTo string, offset, limit int64) (AttendanceListResp, error)
- func (d *DingtalkClient) OapiAttendanceListscheduleRequest(workDate string, offset, size int) (AttendanceListscheduleResp, error)
- func (d *DingtalkClient) OapiAttendanceScheduleListbydayRequest(opUserID, userID string, dateTime int64) (AttendanceScheduleListbydayResp, error)
- func (d *DingtalkClient) OapiAttendanceScheduleListbyusersRequest(opUserID, userIDs string, fromDateTime, toDateTime int64) (AttendanceScheduleListbyusersResp, error)
- func (d *DingtalkClient) OapiAttendanceScheduleResultListbyidsRequest(opUserID string, scheduleIDs string) (AttendanceScheduleResultListbyidsResp, error)
- func (d *DingtalkClient) OapiAttendanceShiftListRequest(opUserID string, cursor int64) (AttendanceShiftListResp, error)
- func (d *DingtalkClient) OapiAttendanceShiftQueryRequest(opUserID string, shiftID int64) (AttendanceShiftQueryResp, error)
- func (d *DingtalkClient) OapiAttendanceShiftSearchRequest(opUserID, shiftName string) (AttendanceShiftSearchResp, error)
- func (d *DingtalkClient) OapiAuthScopesRequest() (AuthScopesResp, error)
- func (d *DingtalkClient) OapiDepartmentCreateRequest(reqData DepartmentCreateReq) (DepartmentCreateResp, error)
- func (d *DingtalkClient) OapiDepartmentDeleteRequest(id string) (DepartmentDeleteResp, error)
- func (d *DingtalkClient) OapiDepartmentGetRequest(id string) (DepartmentGetResp, error)
- func (d *DingtalkClient) OapiDepartmentListIdsRequest(id string) (DepartmentListIdsResp, error)
- func (d *DingtalkClient) OapiDepartmentListParentDeptsByDeptRequest(id string) (DepartmentListParentDeptsByDeptResp, error)
- func (d *DingtalkClient) OapiDepartmentListParentDeptsRequest(userid string) (DepartmentListParentDeptsResp, error)
- func (d *DingtalkClient) OapiDepartmentListRequest(id string, fetchChild bool) (DepartmentListResp, error)
- func (d *DingtalkClient) OapiInactiveUserGetRequest(queryDate, offset, size string) (InactiveUserGetResp, error)
- func (d *DingtalkClient) OapiProcessGettodonumRequest(userID string) (ProcessGettodonumResp, error)
- func (d *DingtalkClient) OapiProcessListbyuseridRequest(userID string, offset, size int64) (ProcessListbyuseridResp, error)
- func (d *DingtalkClient) OapiProcessinstanceCreateRequest(reqData ProcessinstanceCreateReq) (ProcessinstanceCreateResp, error)
- func (d *DingtalkClient) OapiProcessinstanceCspaceInfoRequest(userID string) (ProcessinstanceCspaceInfoResp, error)
- func (d *DingtalkClient) OapiProcessinstanceGetRequest(processInstanceID string) (ProcessinstanceGetResp, error)
- func (d *DingtalkClient) OapiProcessinstanceListidsRequest(reqData ProcessinstanceListidsReq) (ProcessinstanceListidsResp, error)
- func (d *DingtalkClient) OapiRoleListRequest(size, offset int) (RoleListResp, error)
- func (d *DingtalkClient) OapiRoleSimplelistRequest(roleID string) (RoleSimplelistResp, error)
- func (d *DingtalkClient) OapiSmartworkHrmEmployeeListRequest(useridList string) (SmartworkHrmEmployeeListResp, error)
- func (d *DingtalkClient) OapiUserCreateRequest(userInfo UserCreateReq) (UserCreateResp, error)
- func (d *DingtalkClient) OapiUserDeleteRequest(userid string) (UserDeleteResp, error)
- func (d *DingtalkClient) OapiUserGetAdminRequest() (UserGetAdminResp, error)
- func (d *DingtalkClient) OapiUserGetAdminScopeRequest(userid string) (UserGetAdminScopeResp, error)
- func (d *DingtalkClient) OapiUserGetByMobileRequest(mobile string) (UserGetByMobileResp, error)
- func (d *DingtalkClient) OapiUserGetDeptMemberRequest(depID string) (UserGetDeptMemberResp, error)
- func (d *DingtalkClient) OapiUserGetOrgUserCountRequest(onlyActive string) (UserGetOrgUserCountResp, error)
- func (d *DingtalkClient) OapiUserGetRequest(userid string) (UserGetResp, error)
- func (d *DingtalkClient) OapiUserGetUseridByUnionidRequest(unionid string) (UserGetUseridByUnionidResp, error)
- func (d *DingtalkClient) OapiUserListbypageRequest(depID string, offset, size int64, order string) (UserListbypageResp, error)
- func (d *DingtalkClient) OapiUserSimplelistRequest(depID string, offset, size int64, order string) (UserSimplelistResp, error)
- func (d *DingtalkClient) OapiUserUpdateRequest(userInfo UserUpdateReq) (UserUpdateResp, error)
- func (d *DingtalkClient) RefreshToken() error
- type FormComponentValue
- type FormComponentValues
- type GroupMemberUpdateParam
- type InactiveUserGetResp
- type ProcessGettodonumReq
- type ProcessGettodonumResp
- type ProcessInstanceApproverVo
- type ProcessListbyuseridReq
- type ProcessListbyuseridResp
- type ProcessinstanceCreateReq
- type ProcessinstanceCreateResp
- type ProcessinstanceCspaceInfoReq
- type ProcessinstanceCspaceInfoResp
- type ProcessinstanceGetReq
- type ProcessinstanceGetResp
- type ProcessinstanceListidsReq
- type ProcessinstanceListidsResp
- type RequestData
- type RoleListRequest
- type RoleListResp
- type RoleSimplelistResp
- type SmartworkHrmEmployeeListReq
- type SmartworkHrmEmployeeListResp
- type Unmarshalable
- type UserCreateReq
- type UserCreateResp
- type UserDeleteResp
- type UserGetAdminResp
- type UserGetAdminScopeResp
- type UserGetByMobileResp
- type UserGetDeptMemberResp
- type UserGetOrgUserCountResp
- type UserGetResp
- type UserGetUseridByUnionidResp
- type UserListbypageResp
- type UserSimplelistResp
- type UserUpdateReq
- type UserUpdateResp
Constants ¶
const ( ExpiresIn = 7200 OapiURL = "oapi.dingtalk.com" TokenFile = ".token" )
基础设置
Variables ¶
var ( ErrEmptyToken = errors.New("can't refresh a empty token") ErrTokenAvaliable = errors.New("token is avaliable") )
错误集合
var (
ErrEmptyParams = errors.New("params is require")
)
Functions ¶
This section is empty.
Types ¶
type AccessTokenContent ¶
type AccessTokenResp ¶
type AccessTokenResp struct {
Base
AccessTokenContent
}
type AttendanceGetleavestatusResp ¶
type AttendanceGetleavestatusResp struct {
Base
Result struct {
HasMore bool `json:"has_more"`
LeaveStatus []struct {
DurationUnit string `json:"duration_unit"`
DurationPercent int `json:"duration_percent"`
EndTime int64 `json:"end_time"`
StartTime int64 `json:"start_time"`
Userid string `json:"userid"`
} `json:"leave_status"`
} `json:"result"`
Success bool `json:"success"`
}
type AttendanceGetsimplegroupsResp ¶
type AttendanceGetsimplegroupsResp struct {
Base
Result struct {
HasMore bool `json:"has_more"`
Groups []struct {
GroupID int `json:"group_id"`
IsDefault bool `json:"is_default"`
GroupName string `json:"group_name"`
SelectedClass []struct {
Setting struct {
ClassSettingID int `json:"class_setting_id"`
RestBeginTime struct {
CheckTime string `json:"check_time"`
} `json:"rest_begin_time"`
PermitLateMinutes int `json:"permit_late_minutes"`
WorkTimeMinutes int `json:"work_time_minutes"`
RestEndTime struct {
CheckTime string `json:"check_time"`
} `json:"rest_end_time"`
AbsenteeismLateMinutes int `json:"absenteeism_late_minutes"`
SeriousLateMinutes int `json:"serious_late_minutes"`
IsOffDutyFreeCheck string `json:"is_off_duty_free_check"`
} `json:"setting"`
ClassID int `json:"class_id"`
Sections []struct {
Times []struct {
CheckTime string `json:"check_time"`
CheckType string `json:"check_type"`
Across int `json:"across"`
} `json:"times"`
} `json:"sections"`
ClassName string `json:"class_name"`
} `json:"selected_class"`
Type string `json:"type"`
MemberCount int `json:"member_count"`
DefaultClassID int `json:"default_class_id"`
WorkDayList []string `json:"work_day_list"`
ClassesList []string `json:"classes_list"`
ManagerList []string `json:"manager_list"`
DeptNameList []string `json:"dept_name_list"`
} `json:"groups"`
} `json:"result"`
}
type AttendanceGetusergroupResp ¶
type AttendanceGetusergroupResp struct {
Base
Result struct {
Name string `json:"name"`
GroupID int `json:"group_id"`
Type string `json:"type"`
Classes []struct {
ClassID int `json:"class_id"`
Name string `json:"name"`
Sections []struct {
Times []struct {
CheckTime string `json:"check_time"`
CheckType string `json:"check_type"`
Across int `json:"across"`
BeginMin int `json:"begin_min"`
EndMin int `json:"end_min"`
} `json:"times"`
} `json:"sections"`
Setting struct {
RestBeginTime struct {
Across int `json:"across"`
BeginMin int `json:"begin_min"`
EndMin int `json:"end_min"`
CheckTime string `json:"check_time"`
CheckType string `json:"check_type"`
} `json:"rest_begin_time"`
RestEndTime struct {
Across int `json:"across"`
BeginMin int `json:"begin_min"`
EndMin int `json:"end_min"`
CheckTime string `json:"check_time"`
CheckType string `json:"check_type"`
} `json:"rest_end_time"`
} `json:"setting"`
} `json:"classes"`
} `json:"result"`
}
type AttendanceGroupMemberUpdateReq ¶
type AttendanceGroupMemberUpdateReq struct {
OpUserID string `json:"op_user_id"`
ScheduleFlag int64 `json:"schedule_flag"`
GroupID int64 `json:"group_id"`
UpdateParam GroupMemberUpdateParam `json:"Object"`
}
type AttendanceGroupMemberUpdateResp ¶
type AttendanceGroupMemberUpdateResp struct {
Base
}
type AttendanceGroupQueryResp ¶
type AttendanceGroupQueryResp struct {
Result struct {
Name string `json:"name"`
ID int `json:"id"`
Wifis []string `json:"wifis"`
AddressList []string `json:"address_list"`
WorkDayList []int `json:"work_day_list"`
MemberCount int `json:"member_count"`
Type string `json:"type"`
URL string `json:"url"`
ManagerList string `json:"manager_list"`
} `json:"result"`
Success bool `json:"success"`
Base
}
type AttendanceListRecordReq ¶
type AttendanceListRecordResp ¶
type AttendanceListRecordResp struct {
Base
Recordresult []struct {
// 是否合法,当timeResult和locationResult都为Normal时,该值为Y;否则为N
IsLegal string `json:"isLegal"`
// 排班打卡时间
BaseCheckTime int64 `json:"baseCheckTime"`
// 唯一标识ID
ID int `json:"id"`
// 用户打卡地址
UserAddress string `json:"userAddress"`
// 用户ID
UserID string `json:"userId"`
// 考勤类型,OnDuty:上班 OffDuty:下班
CheckType string `json:"checkType"`
// 时间结果,Normal:正常; Early:早退; Late:迟到; SeriousLate:严重迟到; Absenteeism:旷工迟到; NotSigned:未打卡
TimeResult string `json:"timeResult"`
// 设备id
DeviceID string `json:"deviceId"`
// 企业ID
CorpID string `json:"corpId"`
// 数据来源,ATM:考勤机;BEACON:IBeacon;DING_ATM:钉钉考勤机;USER:用户打卡;BOSS:老板改签;APPROVE:审批系统;SYSTEM:考勤系统;AUTO_CHECK:自动打卡
SourceType string `json:"sourceType"`
// 工作日
WorkDate int64 `json:"workDate"`
// 排班打卡时间
PlanCheckTime int64 `json:"planCheckTime"`
// 定位方法
LocationMethod string `json:"locationMethod"`
// 位置结果,Normal:范围内 Outside:范围外,外勤打卡时为这个值
LocationResult string `json:"locationResult"`
// 用户打卡经度
UserLongitude float64 `json:"userLongitude"`
// 排班ID
PlanID int64 `json:"planId"`
// 考勤组ID
GroupID int64 `json:"groupId"`
// 用户打卡定位精度
UserAccuracy float64 `json:"userAccuracy"`
// 实际打卡时间
UserCheckTime int64 `json:"userCheckTime"`
// 用户打卡纬度
UserLatitude float64 `json:"userLatitude"`
// 关联的审批实例id,当该字段非空时,表示打卡记录与请假、加班等审批有关。可以与获取单个审批数据配合使用
ProcInstID string `json:"procInstId"`
} `json:"recordresult"`
}
type AttendanceListReq ¶
type AttendanceListResp ¶
type AttendanceListResp struct {
Base
HasMore bool `json:"hasMore"`
Recordresult []struct {
// 计算迟到和早退,基准时间
BaseCheckTime int64 `json:"baseCheckTime"`
// 考勤类型 OnDuty:上班 OffDuty:下班
CheckType string `json:"checkType"`
// 企业ID
CorpID string `json:"corpId"`
// 考勤组ID
GroupID int `json:"groupId"`
// 唯一标识ID
ID int `json:"id"`
// 位置结果 Normal:范围内;Outside:范围外;NotSigned:未打卡
LocationResult string `json:"locationResult"`
// 排班ID
PlanID int `json:"planId"`
// 打卡记录ID
RecordID int `json:"recordId,omitempty"`
// 时间结果 Normal:正常; Early:早退; Late:迟到; SeriousLate:严重迟到; Absenteeism:旷工迟到; NotSigned:未打卡
TimeResult string `json:"timeResult"`
// 实际打卡时间, 用户打卡时间的毫秒数
UserCheckTime int64 `json:"userCheckTime"`
// 用户ID
UserID string `json:"userId"`
// 工作日
WorkDate int64 `json:"workDate"`
// 关联的审批实例id,当该字段非空时,表示打卡记录与请假、加班等审批有关。可以与获取单个审批数据配合使用
ProcInstID string `json:"procInstId"`
} `json:"recordresult"`
}
type AttendanceListscheduleResp ¶
type AttendanceListscheduleResp struct {
Result struct {
Schedules []struct {
PlanID int `json:"plan_id"` // 排班id
CheckType string `json:"check_type"` // 打卡类型,OnDuty表示上班打卡,OffDuty表示下班打卡
ApproveID int `json:"approve_id"` // 审批id,结果集中没有的话表示没有审批单
Userid string `json:"userid"` // userId
ClassID int `json:"class_id"` // 考勤班次id
ClassSettingID int `json:"class_setting_id"` // 班次配置id,结果集中没有的话表示使用全局班次配置
PlanCheckTime string `json:"plan_check_time"` // 打卡时间
GroupID int `json:"group_id"` // 调整后的打卡时间
ChangedCheckTime string `json:"changed_check_time"` // 考勤组id
} `json:"schedules"` // 排班列表
HasMore bool `json:"has_more"` // 分页用,表示是否还有下一页
} `json:"result"`
Base
}
type AttendanceScheduleListbydayResp ¶
type AttendanceScheduleListbydayResp struct {
Result []struct {
// 卡点类型 OnDuty:上班 OffDuty:下班
CheckType string `json:"check_type"`
// 最后更新时间
GmtModified string `json:"gmt_modified"`
// 计划打卡时间
PlanCheckTime string `json:"plan_check_time"`
// 企业id
CorpID string `json:"corp_id"`
// 打卡时间
CheckDateTime string `json:"check_date_time"`
// 允许迟到早退等规则调整后的计划打卡时间
BaseCheckTime string `json:"base_check_time"`
// 考勤组id
GroupID int `json:"group_id"`
// 班次名称
ClassName string `json:"class_name"`
// 创建时间
GmtCreate string `json:"gmt_create"`
// 员工id
UserID string `json:"userid"`
// 排班绑定的假勤审批类型 1:加班,2:出差,3:请假
ApproveBizType int `json:"approve_biz_type"`
// 排班绑定的审批单id
ApproveID int `json:"approve_id"`
// 排班关联的班次设置id
ClassSettingID int `json:"class_setting_id"`
// 排班绑定的假勤审批单名称
ApproveTagName string `json:"approve_tag_name"`
// 扩展字段
Features string `json:"features"`
// 排班绑定的班次id,该字段为空或者小于0时代表当天未排班
ClassID int `json:"class_id"`
// 卡点状态 Init:未打卡 Checked:已打卡 Timeout:缺卡
CheckStatus string `json:"check_status"`
// 工作日,代表具体哪一天的排班
WorkDate string `json:"work_date"`
// 结束打卡时间
CheckEndTime string `json:"check_end_time"`
// 开始打卡时间
IsRest string `json:"is_rest"`
// Y:当天排休
CheckBeginTime string `json:"check_begin_time"`
// 排班id
ID int `json:"id"`
ShiftID int64 `json:"shift_id"`
ShiftName string `json:"shift_name"`
} `json:"result"`
Success bool `json:"success"`
Base
}
type AttendanceScheduleListbyusersResp ¶
type AttendanceScheduleListbyusersResp struct {
Base
RequestID string `json:"request_id"`
Result []struct {
CheckType string `json:"check_type,omitempty"`
GroupID int `json:"group_id"`
ID int64 `json:"id"`
IsRest string `json:"is_rest"`
PlanCheckTime string `json:"plan_check_time,omitempty"`
ShiftID int `json:"shift_id,omitempty"`
ShiftVersion int `json:"shift_version,omitempty"`
Userid string `json:"userid"`
WorkDate string `json:"work_date"`
} `json:"result"`
Success bool `json:"success"`
}
type AttendanceScheduleResultListbyidsResp ¶
type AttendanceScheduleResultListbyidsResp struct {
Result []struct {
CheckType string `json:"check_type"`
GmtModified string `json:"gmt_modified"`
PlanCheckTime string `json:"plan_check_time"`
CorpID string `json:"corp_id"`
BaseCheckTime string `json:"base_check_time"`
GroupID int `json:"group_id"`
GmtCreate string `json:"gmt_create"`
UserID string `json:"user_id"`
WorkDate string `json:"work_date"`
ID int64 `json:"id"`
LocationResult string `json:"location_result"`
IsLegal string `json:"is_legal"`
TimeResult string `json:"time_result"`
RecordID int `json:"record_id"`
UserCheckTime string `json:"user_check_time"`
ScheduleID int64 `json:"schedule_id"`
} `json:"result"`
Success bool `json:"success"`
Base
}
type AttendanceShiftListReq ¶
type AttendanceShiftListResp ¶
type AttendanceShiftQueryReq ¶
type AttendanceShiftQueryResp ¶
type AttendanceShiftQueryResp struct {
Result struct {
ShiftGroupName string `json:"shift_group_name"`
CorpID string `json:"corp_id"`
ShiftSetting struct {
ShiftID int `json:"shift_id"`
GmtModified string `json:"gmt_modified"`
CorpID string `json:"corp_id"`
IsDeleted string `json:"is_deleted"`
WorkTimeMinutes int `json:"work_time_minutes"`
ID int `json:"id"`
AttendDays string `json:"attend_days"`
GmtCreate string `json:"gmt_create"`
} `json:"shift_setting"`
Name string `json:"name"`
ID int `json:"id"`
Sections []struct {
Punches []struct {
CheckType string `json:"check_type"`
EndMin int `json:"end_min"`
Across int `json:"across"`
CheckTime string `json:"check_time"`
PermitMinutes int `json:"permit_minutes"`
FreeCheck bool `json:"free_check"`
ID int `json:"id"`
BeginMin int `json:"begin_min"`
} `json:"punches"`
WorkTimeMinutes int `json:"work_time_minutes"`
Rests []struct {
CheckType string `json:"check_type"`
Across int `json:"across"`
CheckTime string `json:"check_time"`
ID int `json:"id"`
} `json:"rests"`
ID int `json:"id"`
} `json:"sections"`
ShiftGroupID int `json:"shift_group_id"`
} `json:"result"`
Base
}
type AuthScopesResp ¶
type AuthScopesResp struct {
Base
AuthUserField []string `json:"auth_user_field"`
AuthOrgScopes struct {
AuthedDept []int `json:"authed_dept"`
AuthedUser []string `json:"authed_user"`
} `json:"auth_org_scopes"`
}
AuthScopesResp 权限范围响应
type DepartmentCreateReq ¶
type DepartmentCreateReq struct {
Name string `json:"name"` // 部门名称,长度限制为1~64个字符,不允许包含字符‘-’‘,’以及‘,’
Parentid string `json:"parentid"` // 父部门id,根部门id为1
Order string `json:"order"` // 在父部门中的排序值,order值小的排序靠前
CreateDeptGroup bool `json:"createDeptGroup"` // 是否创建一个关联此部门的企业群,默认为false
DeptHiding bool `json:"deptHiding"` // 是否隐藏部门,true表示隐藏 false表示显示
DeptPermits string `json:"deptPermits"` // 可以查看指定隐藏部门的其他部门列表,如果部门隐藏,则此值生效,取值为其他的部门id组成的字符串,使用“\|”符号进行分割。总数不能超过200
UserPermits string `json:"userPermits"` // 可以查看指定隐藏部门的其他人员列表,如果部门隐藏,则此值生效,取值为其他的人员userid组成的字符串,使用“\|”符号进行分割。总数不能超过200
OuterDept bool `json:"outerDept"` // 限制本部门成员查看通讯录,限制开启后,本部门成员只能看到限定范围内的通讯录。true表示限制开启
OuterPermitDepts string `json:"outerPermitDepts"` // outerDept为true时,可以配置额外可见部门,值为部门id组成的的字符串,使用“\|”符号进行分割。总数不能超过200
OuterPermitUsers string `json:"outerPermitUsers"` // outerDept为true时,可以配置额外可见人员,值为userid组成的的字符串,使用“\|”符号进行分割。总数不能超过200
SourceIdentifier string `json:"sourceIdentifier"` // 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射
Ext string `json:"ext"` // 部门自定义字段,格式为文本类型的Json格式
}
DepartmentCreateReq 部门创建请求
type DepartmentCreateResp ¶
DepartmentCreateResp 部门创建响应
type DepartmentGetResp ¶
type DepartmentGetResp struct {
Base
ID int `json:"id"`
Name string `json:"name"`
Order int `json:"order"`
Parentid int `json:"parentid"`
CreateDeptGroup bool `json:"createDeptGroup"`
AutoAddUser bool `json:"autoAddUser"`
DeptHiding bool `json:"deptHiding"`
DeptPermits string `json:"deptPermits"`
UserPermits string `json:"userPermits"`
OuterDept bool `json:"outerDept"`
OuterPermitDepts string `json:"outerPermitDepts"`
OuterPermitUsers string `json:"outerPermitUsers"`
OrgDeptOwner string `json:"orgDeptOwner"`
DeptManagerUseridList string `json:"deptManagerUseridList"`
SourceIdentifier string `json:"sourceIdentifier"`
Ext string `json:"ext"`
}
type DepartmentListIdsResp ¶
DepartmentListIdsResp 子部门ID列表响应
type DepartmentListResp ¶
type DingtalkClient ¶
type DingtalkClient struct {
Client *http.Client
BaseURL string
AppKey string
AppSecret string
AccessToken AccessTokenResp
ExpiresTime interface{}
// contains filtered or unexported fields
}
func NewDingtalkClient ¶
func NewDingtalkClient(appkey, appsecret string) *DingtalkClient
func (*DingtalkClient) Init ¶
func (d *DingtalkClient) Init() error
func (*DingtalkClient) OapiAttendanceGetleavestatusRequest ¶
func (d *DingtalkClient) OapiAttendanceGetleavestatusRequest(useridList []string, startTime, endTime, offset, size int64) (AttendanceGetleavestatusResp, error)
func (*DingtalkClient) OapiAttendanceGetsimplegroupsRequest ¶
func (d *DingtalkClient) OapiAttendanceGetsimplegroupsRequest(offset int64, size int64) (AttendanceGetsimplegroupsResp, error)
OapiAttendanceGetsimplegroupsRequest 批量获取企业考勤组详情 offset 偏移位置,从0、1、2...依次递增,默认值:0 size 分页大小,最大10,默认值:10
func (*DingtalkClient) OapiAttendanceGetusergroupRequest ¶
func (d *DingtalkClient) OapiAttendanceGetusergroupRequest(userid string) (AttendanceGetusergroupResp, error)
OapiAttendanceGetusergroupRequest 获取用户考勤组
func (*DingtalkClient) OapiAttendanceGroupMemberListRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupMemberListRequest(opUserID string, cursor, groupID int64) (AttendanceGroupMemberListResp, error)
OapiAttendanceGroupMemberListRequest 获取考勤组成员 注意:如果某个员工A属于人力资源部门,那么通过这个接口是无法查询到A的,该接口仅能获取到人力资源部和欢欢两个成员信息
func (*DingtalkClient) OapiAttendanceGroupMemberListbyidsRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupMemberListbyidsRequest(opUserid string, memberIds []string, memberType, groupID int64) (AttendanceGroupMemberListbyidsResp, error)
OapiAttendanceGroupMemberListbyidsRequest 考勤组成员校验 校验某个部门或者员工是否属于某个考勤组,返回值为属于这个考勤组的部门id或者员工id
func (*DingtalkClient) OapiAttendanceGroupMemberUpdateRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupMemberUpdateRequest(reqData AttendanceGroupMemberUpdateReq) (AttendanceGroupMemberUpdateResp, error)
OapiAttendanceGroupMemberUpdateRequest 考勤组成员更新
func (*DingtalkClient) OapiAttendanceGroupMemberusersListRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupMemberusersListRequest(opUserID string, cursor, groupID int64) (AttendanceGroupMemberuserListResp, error)
OapiAttendanceGroupMemberusersListRequest 获取考勤组员工id
func (*DingtalkClient) OapiAttendanceGroupMinimalismListRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupMinimalismListRequest(opUserID string, cursor int64) (AttendanceGroupMinimalismListResp, error)
OapiAttendanceGroupMinimalismListRequest 获取考勤组摘要 分页获取企业内所有考勤组摘要信息
func (*DingtalkClient) OapiAttendanceGroupQueryRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupQueryRequest(opUserID string, groupID int) (AttendanceGroupQueryResp, error)
OapiAttendanceGroupQueryRequest 获取考勤组详情
func (*DingtalkClient) OapiAttendanceGroupSearchRequest ¶
func (d *DingtalkClient) OapiAttendanceGroupSearchRequest(opUserID, groupName string) (AttendanceGroupSearchResp, error)
OapiAttendanceGroupSearchRequest 搜索考勤组摘要
func (*DingtalkClient) OapiAttendanceListRecordRequest ¶
func (d *DingtalkClient) OapiAttendanceListRecordRequest(userIDs []string, checkDateFrom string, checkDateTo string, isI18n bool) (AttendanceListRecordResp, error)
OapiAttendanceListRecordRequest 获取考勤打卡详情 userIds 企业内的员工id列表,最多不能超过50个 checkDateFrom 查询考勤打卡记录的起始工作日。格式为“yyyy-MM-dd hh:mm:ss”。 checkDateTo 查询考勤打卡记录的结束工作日。格式为“yyyy-MM-dd hh:mm:ss”。注意,起始与结束工作日最多相隔7天 isI18n 取值为true和false,表示是否为海外企业使用,默认为false。其中,true:海外平台使用,false:国内平台使用
func (*DingtalkClient) OapiAttendanceListRequest ¶
func (d *DingtalkClient) OapiAttendanceListRequest(userIDList []string, workDateFrom, workDateTo string, offset, limit int64) (AttendanceListResp, error)
OapiAttendanceListRequest 获取考勤打卡结果 workDateFrom 查询考勤打卡记录的起始工作日。格式为“yyyy-MM-dd HH:mm:ss”,HH:mm:ss可以使用00:00:00,将返回此日期从0点到24点的结果 workDateTo 查询考勤打卡记录的结束工作日。格式为“yyyy-MM-dd HH:mm:ss”,HH:mm:ss可以使用00:00:00,将返回此日期从0点到24点的结果。注意,起始与结束工作日最多相隔7天 userIdList 员工在企业内的UserID列表,企业用来唯一标识用户的字段。最多不能超过50个 offset 表示获取考勤数据的起始点,第一次传0,如果还有多余数据,下次获取传的offset值为之前的offset+limit,0、1、2...依次递增 limit 表示获取考勤数据的条数,最大不能超过50条 isI18n 取值为true和false,表示是否为海外企业使用,默认为false。其中,true:海外平台使用,false:国内平台使用
func (*DingtalkClient) OapiAttendanceListscheduleRequest ¶
func (d *DingtalkClient) OapiAttendanceListscheduleRequest(workDate string, offset, size int) (AttendanceListscheduleResp, error)
OapiAttendanceListscheduleRequest 查询企业考勤排班详情 workDate 取值为日期 2020-01-01 00:00:00 offset 偏移位置,从0开始,后续传offset+size的值。当返回结果中的has_more为false时,表示没有多余的数据了。 size 分页大小,最大200,默认值:200
func (*DingtalkClient) OapiAttendanceScheduleListbydayRequest ¶
func (d *DingtalkClient) OapiAttendanceScheduleListbydayRequest(opUserID, userID string, dateTime int64) (AttendanceScheduleListbydayResp, error)
OapiAttendanceScheduleListbydayRequest 查询成员排班信息 opUserID 操作人userId userID 用户userId dateTime 查询某个工作日的数据,Unix时间戳 (毫秒)
func (*DingtalkClient) OapiAttendanceScheduleListbyusersRequest ¶
func (d *DingtalkClient) OapiAttendanceScheduleListbyusersRequest(opUserID, userIDs string, fromDateTime, toDateTime int64) (AttendanceScheduleListbyusersResp, error)
OapiAttendanceScheduleListbyusersRequest 批量查询成员排班信息 op_user_id 操作人userId userids 用户userId列表 from_date_time 起始日期(毫秒) to_date_time 结束日期(毫秒)
func (*DingtalkClient) OapiAttendanceScheduleResultListbyidsRequest ¶
func (d *DingtalkClient) OapiAttendanceScheduleResultListbyidsRequest(opUserID string, scheduleIDs string) (AttendanceScheduleResultListbyidsResp, error)
OapiAttendanceScheduleResultListbyidsRequest 查询排班打卡结果
func (*DingtalkClient) OapiAttendanceShiftListRequest ¶
func (d *DingtalkClient) OapiAttendanceShiftListRequest(opUserID string, cursor int64) (AttendanceShiftListResp, error)
OapiAttendanceShiftListRequest 批量查询班次摘要信息
func (*DingtalkClient) OapiAttendanceShiftQueryRequest ¶
func (d *DingtalkClient) OapiAttendanceShiftQueryRequest(opUserID string, shiftID int64) (AttendanceShiftQueryResp, error)
OapiAttendanceShiftQueryRequest 查询班次详情
func (*DingtalkClient) OapiAttendanceShiftSearchRequest ¶
func (d *DingtalkClient) OapiAttendanceShiftSearchRequest(opUserID, shiftName string) (AttendanceShiftSearchResp, error)
OapiAttendanceShiftSearchRequest 按名称搜索班次 op_user_id 操作人userId shift_name 班次名称
func (*DingtalkClient) OapiAuthScopesRequest ¶
func (d *DingtalkClient) OapiAuthScopesRequest() (AuthScopesResp, error)
OapiAuthScopesRequest 获取通讯录权限范围
func (*DingtalkClient) OapiDepartmentCreateRequest ¶
func (d *DingtalkClient) OapiDepartmentCreateRequest(reqData DepartmentCreateReq) (DepartmentCreateResp, error)
OapiDepartmentCreateRequest 创建一个部门 Method: POST
func (*DingtalkClient) OapiDepartmentDeleteRequest ¶
func (d *DingtalkClient) OapiDepartmentDeleteRequest(id string) (DepartmentDeleteResp, error)
OapiDepartmentDeleteRequest 删除一个部门 Method: GET
func (*DingtalkClient) OapiDepartmentGetRequest ¶
func (d *DingtalkClient) OapiDepartmentGetRequest(id string) (DepartmentGetResp, error)
func (*DingtalkClient) OapiDepartmentListIdsRequest ¶
func (d *DingtalkClient) OapiDepartmentListIdsRequest(id string) (DepartmentListIdsResp, error)
OapiDepartmentListIdsRequest 获取子部门ID列表 Method: GET
func (*DingtalkClient) OapiDepartmentListParentDeptsByDeptRequest ¶
func (d *DingtalkClient) OapiDepartmentListParentDeptsByDeptRequest(id string) (DepartmentListParentDeptsByDeptResp, error)
func (*DingtalkClient) OapiDepartmentListParentDeptsRequest ¶
func (d *DingtalkClient) OapiDepartmentListParentDeptsRequest(userid string) (DepartmentListParentDeptsResp, error)
func (*DingtalkClient) OapiDepartmentListRequest ¶
func (d *DingtalkClient) OapiDepartmentListRequest(id string, fetchChild bool) (DepartmentListResp, error)
OapiDepartmentListRequest 获取部门列表 Method: GET id 父部门id(如果不传,默认部门为根部门,根部门ID为1) fetchChild 是否递归部门的全部子部门
func (*DingtalkClient) OapiInactiveUserGetRequest ¶
func (d *DingtalkClient) OapiInactiveUserGetRequest(queryDate, offset, size string) (InactiveUserGetResp, error)
OapiInactiveUserGetRequest 获取未登录的员工列表 querData: 20200503 日期格式 offset: 分页数据偏移量,从0开始 size: 每页大小,最大100
func (*DingtalkClient) OapiProcessGettodonumRequest ¶
func (d *DingtalkClient) OapiProcessGettodonumRequest(userID string) (ProcessGettodonumResp, error)
OapiProcessGettodonumRequest 获取用户待审批数量
func (*DingtalkClient) OapiProcessListbyuseridRequest ¶
func (d *DingtalkClient) OapiProcessListbyuseridRequest(userID string, offset, size int64) (ProcessListbyuseridResp, error)
OapiProcessListbyuseridRequest 获取用户可见的审批模板
func (*DingtalkClient) OapiProcessinstanceCreateRequest ¶
func (d *DingtalkClient) OapiProcessinstanceCreateRequest(reqData ProcessinstanceCreateReq) (ProcessinstanceCreateResp, error)
func (*DingtalkClient) OapiProcessinstanceCspaceInfoRequest ¶
func (d *DingtalkClient) OapiProcessinstanceCspaceInfoRequest(userID string) (ProcessinstanceCspaceInfoResp, error)
func (*DingtalkClient) OapiProcessinstanceGetRequest ¶
func (d *DingtalkClient) OapiProcessinstanceGetRequest(processInstanceID string) (ProcessinstanceGetResp, error)
OapiProcessinstanceGetRequest 获取审批实例详情
func (*DingtalkClient) OapiProcessinstanceListidsRequest ¶
func (d *DingtalkClient) OapiProcessinstanceListidsRequest(reqData ProcessinstanceListidsReq) (ProcessinstanceListidsResp, error)
OapiProcessinstanceListidsRequest 批量获取审批实例ID
func (*DingtalkClient) OapiRoleListRequest ¶
func (d *DingtalkClient) OapiRoleListRequest(size, offset int) (RoleListResp, error)
func (*DingtalkClient) OapiRoleSimplelistRequest ¶
func (d *DingtalkClient) OapiRoleSimplelistRequest(roleID string) (RoleSimplelistResp, error)
func (*DingtalkClient) OapiSmartworkHrmEmployeeListRequest ¶
func (d *DingtalkClient) OapiSmartworkHrmEmployeeListRequest(useridList string) (SmartworkHrmEmployeeListResp, error)
func (*DingtalkClient) OapiUserCreateRequest ¶
func (d *DingtalkClient) OapiUserCreateRequest(userInfo UserCreateReq) (UserCreateResp, error)
OapiUserCreateRequest 创建一个用户 Method: POST
func (*DingtalkClient) OapiUserDeleteRequest ¶
func (d *DingtalkClient) OapiUserDeleteRequest(userid string) (UserDeleteResp, error)
OapiUserDeleteRequest 删除一个用户 Method: GET
func (*DingtalkClient) OapiUserGetAdminRequest ¶
func (d *DingtalkClient) OapiUserGetAdminRequest() (UserGetAdminResp, error)
OapiUserGetAdminRequest 获取所有管理员
func (*DingtalkClient) OapiUserGetAdminScopeRequest ¶
func (d *DingtalkClient) OapiUserGetAdminScopeRequest(userid string) (UserGetAdminScopeResp, error)
OapiUserGetAdminScopeRequest 根据员工userid获取其所管理的部门 Method: GET
func (*DingtalkClient) OapiUserGetByMobileRequest ¶
func (d *DingtalkClient) OapiUserGetByMobileRequest(mobile string) (UserGetByMobileResp, error)
OapiUserGetByMobileRequest 根据手机号码获取用户userid Method: GET mobile: 手机号码
func (*DingtalkClient) OapiUserGetDeptMemberRequest ¶
func (d *DingtalkClient) OapiUserGetDeptMemberRequest(depID string) (UserGetDeptMemberResp, error)
OapiUserGetDeptMemberRequest 获取部门所有用户的userid Method: GET
func (*DingtalkClient) OapiUserGetOrgUserCountRequest ¶
func (d *DingtalkClient) OapiUserGetOrgUserCountRequest(onlyActive string) (UserGetOrgUserCountResp, error)
OapiUserGetOrgUserCountRequest 获取企业员工人数 Method: GET onlyActive: 0:包含未激活钉钉的人员数量 1:不包含未激活钉钉的人员数量
func (*DingtalkClient) OapiUserGetRequest ¶
func (d *DingtalkClient) OapiUserGetRequest(userid string) (UserGetResp, error)
OapiUserGetRequest 获取一个用户的详情 Method: GET
func (*DingtalkClient) OapiUserGetUseridByUnionidRequest ¶
func (d *DingtalkClient) OapiUserGetUseridByUnionidRequest(unionid string) (UserGetUseridByUnionidResp, error)
OapiUserGetUseridByUnionidRequest 根据unionid获取userid Method: GET unionid: 员工的unionid
func (*DingtalkClient) OapiUserListbypageRequest ¶
func (d *DingtalkClient) OapiUserListbypageRequest(depID string, offset, size int64, order string) (UserListbypageResp, error)
OapiUserListbypageRequest 获取部门用户的详情 Method: GET depID: 部门id,1表示根部门 offset: 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始 size: 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100 order:
entry_asc:代表按照进入部门的时间升序, entry_desc:代表按照进入部门的时间降序, modify_asc:代表按照部门信息修改时间升序, modify_desc:代表按照部门信息修改时间降序, custom:代表用户定义(未定义时按照拼音)排序
func (*DingtalkClient) OapiUserSimplelistRequest ¶
func (d *DingtalkClient) OapiUserSimplelistRequest(depID string, offset, size int64, order string) (UserSimplelistResp, error)
OapiUserSimplelistRequest 获取部门用户 Method: GET depID: 部门id号 offset: 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量 size: 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100 order:
entry_asc:代表按照进入部门的时间升序, entry_desc:代表按照进入部门的时间降序, modify_asc:代表按照部门信息修改时间升序, modify_desc:代表按照部门信息修改时间降序, custom:代表用户定义(未定义时按照拼音)排序
func (*DingtalkClient) OapiUserUpdateRequest ¶
func (d *DingtalkClient) OapiUserUpdateRequest(userInfo UserUpdateReq) (UserUpdateResp, error)
OapiUserUpdateRequest 更新用户的信息 Method: POST
func (*DingtalkClient) RefreshToken ¶
func (d *DingtalkClient) RefreshToken() error
RefreshToken 刷新token,根据现有Client中的token判断 暴露为外部可调用函数,方便手动刷新现有token的需求
type FormComponentValue ¶
type FormComponentValue struct {
Name interface{} `json:"name"` // 表单控件每一栏的名称
Value interface{} `json:"value"` // 表单控件每一栏的值
ExtValue interface{} `json:"ext_value"` // 扩展值
}
type FormComponentValues ¶
type FormComponentValues []FormComponentValue
func (*FormComponentValues) Add ¶
func (f *FormComponentValues) Add(key, value interface{})
type GroupMemberUpdateParam ¶
type InactiveUserGetResp ¶
type ProcessGettodonumReq ¶
type ProcessGettodonumReq struct {
UserID string `json:"userid"`
}
type ProcessGettodonumResp ¶
type ProcessListbyuseridReq ¶
type ProcessListbyuseridResp ¶
type ProcessinstanceCreateReq ¶
type ProcessinstanceCreateReq struct {
AgentID string `json:"agent_id"` // 企业应用标识(ISV调用必须设置)
ProcessCode string `json:"process_code"` // 审批流的唯一码,process_code就在审批流编辑的页面URL中
OriginatorUserID string `json:"originator_user_id"` // 审批实例发起人的userid
DeptID string `json:"dept_id"` // 发起人所在的部门 如果发起人属于根部门,传-1
// Approvers string `json:"approvers"` // 审批人userid列表,最大列表长度20。多个审批人用逗号分隔,按传入的顺序依次审批
// ApproversV2 []ProcessInstanceApproverVo `json:"approvers_v2"` // 审批人列表, 支持会签/或签,优先级高于approvers变量
// CCList string `json:"cc_list"` // 抄送人userid列表,最大列表长度:20。多个抄送人用逗号分隔。该参数需要与cc_position参数一起传,抄送人才会生效;该参数需要与approvers或approvers_v2参数一起传,抄送人才会生效;
// CCPosition string `json:"cc_position"`
FormComponentValues []FormComponentValue `json:"form_component_values"` // 审批流表单控件,最大列表长度20。控件仅支持本文档中列出的表单控件,使用不支持的控件会提示错误, https://ding-doc.dingtalk.com/doc#/serverapi2/cmct1a
}
type ProcessinstanceCspaceInfoReq ¶
type ProcessinstanceCspaceInfoReq struct {
UserID string `json:"user_id"`
}
type ProcessinstanceGetReq ¶
type ProcessinstanceGetReq struct {
ProcessInstanceID string `json:"process_instance_id"`
}
type ProcessinstanceGetResp ¶
type ProcessinstanceGetResp struct {
Base
ProcessInstance struct {
Title string `json:"title"`
CreateTime string `json:"create_time"`
FinishTime string `json:"finish_time"`
OriginatorUserid string `json:"originator_userid"`
OriginatorDeptID string `json:"originator_dept_id"`
Status string `json:"status"`
CcUserids []string `json:"cc_userids"`
FormComponentValues []struct {
Name string `json:"name"`
Value string `json:"value"`
ExtValue string `json:"ext_value"`
} `json:"form_component_values"`
Result string `json:"result"`
BusinessID string `json:"business_id"`
OperationRecords []struct {
Userid string `json:"userid"`
Date string `json:"date"`
OperationType string `json:"operation_type"`
OperationResult string `json:"operation_result"`
Remark string `json:"remark"`
} `json:"operation_records"`
Tasks []struct {
Userid string `json:"userid"`
TaskStatus string `json:"task_status"`
TaskResult string `json:"task_result"`
CreateTime string `json:"create_time"`
FinishTime string `json:"finish_time"`
Taskid string `json:"taskid"`
} `json:"tasks"`
OriginatorDeptName string `json:"originator_dept_name"`
BizAction string `json:"biz_action"`
AttachedProcessInstanceIds []string `json:"attached_process_instance_ids"`
} `json:"process_instance"`
}
type ProcessinstanceListidsReq ¶
type ProcessinstanceListidsReq struct {
Cursor int `json:"cursor"` // 分页查询的游标,最开始传0,后续传返回参数中的next_cursor值,默认值:0
StartTime int64 `json:"start_time"` // * 开始时间。Unix时间戳,单位毫秒。
EndTime int64 `json:"end_time"` // 结束时间。不传该参数则默认取当前时间。Unix时间戳,单位毫秒。
Size int64 `json:"size"` // 分页参数,每页大小,最多传20,默认值:20
UseridList string `json:"userid_list"` // 发起人用户id列表,用逗号分隔,最大列表长度:10
ProcessCode string `json:"process_code"` // * 流程模板唯一标识,可在OA管理后台编辑审批表单部分查询
}
type RequestData ¶
type RequestData map[string]interface{}
func (RequestData) Set ¶
func (rd RequestData) Set(key string, value interface{})
type RoleListRequest ¶
type RoleListResp ¶
type RoleSimplelistResp ¶
type SmartworkHrmEmployeeListReq ¶
type SmartworkHrmEmployeeListReq struct {
UserIDList string `json:"userid_list"`
}
type SmartworkHrmEmployeeListResp ¶
type SmartworkHrmEmployeeListResp struct {
Result []struct {
Userid string `json:"userid"`
Partner bool `json:"partner"`
FieldList []struct {
FieldName string `json:"fieldName"`
FieldCode string `json:"fieldCode"`
GroupID string `json:"groupId"`
Label string `json:"label,omitempty"`
Value string `json:"value,omitempty"`
} `json:"field_list"`
} `json:"result"`
Base
Success bool `json:"success"`
}
type Unmarshalable ¶
type Unmarshalable interface {
// contains filtered or unexported methods
}
type UserCreateReq ¶
type UserCreateReq struct {
Mobile string `json:"mobile"` // 手机号码,企业内必须唯一,不可重复。如果是国际号码,请使用+xx-xxxxxx的格式
UserUpdateReq
}
UserCreateReq 用户创建
type UserCreateResp ¶
UserCreateResp 用户创建响应
type UserGetAdminResp ¶
type UserGetAdminScopeResp ¶
type UserGetByMobileResp ¶
type UserGetDeptMemberResp ¶
type UserGetOrgUserCountResp ¶
type UserGetResp ¶
type UserGetResp struct {
Base
Unionid string `json:"unionid"`
Remark string `json:"remark"`
Userid string `json:"userid"`
IsLeaderInDepts string `json:"isLeaderInDepts"`
IsBoss bool `json:"isBoss"`
HiredDate int64 `json:"hiredDate"`
IsSenior bool `json:"isSenior"`
Tel string `json:"tel"`
Department []int `json:"department"`
WorkPlace string `json:"workPlace"`
Email string `json:"email"`
OrderInDepts string `json:"orderInDepts"`
Mobile string `json:"mobile"`
Active bool `json:"active"`
Avatar string `json:"avatar"`
IsAdmin bool `json:"isAdmin"`
IsHide bool `json:"isHide"`
Jobnumber string `json:"jobnumber"`
Name string `json:"name"`
Extattr struct {
} `json:"extattr"`
StateCode string `json:"stateCode"`
Position string `json:"position"`
Roles []struct {
ID int `json:"id"`
Name string `json:"name"`
GroupName string `json:"groupName"`
} `json:"roles"`
}
type UserListbypageResp ¶
type UserListbypageResp struct {
Base
HasMore bool `json:"hasMore"`
Userlist []struct {
Userid string `json:"userid"`
Unionid string `json:"unionid"`
Mobile string `json:"mobile"`
Tel string `json:"tel"`
WorkPlace string `json:"workPlace"`
Remark string `json:"remark"`
Order int `json:"order"`
IsAdmin bool `json:"isAdmin"`
IsBoss bool `json:"isBoss"`
IsHide bool `json:"isHide"`
IsLeader bool `json:"isLeader"`
Name string `json:"name"`
Active bool `json:"active"`
Department []int `json:"department"`
Position string `json:"position"`
Email string `json:"email"`
Avatar string `json:"avatar"`
Jobnumber string `json:"jobnumber"`
Extattr struct {
Age string `json:"爱好"`
Interest string `json:"年龄"`
} `json:"extattr"`
} `json:"userlist"`
}
type UserSimplelistResp ¶
type UserUpdateReq ¶
type UserUpdateReq struct {
Userid string `json:"userid"` // 员工在当前企业内的唯一标识,也称staffId。可由企业在创建时指定,并代表一定含义比如工号,创建后不可修改,企业内必须唯一。长度为1~64个字符,如果不传,服务器将自动生成一个userid
Name string `json:"name"` // 必要, 用户名称
OrderInDepts string `json:"orderInDepts"` // 在对应的部门中的排序,Map结构的json字符串,key是部门的Id, value是人员在这个部门的排序值
Department []int `json:"department"` // 数组类型,数组里面值为整型,成员所属部门id列表
Position string `json:"position"` // 职位信息。长度为0~64个字符
Tel string `json:"tel"` // 必要, 分机号,长度为0~50个字符,企业内必须唯一,不可重复
WorkPlace string `json:"workPlace"` // 办公地点,长度为0~50个字符
Remark string `json:"remark"` // 备注,长度为0~1000个字符
Email string `json:"email"` // 邮箱。长度为0~64个字符。企业内必须唯一,不可重复
OrgEmail string `json:"orgEmail"` // 员工的企业邮箱,员工的企业邮箱已开通,才能增加此字段, 否则会报错
Jobnumber string `json:"jobnumber"` // 员工工号。对应显示到OA后台和客户端个人资料的工号栏目。长度为0~64个字符
IsHide bool `json:"isHide"` // 是否号码隐藏,true表示隐藏,false表示不隐藏。隐藏手机号后,手机号在个人资料页隐藏,但仍可对其发DING、发起钉钉免费商务电话。
IsSenior bool `json:"isSenior"` // 是否高管模式,true表示是,false表示不是
Extattr struct {
Interest string `json:"爱好"`
Age string `json:"年龄"`
} `json:"extattr"` // 扩展属性,可以设置多种属性(手机上最多显示10个扩展属性.具体显示哪些属性,请到OA管理后台->设置->通讯录信息设置和OA管理后台->设置->手机端显示信息设置)。该字段的值支持链接类型填写,同时链接支持变量通配符自动替换,目前支持通配符有:userid,corpid。示例: [工位地址](http://www.dingtalk.com?userid=#userid#&corpid=#corpid#)
}
UserUpdateReq 用户信息更新
Source Files
¶
- attendance_groups.go
- attendance_groups_mdoel.go
- attendance_list.go
- attendance_list_model.go
- attendance_listscheduler.go
- attendance_listscheduler_model.go
- attendance_shift.go
- attendance_shift_model.go
- contact_dep.go
- contact_dep_model.go
- contact_role.go
- contact_role_model.go
- contact_user.go
- contact_user_model.go
- godingtalk.go
- hrm_employee.go
- http.go
- process_create.go
- process_create_model.go
- process_fetch.go
- process_fetch_model.go