Skip to content

Commit 91194b0

Browse files
authored
给三方IM添加源官方地址链接 (#42)
1 parent 7deb1ce commit 91194b0

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ wecom:
114114
corp-secret: "xxxxx" # 企业微信中创建的应用secret
115115
enable-sync: false # 是否开启定时同步企业微信的任务
116116
feishu:
117+
# 配置获取详细文档参考:http://ldapdoc.eryajf.net/pages/83c90b/
117118
flag: "feishu" # 作为飞书在平台的标识
118119
app-id: "xxxxxxx" # 飞书的app-id
119120
app-secret: "xxxxxxxxxxx" # 飞书的app-secret

public/client/dingtalk/dingtalk.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"github.com/zhaoyunxing92/dingtalk/v2/request"
88
)
99

10+
// 官方文档地址: https://open.dingtalk.com/document/orgapp-server/obtain-the-department-list
11+
// GetAllDepts 获取所有部门
1012
func GetAllDepts(deptId int) (result []*DingTalkDept, err error) {
1113
depts, err := InitDingTalkClient().FetchDeptList(deptId, true, "zh_CN")
1214
if err != nil {
@@ -24,6 +26,8 @@ func GetAllDepts(deptId int) (result []*DingTalkDept, err error) {
2426
return
2527
}
2628

29+
// 官方文档地址: https://open.dingtalk.com/document/orgapp-server/queries-the-complete-information-of-a-department-user
30+
// GetAllUsers 获取所有员工信息
2731
func GetAllUsers() (result []*DingTalkUser, err error) {
2832
depts, err := GetAllDepts(1)
2933
if err != nil {
@@ -82,6 +86,7 @@ func GetAllUsers() (result []*DingTalkUser, err error) {
8286
return
8387
}
8488

89+
// 官方文档:https://open.dingtalk.com/document/orgapp-server/intelligent-personnel-query-company-turnover-list
8590
// GetLeaveUserIds 获取离职人员ID列表
8691
func GetLeaveUserIds() ([]string, error) {
8792
var ids []string

public/client/feishu/feishu.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/chyroc/lark"
77
)
88

9+
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children
910
// GetAllDepts 获取所有部门
1011
func GetAllDepts() (depts []*lark.GetDepartmentListRespItem, err error) {
1112
var (
@@ -32,6 +33,7 @@ func GetAllDepts() (depts []*lark.GetDepartmentListRespItem, err error) {
3233
return
3334
}
3435

36+
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department
3537
// GetAllUsers 获取所有员工信息
3638
func GetAllUsers() (users []*lark.GetUserListRespItem, err error) {
3739
var (
@@ -62,6 +64,7 @@ func GetAllUsers() (users []*lark.GetUserListRespItem, err error) {
6264
return
6365
}
6466

67+
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list
6568
// GetLeaveUserIds 获取离职人员ID列表
6669
func GetLeaveUserIds() ([]string, error) {
6770
var ids []string

public/client/wechat/wecom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/wenerme/go-wecom/wecom"
77
)
88

9+
// 官方文档: https://developer.work.weixin.qq.com/document/path/90208
910
// GetAllDepts 获取所有部门
1011
func GetAllDepts() ([]wecom.ListDepartmentResponseItem, error) {
1112
depts, err := InitWeComClient().ListDepartment(
@@ -17,6 +18,7 @@ func GetAllDepts() ([]wecom.ListDepartmentResponseItem, error) {
1718
return depts.Department, nil
1819
}
1920

21+
// 官方文档: https://developer.work.weixin.qq.com/document/path/90201
2022
// GetAllUsers 获取所有员工信息
2123
func GetAllUsers() ([]wecom.ListUserResponseItem, error) {
2224
depts, err := GetAllDepts()

0 commit comments

Comments
 (0)