| | |
| | | // @Param area body controllers.AreaVo true "区域结构" |
| | | // @Success 200 {string} json "{"code":200, data:"",msg:"请求成功", success:true}" |
| | | // @Failure 200 {string} json "{"code":"错误码", data:"出错信息",msg:"请求失败", success:false}" |
| | | // @Router /data/api-v/area/update/{id} [put] |
| | | // @Router /data/api-v/area/update [post] |
| | | func (ac AreaController) AreaUpdate(c *gin.Context) { |
| | | var api dbapi.AreaApi |
| | | var model AreaVo |
| | |
| | | // @Param id query int true "当前id" |
| | | // @Success 200 {string} json "{"code":200, data:"删除的区域信息",msg:"请求成功", success:true}" |
| | | // @Failure 200 {string} json "{"code":"错误码", data:"出错信息",msg:"请求失败", success:false}" |
| | | // @Router /data/api-v/area/del [get] |
| | | // @Router /data/api-v/area/del [post] |
| | | func (ac AreaController) AreaDelete(c *gin.Context) { |
| | | var api dbapi.AreaApi |
| | | id := c.Query("id") |
| | | id := c.PostForm("id") |
| | | areaId, err := strconv.Atoi(id) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.ComError, "传入非整形无法解析") |
| | | util.ResponseFormat(c, code.ComError, "参数有误") |
| | | return |
| | | } |
| | | |
| | |
| | | { |
| | | area.GET("/localmenu", areaController.CameraTree) |
| | | area.POST("/add", areaController.AreaAdd) |
| | | area.GET("/del", areaController.AreaDelete) |
| | | area.PUT("/update/:id", areaController.AreaUpdate) |
| | | area.POST("/del", areaController.AreaDelete) |
| | | area.POST("/update", areaController.AreaUpdate) |
| | | } |
| | | |
| | | //摄像机管理 |