feat:完善项目信息
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user