liuxiaolong
2019-08-22 68fc51cb635fecf12cad58deab88c3b5e0afc0ad
controllers/cameraTimerule.go
@@ -29,16 +29,7 @@
   Start string `json:"start"`//开始
   End   string `json:"end"`//结束
}
//
// @Summary 时间规则保存
// @Description 时间规则保存
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @Param  cameraTimerule body controllers.CameraTimeruleVo  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/cameraTimerule/save [post]
func (controller CameraTimeruleController) Save(c *gin.Context) {
   var vo CameraTimeruleVo
   err := c.BindJSON(&vo)
@@ -62,15 +53,7 @@
   util.ResponseFormat(c,code.ComError,"保存失败")
}
// @Summary 删除时间规则
// @Description 删除时间规则
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @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/cameraTimerule/delete [get]
func (controller CameraTimeruleController) Delete(c *gin.Context) {
   id := c.Query("id")
   if id == "" {
@@ -85,14 +68,7 @@
   util.ResponseFormat(c, code.ComError, "删除失败")
}
// @Summary 查找所有时间规则
// @Description 查找所有时间规则
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:"成功信息"}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/cameraTimerule/findAll [get]
func (controller CameraTimeruleController) FindAll(c *gin.Context) {
   var api dbapi.CameraApi
   result, data := api.FindAllTimeRules()