feat:完善项目信息
This commit is contained in:
@ -3,6 +3,7 @@ package manage
|
||||
import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/basic/config"
|
||||
"SciencesServer/app/basic/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
@ -102,14 +103,14 @@ func (c *Company) Product(id uint64, page, pageSize int) ([]*CompanyProductInfo,
|
||||
}
|
||||
|
||||
// Match 匹配信息
|
||||
func (c *Company) Match(title string, industrys, keywords []string) ([]*CompanyMatchInfo, error) {
|
||||
func (c *Company) Match(title string, industrys, keywords []string) (*controller.ReturnPages, error) {
|
||||
params := strings.Join([]string{
|
||||
title, strings.Join(industrys, ","), strings.Join(keywords, ","),
|
||||
}, ",")
|
||||
manage := service.NewESManage(
|
||||
service.WithManageIdentity(config.TenantUserIdentityForCompany),
|
||||
)
|
||||
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 {
|
||||
@ -145,7 +146,7 @@ func (c *Company) Match(title string, industrys, keywords []string) ([]*CompanyM
|
||||
Keywords: v.GetKeywordAttribute(),
|
||||
})
|
||||
}
|
||||
return list, nil
|
||||
return &controller.ReturnPages{Data: list, Count: count}, nil
|
||||
}
|
||||
|
||||
func NewCompany() CompanyHandle {
|
||||
|
Reference in New Issue
Block a user