feat:完善项目信息
This commit is contained in:
@ -2,6 +2,7 @@ package search
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/website/model"
|
||||
"SciencesServer/app/basic/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
)
|
||||
@ -18,14 +19,14 @@ type (
|
||||
)
|
||||
|
||||
// searchPatent 专利搜索
|
||||
func searchPatent(page, pageSize int, keyword, industry string, params map[string]interface{}) (interface{}, error) {
|
||||
func searchPatent(page, pageSize int, keyword, industry string, params map[string]interface{}) (*controller.ReturnPages, error) {
|
||||
manage := service.NewESPatent(
|
||||
service.WithPatentTitle(keyword),
|
||||
)
|
||||
if industry != "" {
|
||||
service.WithPatentIndustry(industry)(manage)
|
||||
}
|
||||
out, err := manage.Search(page, pageSize)
|
||||
out, count, err := manage.Search(page, pageSize)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -55,5 +56,5 @@ func searchPatent(page, pageSize int, keyword, industry string, params map[strin
|
||||
ID: v.GetEncodeID(), Kind: v.Kind, Title: v.Title, ApplyAt: v.ApplyAt, Description: v.Description,
|
||||
})
|
||||
}
|
||||
return list, nil
|
||||
return &controller.ReturnPages{Data: list, Count: count}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user