Skip to content

Commit

Permalink
fix: 飞书手机号超过11位的问题 (eryajf#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
eryajf committed Jul 18, 2022
1 parent 2c60a16 commit 0c131ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion model/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"` // 部门
Expand Down
2 changes: 1 addition & 1 deletion public/client/feishu/feishu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c131ed

Please sign in to comment.