| | |
| | | "encoding/json" |
| | | "fmt" |
| | | "strconv" |
| | | "webserver/extend/logger" |
| | | |
| | | "github.com/gin-gonic/gin" |
| | | |
| | |
| | | Name string `json:"name"` |
| | | Type int `json:"type" ` |
| | | Addr string `json:"addr"` |
| | | Areaid uint `json:"areaid"` |
| | | Longitude float64 `json:"longitude"` |
| | | Latitude float64 `json:"latitude"` |
| | | Areaid string `json:"areaid"` |
| | | Longitude float32 `json:"longitude"` |
| | | Latitude float32 `json:"latitude"` |
| | | Rtsp string `json:"rtsp"` |
| | | Ip string `json:"ip"` |
| | | Port int `json:"port"` |
| | |
| | | func (ac CameraController) CameraDel(c *gin.Context) { |
| | | var api dbapi.CameraApi |
| | | cid := c.Param("cid") |
| | | |
| | | logger.Debug("CameraDel.cid:",cid) |
| | | if api.CameraDelete(cid) { |
| | | util.ResponseFormat(c, code.Success, "删除成功") |
| | | return |
| | |
| | | // @Router /data/api-v/camera/updateSnapshotUrl/{cid} [get] |
| | | func(cc CameraController) UpdateSnapshotUrl(c *gin.Context){ |
| | | cid := c.Param("cid") |
| | | filename, err := service.UpdateSnapshotUrl(cid) |
| | | //filename, err := service.UpdateSnapshotUrl(cid) |
| | | filename, err := service.UpdateCapture(cid) |
| | | if err != nil { |
| | | logger.Debug("UpdateSnapshotUrl.err:",err) |
| | | util.ResponseFormat(c, code.ComError, "更新失败") |
| | | return |
| | | } |