feat:完善入驻信息管理

This commit is contained in:
henry
2021-12-02 18:05:53 +08:00
parent 5c4d883c97
commit 199e6f0669
23 changed files with 626 additions and 55 deletions

View File

@ -47,6 +47,7 @@ func (c *Company) Launch(params *BasicParams, inviterID uint64, other *config.Id
return err
}
}
mManageCompany.ID = 0
}
mManageCompany.Local.Local = c.local
mManageCompany.InviterID = inviterID
@ -56,7 +57,7 @@ func (c *Company) Launch(params *BasicParams, inviterID uint64, other *config.Id
mManageCompany.Area = model2.Area{
Province: params.Area.Province, City: params.Area.City, District: params.Area.District, Address: params.Area.Address,
}
mManageCompany.WebUrl = other.WebUrl
mManageCompany.Url = other.Url
mManageCompany.SetIndustryAttribute(params.Industrys)
mManageCompany.SetKeywordAttribute(params.Keywords)
mManageCompany.Introduce = params.Introduce
@ -67,10 +68,8 @@ func (c *Company) Launch(params *BasicParams, inviterID uint64, other *config.Id
model2.NewWhere("code", params.Code), model2.NewWhere("local", c.local)}, tx); err != nil {
return err
}
if mManageCompany.ID <= 0 {
if err = model2.Create(mManageCompany.ManageCompany, tx); err != nil {
return err
}
if err = model2.Create(mManageCompany.ManageCompany, tx); err != nil {
return err
}
if err := model2.UpdatesWhere(mUserCompany.UserCompany, map[string]interface{}{
"status": model2.InvalidStatusForYes, "updated_at": time.Now(),