| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 事件推送保存 |
| | | // @Description 事件推送保存 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param SaveArgs body controllers.EventPushVo true "时间推送保存参数" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/save [post] |
| | | */ |
| | | func (epc EventPushController) Save(c *gin.Context) { |
| | | var saveBody EventPushVo |
| | | if err := c.BindJSON(&saveBody); err != nil { |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 根据事件推送主题的一级和二级选项获取最后下拉菜单列表 |
| | | // @Description 根据事件推送主题的一级和二级选项获取最后下拉菜单列表 |
| | | // @Accept x-www-form-urlencoded |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param topic query string true "一级主题选项,例如:camera(摄像机)" |
| | |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/findByEventTopic [get] |
| | | */ |
| | | func (epc EventPushController) FindByEventTopic(c *gin.Context) { |
| | | topic := c.Query("topic") |
| | | childType := c.Query("type") |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 查全部 |
| | | // @Description 查全部 |
| | | // @Accept x-www-form-urlencoded |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param name query string false "事件名称" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/findAll [get] |
| | | */ |
| | | func (controller EventPushController) FindAll(c *gin.Context) { |
| | | name := c.Query("name") |
| | | var api dbapi.EventPushApi |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 事件推送编辑 |
| | | // @Description 事件推送编辑 |
| | | // @Accept x-www-form-urlencoded |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param id query string true "id" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/getById [get] |
| | | */ |
| | | func (controller EventPushController) GetById(c *gin.Context) { |
| | | id := c.Query("id") |
| | | if id == "" { |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 改变enable状态 |
| | | // @Description 改变enable状态 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param statusBody body controllers.ChangeStatusVo true "参数结构" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/changeStatus [post] |
| | | */ |
| | | func (controller EventPushController) ChangeStatus(c *gin.Context) { |
| | | var statusBody ChangeStatusVo |
| | | err := c.BindJSON(&statusBody) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Security ApiKeyAuth |
| | | // @Summary 根据id删除 |
| | | // @Description 根据id删除 |
| | | // @Accept x-www-form-urlencoded |
| | | // @Produce json |
| | | // @Tags 事件推送 |
| | | // @Param id query string true "id" |
| | | // @Param id formData string true "id" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/eventPush/delete [post] |
| | | */ |
| | | func (controller EventPushController) Delete(c *gin.Context) { |
| | | id := c.PostForm("id") |
| | | if id == "" { |