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/syssetcont.go |   34 +++++++++++++++++++++++++++++++---
 1 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/controllers/syssetcont.go b/controllers/syssetcont.go
index 9275310..9bf8b56 100644
--- a/controllers/syssetcont.go
+++ b/controllers/syssetcont.go
@@ -16,6 +16,7 @@
 
 type LocalConfigVo struct {
 	Id                 string `json:"id"`
+
 	AlarmIp            string `json:"alarm_ip,omitempty" example:"192.168.1.182"`
 	AlarmPort          int    `json:"alarm_port,omitempty" example:"22122"`
 	AlarmThresholdType int    `json:"alarm_threshold_type"` //鎶ヨ闃堝�肩被鍨嬭缃細1:鎸夋渶楂樺垎,2:鎸夐槇鍊间互涓�
@@ -31,6 +32,16 @@
 	ServerType         int    `json:"server_type,omitempty" example:"1"`
 	Reserved           string `json:"reserved,omitempty" example:"1"`
 	RealMax            int    `json:"real_max"` //瀹炴椂澶勭悊鐨勬渶澶ц矾鏁�
+}
+
+type ServerConfigSaveVo struct {
+	ServiceIpType 		int   	`json:"serviceIpType"` //0:鏈満ip锛�1锛氭紓绉籭p
+	ServiceIp     		string 	`json:"serviceIp"`  //澶栭儴鏈嶅姟ip
+	Domain 				string  `json:"domain"` //鍩熷悕
+
+	ImgPort 			int     `json:"imgPort"` //鍥剧墖绔彛
+	VideoPort           int 	`json:"videoPort"`  //瑙嗛绔彛
+	AudioPort           int     `json:"audioPort"`  //闊抽绔彛
 }
 
 type Gb28181ConfigVo struct {
@@ -51,6 +62,21 @@
 	Interval  int    `json:"interval" example:"鑷姩鏍℃椂闂撮殧"`
 	NewTime   string `json:"newTime" example:"鎵嬪姩鎸囧畾鏃堕棿"`
 }
+
+/*
+// @Security ApiKeyAuth
+// @Summary 淇濆瓨瀵瑰鏈嶅姟ip銆佸綍鍍忔椂闀夸互鍙婇煶瑙嗛绔彛
+// @Description 淇濆瓨瀵瑰鏈嶅姟ip銆佸綍鍍忔椂闀夸互鍙婇煶瑙嗛绔彛
+// @Accept  json
+// @Produce json
+// @Tags sysset
+// @Param config body controllers.ServerConfigSaveVo true "鍙傛暟"
+// @Success 200 {string} json "{"code":200, msg:"", success:true}"
+// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
+// @Router /data/api-v/sysset/saveConfig [POST]
+func (sset SysSetController) SaveConfig(c *gin.Context) {
+
+}*/
 
 // @Security ApiKeyAuth
 // @Summary 瀛樺偍淇℃伅鏌ヨ
@@ -78,8 +104,8 @@
 // @Produce json
 // @Tags sysset
 // @Param config body controllers.LocalConfigVo true "鎶ヨ鍜屽瓨鍌ㄤ俊鎭暟鎹�"
-// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}"
-// @Failure 500 {string} json "{"code":500,  msg:"杩斿洖閿欒淇℃伅", success:false}"
+// @Success 200 {string} json "{"code":200, msg:"", success:true}"
+// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
 // @Router /data/api-v/sysset/alarmEdit [POST]
 func (sset SysSetController) AlarmEdit(c *gin.Context) {
 	var args LocalConfigVo
@@ -158,7 +184,7 @@
 func (sset SysSetController) GetDevInfo(c *gin.Context) {
 	var api dbapi.SysSetApi
 	b, sysconf := api.GetServerInfo()
-	resData := make(map[string]string, 0)
+	resData := make(map[string]interface{}, 0)
 	if !b { // 鏌ヨ鏄惁瀛樺湪
 		util.ResponseFormat(c, code.ServiceInsideError, "鏌ヨ澶辫触")
 	} else {
@@ -171,6 +197,8 @@
 		resData["subMask"] = mask
 		resData["gateway"] = gateway
 		resData["dns"] = dns
+		resData["min_video_len"] = sysconf.CutMinDuration
+		resData["max_video_len"] = sysconf.CutMaxDuration
 
 		resData["deviceNum"] = config.Server.DeviceNum
 		resData["deviceType"] = config.Server.DeviceType

--
Gitblit v1.8.0