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"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
@ -32,12 +33,13 @@ type (
|
||||
}
|
||||
// ExpertDetail 专家详细信息
|
||||
ExpertDetail struct {
|
||||
ID string `json:"id"`
|
||||
ID string `json:"id"`
|
||||
TenantID string `json:"tenant_id"`
|
||||
*model2.ManageExpert
|
||||
Industrys []string `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
Researchs []string `json:"researchs"`
|
||||
Area string `json:"area"`
|
||||
Industrys []*config.Industry `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
Researchs []string `json:"researchs"`
|
||||
Area string `json:"area"`
|
||||
}
|
||||
)
|
||||
|
||||
@ -72,7 +74,7 @@ func (c *Expert) Instance(tenantID uint64, name string, examineStatus int, page,
|
||||
_industrys := make([]string, 0)
|
||||
|
||||
for _, v := range mManageExpert.GetIndustryAttribute() {
|
||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||
}
|
||||
// 研究机构,实验室
|
||||
list = append(list, &ExpertInstance{ID: v.GetEncodeID(), Name: v.Name, Industrys: _industrys,
|
||||
@ -97,13 +99,20 @@ func (c *Expert) Detail(id uint64) (*ExpertDetail, error) {
|
||||
} else if out.ManageExpert == 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])
|
||||
|
||||
return &ExpertDetail{
|
||||
ID: out.GetEncodeID(),
|
||||
TenantID: out.GetEncodeTenantID(),
|
||||
ManageExpert: out.ManageExpert,
|
||||
Industrys: out.GetIndustryAttribute(),
|
||||
Industrys: _industrys,
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
Researchs: out.GetResearchAttribute(),
|
||||
Area: out.FormatBasic(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user