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

@ -3,6 +3,7 @@ package search
import (
"SciencesServer/app/api/website/model"
"SciencesServer/app/basic/config"
"SciencesServer/app/basic/controller"
model2 "SciencesServer/app/common/model"
"SciencesServer/app/service"
config2 "SciencesServer/config"
@ -19,7 +20,7 @@ type (
)
// searchExpert 专家搜索
func searchExpert(page, pageSize int, keyword, industry string, params map[string]interface{}) (interface{}, error) {
func searchExpert(page, pageSize int, keyword, industry string, params map[string]interface{}) (*controller.ReturnPages, error) {
manage := service.NewESManage(
service.WithManageIdentity(config.TenantUserIdentityForExpert),
service.WithManageTitle(keyword),
@ -29,7 +30,7 @@ func searchExpert(page, pageSize int, keyword, industry string, params map[strin
if industry != "" {
service.WithManageIndustry(industry)(manage)
}
out, err := manage.Search(page, pageSize, nil)
out, count, err := manage.Search(page, pageSize, nil)
if err != nil {
return nil, err
@ -66,5 +67,5 @@ func searchExpert(page, pageSize int, keyword, industry string, params map[strin
Industrys: _industrys, Keywords: v.GetKeywordAttribute(),
})
}
return list, nil
return &controller.ReturnPages{Data: list, Count: count}, nil
}