feat:优化项目信息
This commit is contained in:
@ -29,6 +29,24 @@ func (this *ESManage) Create() error {
|
||||
return es.Create(this.Index(), fmt.Sprintf("%d", this.ID), _bytes)
|
||||
}
|
||||
|
||||
func (this *ESManage) Update() error {
|
||||
_map := make(map[string]interface{}, 0)
|
||||
|
||||
if this.Title != "" {
|
||||
_map["title"] = this.Title
|
||||
}
|
||||
if this.Industry != "" {
|
||||
_map["industry"] = this.Industry
|
||||
}
|
||||
if this.Keyword != "" {
|
||||
_map["keyword"] = this.Keyword
|
||||
}
|
||||
if this.Research != "" {
|
||||
_map["research"] = this.Research
|
||||
}
|
||||
return es.Update(this.Index(), fmt.Sprintf("%d", this.ID), _map)
|
||||
}
|
||||
|
||||
func (this *ESManage) Search(page, pageSize int, params map[string]interface{}) (interface{}, int64, error) {
|
||||
termParams := make(map[string]interface{}, 0)
|
||||
shouldParams := make(map[string]interface{}, 0)
|
||||
|
Reference in New Issue
Block a user