feat:优化项目信息

This commit is contained in:
henry
2022-02-09 11:06:59 +08:00
parent 1cec70ebee
commit 2d8be509b7
15 changed files with 217 additions and 285 deletions

View File

@ -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)