feat:完善项目信息
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"SciencesServer/app/basic/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/session"
|
||||
config2 "SciencesServer/config"
|
||||
"errors"
|
||||
)
|
||||
|
||||
@ -26,12 +27,13 @@ type (
|
||||
}
|
||||
// CompanyDetail 公司企业详细信息
|
||||
CompanyDetail struct {
|
||||
ID string `json:"id"`
|
||||
ID string `json:"id"`
|
||||
TenantID string `json:"tenant_id"`
|
||||
*model2.ManageCompany
|
||||
Industrys []string `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
Directions []string `json:"directions"`
|
||||
Area string `json:"area"`
|
||||
Industrys []*config.Industry `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
Directions []string `json:"directions"`
|
||||
Area string `json:"area"`
|
||||
}
|
||||
// CompanyParams 公司企业参数信息
|
||||
CompanyParams struct {
|
||||
@ -72,7 +74,7 @@ func (c *Company) Instance(tenantID uint64, name string, status int, page, pageS
|
||||
_industrys := make([]string, 0)
|
||||
|
||||
for _, v := range mManageCompany.GetIndustryAttribute() {
|
||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||
}
|
||||
list = append(list, &CompanyInstance{
|
||||
ID: v.GetEncodeID(), ManageCompanyInfo: v, Industrys: _industrys,
|
||||
@ -157,10 +159,19 @@ func (c *Company) Detail(id uint64) (*CompanyDetail, error) {
|
||||
} else if out.ManageCompany == nil {
|
||||
return nil, errors.New("操作错误,公司企业信息不存在或已被删除")
|
||||
}
|
||||
_industrys := make([]*config.Industry, 0)
|
||||
|
||||
for _, v := range out.GetIndustryAttribute() {
|
||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
||||
}
|
||||
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||
out.License = (&model2.Image{Image: out.License}).Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||
|
||||
return &CompanyDetail{
|
||||
ID: out.GetEncodeID(),
|
||||
TenantID: out.GetEncodeTenantID(),
|
||||
ManageCompany: out.ManageCompany,
|
||||
Industrys: out.GetIndustryAttribute(),
|
||||
Industrys: _industrys,
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
Area: out.FormatBasic(),
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user