From 47341d108f46f75df66896396a7a31656638fc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=AB=E8=AE=B2=E6=A2=B5?= Date: Thu, 4 Aug 2022 10:16:36 +0800 Subject: [PATCH] =?UTF-8?q?=E2=98=84=EF=B8=8F=20fix:=20=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=90=8C=E6=AD=A5=E7=94=A8=E6=88=B7=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E9=83=A8=E9=97=A8=E7=9A=84=E9=97=AE=E9=A2=98,?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E7=94=A8=E6=88=B7=E6=B2=A1=E6=9C=89=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E5=90=8C=E6=AD=A5=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#102)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/a_logic.go | 3 +++ public/client/wechat/wecom.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/logic/a_logic.go b/logic/a_logic.go index bc6f710..93d9b1d 100644 --- a/logic/a_logic.go +++ b/logic/a_logic.go @@ -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 } diff --git a/public/client/wechat/wecom.go b/public/client/wechat/wecom.go index 0776d40..4287919 100644 --- a/public/client/wechat/wecom.go +++ b/public/client/wechat/wecom.go @@ -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)