From aaa7697d6ec77e03d96ce36ca66abcbbcf2bb7a3 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期二, 14 七月 2020 12:03:33 +0800 Subject: [PATCH] add ruleSo --- controllers/cameraRule.go | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/cameraRule.go b/controllers/cameraRule.go index 3cf4981..ba2fdc1 100644 --- a/controllers/cameraRule.go +++ b/controllers/cameraRule.go @@ -181,11 +181,11 @@ // @Summary 鏍规嵁鍒嗙粍id鍒犻櫎鎽勫儚鏈虹畻娉曡鍒� // @Description 鏍规嵁鍒嗙粍id鍒犻櫎鎽勫儚鏈虹畻娉曡鍒� // @Produce json -// @Tags CameraTaskArgs +// @Tags 鎽勫儚鏈鸿鍒� // @Param groupId 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/rule/deleteGroup/{groupId} [get] +// @Router /data/api-v/camera/rule/deleteGroup/{groupId} [delete] func (crc CameraRuleController) DeleteByGroup(c *gin.Context) { groupId := c.Param("groupId") if groupId == "" { @@ -195,6 +195,7 @@ var api dbapi.CameraRuleApi if api.DeleteByGroup(groupId) { util.ResponseFormat(c, code.Success, "鍒犻櫎鎴愬姛")//鎽勫儚鏈轰换鍔″弬鏁板垹闄ゅ畬浜� + } else { + util.ResponseFormat(c, code.ComError, "鍒犻櫎澶辫触") } - util.ResponseFormat(c, code.ComError, "鍒犻櫎澶辫触") } \ No newline at end of file -- Gitblit v1.8.0