feat:完善信息
This commit is contained in:
@ -439,6 +439,44 @@ func (a *Technology) DemandDelete(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) DemandService(c *gin.Context) {
|
||||
form := &struct {
|
||||
Title string `json:"title" form:"status"`
|
||||
api.PageForm
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewDemandService()(api.GetSession()(c).(*session.Enterprise)).Instance(form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Technology) DemandServiceDetail(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewDemandService()(api.GetSession()(c).(*session.Enterprise)).Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Technology) DemandServiceHandle(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.IDStringForm
|
||||
Status int `json:"status" form:"status" binding:"required"`
|
||||
Config string `json:"config" form:"config"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewDemandService()(api.GetSession()(c).(*session.Enterprise)).Handle(form.Convert(), form.Status, form.Config)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (a *Technology) Topic(c *gin.Context) {
|
||||
form := &struct {
|
||||
Status int `json:"status" form:"status"`
|
||||
|
Reference in New Issue
Block a user