fix: 飞书手机号超过11位的问题 (#85)

This commit is contained in:
二丫讲梵 2022-07-18 15:36:55 +08:00 committed by GitHub
parent 2c60a161f5
commit 0c131ede94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"` // 部门

View File

@ -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