feat:完善项目信息

This commit is contained in:
henry
2021-12-24 12:00:18 +08:00
parent ebf74435ef
commit f654b0a4f0
9 changed files with 248 additions and 17 deletions

View File

@ -47,3 +47,28 @@ func (*Manage) CompanyProduct(c *gin.Context) {
data, err := manage.NewCompany()(nil).Product((&api.IDStringForm{ID: form.CompanyID}).Convert(), form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}
func (*Manage) Expert(c *gin.Context) {
form := &struct {
ExpertID string `json:"expert_id" form:"expert_id" binding:"required"`
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := manage.NewExpert()(nil).Instance((&api.IDStringForm{ID: form.ExpertID}).Convert())
api.APIResponse(err, data)(c)
}
func (*Manage) ExpertAchievement(c *gin.Context) {
form := &struct {
ExpertID string `json:"expert_id" form:"expert_id" binding:"required"`
api.PageForm
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := manage.NewExpert()(nil).Achievement((&api.IDStringForm{ID: form.ExpertID}).Convert(), form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}