feat:完善项目信息

This commit is contained in:
henry
2022-01-04 11:59:58 +08:00
parent c3da1ebc51
commit e29371da3e
20 changed files with 357 additions and 62 deletions

View File

@ -3,9 +3,7 @@ package service
import (
"SciencesServer/serve/es"
"SciencesServer/serve/logger"
"SciencesServer/utils"
"encoding/json"
"fmt"
)
type ESPatent struct {
@ -29,13 +27,11 @@ func (this *ESPatent) Search(page, pageSize int) (interface{}, error) {
termParams := make(map[string]interface{}, 0)
mustParams := make(map[string]interface{}, 0)
fmt.Println(utils.AnyToJSON(this))
if this.Title != "" {
mustParams["title"] = this.Title
}
if this.Industry != "" {
termParams["title"] = this.Industry
termParams["industry"] = this.Industry
}
out, err := es.Search(this, this.Index(), &es.SearchParams{
TermParams: termParams,