feat:优化信息,完善es查询,完善网站首页公司信息查询
This commit is contained in:
@ -13,6 +13,7 @@ func (*ES) Create(c *gin.Context) {
|
||||
ID uint64 `json:"id" form:"id"`
|
||||
Identity int `json:"identity" form:"identity"`
|
||||
Title string `json:"title" form:"title"`
|
||||
Industry string `json:"industry" form:"industry"`
|
||||
Keyword string `json:"keyword" form:"keyword"`
|
||||
Research string `json:"research" form:"research"`
|
||||
}{}
|
||||
@ -20,12 +21,18 @@ func (*ES) Create(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
manage := service.NewESManage(
|
||||
service.WithManageID(form.ID),
|
||||
service.WithManageIdentity(form.Identity),
|
||||
service.WithManageTitle(form.Title),
|
||||
service.WithManageKeyword(form.Keyword),
|
||||
service.WithManageResearch(form.Research),
|
||||
//manage := service.NewESManage(
|
||||
// service.WithManageID(form.ID),
|
||||
// service.WithManageIdentity(form.Identity),
|
||||
// service.WithManageTitle(form.Title),
|
||||
// service.WithManageKeyword(form.Keyword),
|
||||
// service.WithManageResearch(form.Research),
|
||||
//)
|
||||
manage := service.NewESPatent(
|
||||
service.WithPatentID(form.ID),
|
||||
//service.WithManageIdentity(form.Identity),
|
||||
service.WithPatentTitle(form.Title),
|
||||
service.WithPatentIndustry(form.Industry),
|
||||
)
|
||||
api.APIResponse(manage.Create())(c)
|
||||
}
|
||||
@ -40,11 +47,15 @@ func (*ES) Search(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
manage := service.NewESManage(service.WithManageIdentity(form.Identity),
|
||||
service.WithManageTitle(form.Param),
|
||||
service.WithManageIndustry(form.Industry),
|
||||
service.WithManageKeyword(form.Param),
|
||||
service.WithManageResearch(form.Param))
|
||||
data, err := manage.Search(1, 1)
|
||||
//manage := service.NewESManage(service.WithManageIdentity(form.Identity),
|
||||
// service.WithManageTitle(form.Param),
|
||||
// service.WithManageIndustry(form.Industry),
|
||||
// service.WithManageKeyword(form.Param),
|
||||
// service.WithManageResearch(form.Param))
|
||||
manage := service.NewESPatent(
|
||||
service.WithPatentTitle(form.Param),
|
||||
service.WithPatentIndustry(form.Industry),
|
||||
)
|
||||
data, err := manage.Search(1, 10)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user