☄️ fix: 企业微信同步用户之后部门的问题,兼容用户没有手机号同步失败的问题 (#102)
This commit is contained in:
parent
4b939eec09
commit
47341d108f
|
@ -94,6 +94,9 @@ func CommonAddUser(user *model.User, groups []*model.Group) error {
|
|||
if user.Position == "" {
|
||||
user.Position = "默认:技术"
|
||||
}
|
||||
if user.Mobile == "" {
|
||||
user.Mobile = "该用户手机号为空"
|
||||
}
|
||||
if user.Introduction == "" {
|
||||
user.Introduction = user.Nickname
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
|
|||
// 部门ids
|
||||
var sourceDeptIds []string
|
||||
for _, deptId := range user.Department {
|
||||
sourceDeptIds = append(sourceDeptIds, fmt.Sprintf("%s_%d", config.Conf.FeiShu.Flag, deptId))
|
||||
sourceDeptIds = append(sourceDeptIds, fmt.Sprintf("%s_%d", config.Conf.WeCom.Flag, deptId))
|
||||
}
|
||||
ele["department_ids"] = sourceDeptIds
|
||||
ret = append(ret, ele)
|
||||
|
|
Loading…
Reference in New Issue