| | |
| | | "basic.com/dbapi.git" |
| | | "webserver/extend/code" |
| | | "webserver/extend/util" |
| | | "webserver/service" |
| | | ) |
| | | |
| | | type CameraController struct{} |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 更新底图 |
| | | // @Description 刷新底图 |
| | | // @Produce json |
| | | // @Tags camera |
| | | // @Param cid path 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/camera/updateSnapshotUrl/{cid} [get] |
| | | func(cc CameraController) UpdateSnapshotUrl(c *gin.Context){ |
| | | cid := c.Param("cid") |
| | | filename, err := service.UpdateSnapshotUrl(cid) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.ComError, "更新失败") |
| | | return |
| | | } |
| | | util.ResponseFormat(c, code.Success, filename) |
| | | } |
| | | |
| | | type CameraChangeRunVo struct { |
| | | CameraIds []string `json:"camera_ids"` |
| | | RunType int `json:"run_type"` |
| | |
| | | util.ResponseFormat(c, code.ComError, "更新失败") |
| | | } |
| | | } |
| | | |
| | | |