feat:完善项目
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user