feat:完善项目信息

This commit is contained in:
henry
2022-01-21 11:42:58 +08:00
parent dda20eb011
commit 1c027dd2d1
23 changed files with 125 additions and 113 deletions

View File

@ -85,6 +85,10 @@ func (*Technology) PatentBind(c *gin.Context) {
api.APIResponse(err)(c)
}
func (*Technology) PatentExamine(c *gin.Context) {
}
func (*Technology) PatentDelete(c *gin.Context) {
form := new(api.IDStringForm)
@ -239,13 +243,39 @@ func (*Technology) AchievementDelete(c *gin.Context) {
}
func (*Technology) Demand(c *gin.Context) {
form := &struct {
api.TenantIDStringForm
Title string `json:"title" form:"title"`
Kind int `json:"kind" form:"kind"`
api.PageForm
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := technology.NewDemand()(api.GetSession()(c).(*session.Admin)).Instance(form.Convert(), form.Title, form.Kind,
form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}
func (*Technology) DemandDetail(c *gin.Context) {
form := new(api.IDStringForm)
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := technology.NewDemand()(api.GetSession()(c).(*session.Admin)).Detail(form.Convert())
api.APIResponse(err, data)(c)
}
func (*Technology) DemandDelete() {
func (*Technology) DemandDelete(c *gin.Context) {
form := new(api.IDStringForm)
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
err := technology.NewDemand()(api.GetSession()(c).(*session.Admin)).Delete(form.Convert())
api.APIResponse(err)(c)
}