feat:完善项目信息
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user