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 ESAchievement struct {
@ -24,7 +25,7 @@ func (this *ESAchievement) Create() error {
this.Title = this.Industry + " - " + this.Title
}
_bytes, _ := json.Marshal(this)
return es.Create(this.Index(), _bytes)
return es.Create(this.Index(), fmt.Sprintf("%d", this.ID), _bytes)
}
func (this *ESAchievement) Search(page, pageSize int) (interface{}, error) {