From cecfe3aafb8424e74b6b4fab0f212c88f025af18 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 13 十二月 2019 18:16:11 +0800
Subject: [PATCH] getDevInfo ret CutVideoLen
---
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