feat:完善项目信息

This commit is contained in:
henry
2022-01-04 15:04:37 +08:00
parent e29371da3e
commit 40841a4a27
10 changed files with 496 additions and 11 deletions

View File

@ -30,7 +30,7 @@ func (this *ESManage) Create() error {
return es.Create(this.Index(), _bytes)
}
func (this *ESManage) Search(page, pageSize int) (interface{}, error) {
func (this *ESManage) Search(page, pageSize int, params map[string]interface{}) (interface{}, error) {
termParams := make(map[string]interface{}, 0)
shouldParams := make(map[string]interface{}, 0)
@ -46,6 +46,11 @@ func (this *ESManage) Search(page, pageSize int) (interface{}, error) {
if this.Research != "" {
shouldParams["research"] = this.Research
}
if len(params) > 0 {
for k, v := range params {
shouldParams[k] = v
}
}
out, err := es.Search(this, this.Index(), &es.SearchParams{
TermParams: termParams,
ShouldParams: shouldParams,