作者 tangxvhui

bug修复

... ... @@ -118,6 +118,10 @@ func UpdateCompanyData(data ModuleCompanytData) error {
)
newCompanyData := data.Company
companyData, err = models.GetCompanyByUCenter(newCompanyData.AdminCompanyId)
if err == orm.ErrNoRows {
log.Error("编辑操作,未找到数据,执行添加操作")
return AddCompanyData(data)
}
if err != nil {
log.Error("获取企业数据失败,user_center_id:%d ,err:%s", newCompanyData.AdminCompanyId, err)
return errors.New("获取企业数据失败")
... ...