Skip to content

Commit 47341d1

Browse files
authored
☄️ fix: 企业微信同步用户之后部门的问题,兼容用户没有手机号同步失败的问题 (#102)
1 parent 4b939ee commit 47341d1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

logic/a_logic.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func CommonAddUser(user *model.User, groups []*model.Group) error {
9494
if user.Position == "" {
9595
user.Position = "默认:技术"
9696
}
97+
if user.Mobile == "" {
98+
user.Mobile = "该用户手机号为空"
99+
}
97100
if user.Introduction == "" {
98101
user.Introduction = user.Nickname
99102
}

public/client/wechat/wecom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
7474
// 部门ids
7575
var sourceDeptIds []string
7676
for _, deptId := range user.Department {
77-
sourceDeptIds = append(sourceDeptIds, fmt.Sprintf("%s_%d", config.Conf.FeiShu.Flag, deptId))
77+
sourceDeptIds = append(sourceDeptIds, fmt.Sprintf("%s_%d", config.Conf.WeCom.Flag, deptId))
7878
}
7979
ele["department_ids"] = sourceDeptIds
8080
ret = append(ret, ele)

0 commit comments

Comments
 (0)