feat:优化信息,增加技术成果搜索

This commit is contained in:
henry
2021-12-22 17:16:13 +08:00
parent 4743481ef8
commit 8d3e84bef9
8 changed files with 238 additions and 1 deletions

View File

@ -60,3 +60,29 @@ func (*Technology) DemandDetail(c *gin.Context) {
data, err := technology.NewDemand()(nil).Detail(form.Convert())
api.APIResponse(err, data)(c)
}
func (*Technology) Achievement(c *gin.Context) {
form := &struct {
Title string `json:"title" form:"title"`
Industry string `json:"industry" form:"industry"`
api.PageForm
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := technology.NewAchievement()(nil).Instance(form.Title, form.Industry, form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}
func (*Technology) AchievementDetail(c *gin.Context) {
form := &struct {
api.IDStringForm
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := technology.NewAchievement()(nil).Detail(form.Convert())
api.APIResponse(err, data)(c)
}