feat:完善项目信息
This commit is contained in:
@ -2,7 +2,6 @@ package service
|
||||
|
||||
import (
|
||||
"SciencesServer/serve/es"
|
||||
"SciencesServer/serve/logger"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
@ -28,7 +27,7 @@ func (this *ESPatent) Update() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *ESPatent) Search(page, pageSize int) (interface{}, error) {
|
||||
func (this *ESPatent) Search(page, pageSize int) (interface{}, int64, error) {
|
||||
termParams := make(map[string]interface{}, 0)
|
||||
mustParams := make(map[string]interface{}, 0)
|
||||
|
||||
@ -38,15 +37,10 @@ func (this *ESPatent) Search(page, pageSize int) (interface{}, error) {
|
||||
if this.Industry != "" {
|
||||
termParams["industry"] = this.Industry
|
||||
}
|
||||
out, err := es.Search(this, this.Index(), &es.SearchParams{
|
||||
return es.Search(this, this.Index(), &es.SearchParams{
|
||||
TermParams: termParams,
|
||||
MustParams: mustParams,
|
||||
}, page, pageSize)
|
||||
|
||||
if err != nil {
|
||||
logger.ErrorF("查询ES信息错误:【%s】", err)
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func WithPatentID(id uint64) ESPatentOption {
|
||||
|
Reference in New Issue
Block a user