feat:完善项目信息

This commit is contained in:
henry
2022-01-20 11:51:02 +08:00
parent 9348c8970c
commit b87cd837be
23 changed files with 86 additions and 83 deletions

View File

@ -162,7 +162,7 @@ func (c *Expert) Instance(name, mobile string, page, pageSize int) (*controller.
}
// Match 匹配信息
func (c *Expert) Match(title string, industrys, keywords []string) ([]*ExpertMatchInfo, error) {
func (c *Expert) Match(title string, industrys, keywords []string) (*controller.ReturnPages, error) {
params := strings.Join([]string{
title, strings.Join(industrys, ","), strings.Join(keywords, ","),
}, ",")
@ -170,7 +170,7 @@ func (c *Expert) Match(title string, industrys, keywords []string) ([]*ExpertMat
manage := service.NewESManage(
service.WithManageIdentity(config.TenantUserIdentityForExpert),
)
out, err := manage.Search(0, 0, map[string]interface{}{
out, count, err := manage.Search(0, 0, map[string]interface{}{
"title": params, "industry": params, "keyword": params, "research": params,
})
if err != nil {
@ -202,7 +202,7 @@ func (c *Expert) Match(title string, industrys, keywords []string) ([]*ExpertMat
PatentTitles: strings.Split(v.PatentTitle, "&&"),
})
}
return list, nil
return &controller.ReturnPages{Data: list, Count: count}, nil
}
// Detail 详细信息