From 9d88c7c467f8d93af4aab9ba0b6d6c01c2ffc546 Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期四, 20 八月 2020 20:35:30 +0800
Subject: [PATCH] add get buckets contrl

---
 controllers/fileAnalysisSetting.go |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/controllers/fileAnalysisSetting.go b/controllers/fileAnalysisSetting.go
index b7d7628..35aedc7 100644
--- a/controllers/fileAnalysisSetting.go
+++ b/controllers/fileAnalysisSetting.go
@@ -11,12 +11,25 @@
 
 }
 
-
+// @Security ApiKeyAuth
+// @Summary 鑾峰彇鏈湴鏂囦欢寮�鍏宠缃�
+// @Description 鑾峰彇鏈湴鏂囦欢寮�鍏宠缃�
+// @Produce json
+// @Tags 鏈湴鏂囦欢
+// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
+// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
+// @Router /data/api-v/fileSetting/show [get]
 func (fsc FileAnalysisSettingController) Show(c *gin.Context) {
 	var api dbapi.FileAnalysisApi
 	setting, err := api.GetFileAnalysisSet()
 	if err == nil {
-		util.ResponseFormat(c,code.Success, setting)
+		util.ResponseFormat(c,code.Success, map[string]interface{}{
+			"videoEnable": setting.VideoEnable,
+			"fileDirectory": setting.FileDirectory,
+			"videoChannelCount": setting.VideoChannelCount,
+			"imgChannelCount": setting.ImgChannelCount,
+			"audioChannelCount": setting.AudioChannelCount,
+		})
 	} else {
 		util.ResponseFormat(c,code.ComError, setting)
 	}
@@ -26,6 +39,16 @@
 	Enable bool 	`json:"enable"`
 }
 
+// @Security ApiKeyAuth
+// @Summary 鍒囨崲鏈湴鏂囦欢鍒嗘瀽寮�鍏�
+// @Description 鍒囨崲鏈湴鏂囦欢鍒嗘瀽寮�鍏�
+// @Accept json
+// @Produce json
+// @Tags 鏈湴鏂囦欢
+// @Param reqBody body controllers.EnableSet 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/fileSetting/changeEnable [post]
 func (fsc FileAnalysisSettingController) ChangeEnable(c *gin.Context) {
 	var reqBody EnableSet
 	c.BindJSON(&reqBody)

--
Gitblit v1.8.0