feat:完善项目

This commit is contained in:
henry
2022-01-18 09:20:18 +08:00
parent 8a97ec40d3
commit 478182dcb0
12 changed files with 161 additions and 30 deletions

View File

@ -4,6 +4,7 @@ import (
"SciencesServer/serve/es"
"SciencesServer/serve/logger"
"encoding/json"
"fmt"
)
type ESPatent struct {
@ -20,7 +21,11 @@ func (this *ESPatent) Index() string {
func (this *ESPatent) Create() error {
_bytes, _ := json.Marshal(this)
return es.Create(this.Index(), _bytes)
return es.Create(this.Index(), fmt.Sprintf("%d", this.ID), _bytes)
}
func (this *ESPatent) Update() error {
return nil
}
func (this *ESPatent) Search(page, pageSize int) (interface{}, error) {