feat:优化信息,增加技术成果搜索
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user