feat:完善信息
This commit is contained in:
@ -16,12 +16,10 @@ func (a *User) Info(c *gin.Context) {
|
||||
|
||||
func (a *User) Perfect(c *gin.Context) {
|
||||
form := &struct {
|
||||
Avatar string `json:"avatar" form:"avatar" binding:"required"` // 头像
|
||||
Name string `json:"name" form:"name" binding:"required"` // 名称
|
||||
Email string `json:"email" form:"email" binding:"required"` // 邮箱
|
||||
Job string `json:"job" form:"job" binding:"required"` // 职务
|
||||
Address string `json:"address" form:"address" ` // 地址
|
||||
Company user.TenantParamsForCompany `json:"company" form:"company"` // 公司属性
|
||||
Name string `json:"name" form:"name" binding:"required"` // 名称
|
||||
Email string `json:"email" form:"email" binding:"required"` // 邮箱
|
||||
Job string `json:"job" form:"job" binding:"required"` // 职务
|
||||
FixedPhone string `json:"fixed_phone" form:"fixed_phone" ` // 固定电话
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
@ -29,9 +27,8 @@ func (a *User) Perfect(c *gin.Context) {
|
||||
}
|
||||
err := user.NewTenant()(api.GetSession()(c).(*service.SessionEnterprise)).Perfect(&user.TenantPerfectParams{
|
||||
TenantBasicParams: &user.TenantBasicParams{
|
||||
Avatar: form.Avatar, Name: form.Name, Email: form.Email, Job: form.Job, Address: form.Address,
|
||||
Name: form.Name, Email: form.Email, Job: form.Job, FixedPhone: form.FixedPhone,
|
||||
},
|
||||
TenantParamsForCompany: &form.Company,
|
||||
})
|
||||
api.APIResponse(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user