feat:完善公司导入模块

This commit is contained in:
henry
2022-05-10 23:22:01 +08:00
parent c8e5a7601d
commit cbb6713460

View File

@ -58,7 +58,7 @@ type (
Url string `json:"url" xlsx:"企业网站"`
Introduce string `json:"introduce" xlsx:"企业简介"`
Kind string `json:"kind" xlsx:"企业类型"`
TechnologyScene string `json:"technology_scene" xlsx:"核心技术与产品及应用场景"`
Product string `json:"product" xlsx:"核心技术与产品及应用场景"`
Keyword string `json:"keyword" xlsx:"关键词"`
Contact string `json:"contact" xlsx:"联系人"` // 联系人
ContactMobile string `json:"contact_mobile" xlsx:"联系电话"` // 联系方式
@ -243,7 +243,6 @@ func (c *Company) Import(file string) error {
now := time.Now()
//now := time.Now()
for _, v := range data {
_data := v.(*CompanyExcel)
@ -263,12 +262,12 @@ func (c *Company) Import(file string) error {
return err
}
// 所属领域
row.ModelTenant = model2.ModelTenant{}
row.ModelTenant = model2.ModelTenant{TenantID: _data.tenant()}
row.Kind = _data.kind()
row.Name = _data.Name
row.Code = _data.Code
row.Area = _data.area()
row.Product = ""
row.Product = _data.Product
row.Url = _data.Url
row.License = ""
row.SetIndustryAttribute(industrys)