feat:完善信息
This commit is contained in:
@ -21,20 +21,22 @@ type ExpertHandle func(session *session.Enterprise) *Expert
|
||||
type (
|
||||
// ExpertBasicInfo 基本信息
|
||||
ExpertBasicInfo struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
School string `json:"school"`
|
||||
Image string `json:"image"`
|
||||
Major string `json:"major"`
|
||||
Industrys []string `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
PatentTitles []string `json:"patent_titles"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
School string `json:"school"`
|
||||
Image string `json:"image"`
|
||||
Major string `json:"major"`
|
||||
Industrys []string `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
PatentTitle []string `json:"patent_title"`
|
||||
}
|
||||
// ExpertInstanceInfo 专家信息
|
||||
ExpertInstanceInfo struct {
|
||||
ExpertBasicInfo
|
||||
Researchs []string `json:"researchs"`
|
||||
Introduce string `json:"introduce"`
|
||||
ResearchName string `json:"research_name"`
|
||||
Researchs []string `json:"researchs"`
|
||||
Introduce string `json:"introduce"`
|
||||
Videos []string `json:"videos"`
|
||||
}
|
||||
)
|
||||
|
||||
@ -74,17 +76,18 @@ func (c *Expert) Instance(id uint64) (*ExpertInstanceInfo, error) {
|
||||
}
|
||||
return &ExpertInstanceInfo{
|
||||
ExpertBasicInfo: ExpertBasicInfo{
|
||||
ID: out.GetEncodeID(),
|
||||
Name: out.Name,
|
||||
Image: out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain]),
|
||||
School: out.School,
|
||||
Major: out.Major,
|
||||
Industrys: _industrys,
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
PatentTitles: patentTitles,
|
||||
ID: out.GetEncodeID(),
|
||||
Name: out.Name,
|
||||
Image: out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain]),
|
||||
School: out.School,
|
||||
Major: out.Major,
|
||||
Industrys: _industrys,
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
PatentTitle: patentTitles,
|
||||
},
|
||||
Researchs: out.GetResearchAttribute(),
|
||||
Introduce: out.Introduce,
|
||||
ResearchName: out.ResearchName,
|
||||
Researchs: out.GetResearchAttribute(),
|
||||
Introduce: out.Introduce,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -69,13 +69,13 @@ func expert(ids []uint64) (interface{}, error) {
|
||||
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||
|
||||
list = append(list, &ExpertBasicInfo{
|
||||
ID: v.GetEncodeID(),
|
||||
Name: v.Name,
|
||||
School: v.School,
|
||||
Major: v.Major,
|
||||
Industrys: v.GetIndustryAttribute(),
|
||||
Keywords: v.GetKeywordAttribute(),
|
||||
PatentTitles: strings.Split(v.PatentTitle, "&&"),
|
||||
ID: v.GetEncodeID(),
|
||||
Name: v.Name,
|
||||
School: v.School,
|
||||
Major: v.Major,
|
||||
Industrys: v.GetIndustryAttribute(),
|
||||
Keywords: v.GetKeywordAttribute(),
|
||||
PatentTitle: strings.Split(v.PatentTitle, "&&"),
|
||||
})
|
||||
}
|
||||
return list, nil
|
||||
|
Reference in New Issue
Block a user