From 0c131ede94a99c8cd230b9b430e046fb84598884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=AB=E8=AE=B2=E6=A2=B5?= Date: Mon, 18 Jul 2022 15:36:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A3=9E=E4=B9=A6=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E8=B6=85=E8=BF=8711=E4=BD=8D=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/user.go | 2 +- public/client/feishu/feishu.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/user.go b/model/user.go index 29c6285..c87d43f 100644 --- a/model/user.go +++ b/model/user.go @@ -10,7 +10,7 @@ type User struct { GivenName string `gorm:"type:varchar(50);comment:'花名'" json:"givenName"` // 花名,如果有的话,没有的话用昵称占位 Mail string `gorm:"type:varchar(100);comment:'邮箱'" json:"mail"` // 邮箱 JobNumber string `gorm:"type:varchar(20);comment:'工号'" json:"jobNumber"` // 工号 - Mobile string `gorm:"type:varchar(11);not null;unique;comment:'手机号'" json:"mobile"` // 手机号 + Mobile string `gorm:"type:varchar(15);not null;unique;comment:'手机号'" json:"mobile"` // 手机号 Avatar string `gorm:"type:varchar(255);comment:'头像'" json:"avatar"` // 头像 PostalAddress string `gorm:"type:varchar(255);comment:'地址'" json:"postalAddress"` // 地址 Departments string `gorm:"type:varchar(128);comment:'部门'" json:"departments"` // 部门 diff --git a/public/client/feishu/feishu.go b/public/client/feishu/feishu.go index 7b31739..2630b86 100644 --- a/public/client/feishu/feishu.go +++ b/public/client/feishu/feishu.go @@ -84,7 +84,7 @@ func GetAllUsers() (ret []map[string]interface{}, err error) { ele["custom_nickname_enterprise_email"] = strings.Split(user.EnterpriseEmail, "@")[0] } ele["email"] = user.Email - ele["mobile"] = user.Mobile[3:] + ele["mobile"] = user.Mobile ele["gender"] = user.Gender ele["avatar"] = user.Avatar.AvatarOrigin ele["city"] = user.City