新增用户添加组织字段 (#505)

Co-authored-by: alickliming <alickliming@didi.global.com>
This commit is contained in:
alick-liming 2021-01-13 10:00:58 +08:00 committed by GitHub
parent 74545012ed
commit fab8568633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 11 deletions

View File

@ -74,17 +74,18 @@ func userAddPost(c *gin.Context) {
now := time.Now().Unix()
b, _ := json.Marshal([]string{pass})
u := models.User{
Username: f.Username,
Password: pass,
Passwords: string(b),
Dispname: f.Dispname,
Phone: f.Phone,
Email: f.Email,
Im: f.Im,
IsRoot: f.IsRoot,
LeaderId: f.LeaderId,
UpdatedAt: now,
UUID: models.GenUUIDForUser(f.Username),
Username: f.Username,
Password: pass,
Passwords: string(b),
Dispname: f.Dispname,
Phone: f.Phone,
Email: f.Email,
Im: f.Im,
IsRoot: f.IsRoot,
LeaderId: f.LeaderId,
Organization: f.Organization,
UpdatedAt: now,
UUID: models.GenUUIDForUser(f.Username),
}
if f.LeaderId != 0 {