feat:完善信息
This commit is contained in:
@ -27,13 +27,13 @@ type (
|
||||
}
|
||||
// ExpertMatchInfo 专家匹配信息
|
||||
ExpertMatchInfo struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
School string `json:"school"`
|
||||
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"`
|
||||
Major string `json:"major"`
|
||||
Industrys []string `json:"industrys"`
|
||||
Keywords []string `json:"keywords"`
|
||||
PatentTitle []string `json:"patent_title"`
|
||||
}
|
||||
// ExpertDetailInfo 专家详细信息
|
||||
ExpertDetailInfo struct {
|
||||
@ -193,13 +193,13 @@ func (c *Expert) Match(title string, industrys, keywords []string) (*controller.
|
||||
|
||||
for _, v := range experts {
|
||||
list = append(list, &ExpertMatchInfo{
|
||||
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 &controller.ReturnPages{Data: list, Count: count}, nil
|
||||
@ -215,13 +215,13 @@ func (c *Expert) Detail(id uint64) (*ExpertDetailInfo, error) {
|
||||
}
|
||||
return &ExpertDetailInfo{
|
||||
ExpertMatchInfo: ExpertMatchInfo{
|
||||
ID: out.GetEncodeID(),
|
||||
Name: out.Name,
|
||||
School: out.School,
|
||||
Major: out.Major,
|
||||
Industrys: out.GetIndustryAttribute(),
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
PatentTitles: strings.Split(out.PatentTitle, "&&"),
|
||||
ID: out.GetEncodeID(),
|
||||
Name: out.Name,
|
||||
School: out.School,
|
||||
Major: out.Major,
|
||||
Industrys: out.GetIndustryAttribute(),
|
||||
Keywords: out.GetKeywordAttribute(),
|
||||
PatentTitle: strings.Split(out.PatentTitle, "&&"),
|
||||
},
|
||||
Researchs: out.GetResearchAttribute(),
|
||||
Introduce: out.Introduce,
|
||||
|
Reference in New Issue
Block a user