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