From 4d0e5b1e9f59ebba7f875c9a39a6ab84c9dde4b6 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 12 十一月 2019 20:24:24 +0800
Subject: [PATCH] update swagger

---
 controllers/monitoring.go |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/controllers/monitoring.go b/controllers/monitoring.go
index 70414ea..ccb3519 100644
--- a/controllers/monitoring.go
+++ b/controllers/monitoring.go
@@ -1,7 +1,6 @@
 package controllers
 
 import (
-	"basic.com/dbapi.git"
 	"basic.com/valib/logger.git"
 	"fmt"
 	"strconv"
@@ -15,6 +14,7 @@
 	"webserver/extend/util"
 )
 
+// @Security ApiKeyAuth
 // @Summary 瀹炴椂鐩戞帶
 // @Description 瀹炴椂鐩戞帶姣斿鏁版嵁
 // @Accept  json
@@ -45,7 +45,7 @@
 	}
 	//璇锋眰澶�
 	localConf, err2 := cache.GetServerInfo()
-	if err2 !=nil || localConf.AlarmIp == "" {
+	if err2 !=nil || localConf.AlarmIp == "" || localConf.ServerId == "" {
 		logger.Debug("localConfig is wrong!!!")
 		util.ResponseFormat(c,code.ComError,"localConf wrong")
 		return
@@ -53,9 +53,7 @@
 	url := "http://" + localConf.AlarmIp + ":" + strconv.Itoa(int(localConf.AlarmPort)) +
 		"/" + index + "/_search"
 
-	var setApi dbapi.SysSetApi
-	_, sysconf := setApi.GetServerInfo()
-	analyServerFilterStr := "{\"term\":{\"analyServerId\":\"" + sysconf.ServerId + "\"}},"
+	analyServerFilterStr := "{\"term\":{\"analyServerId\":\"" + localConf.ServerId + "\"}},"
 
 	prama := "{\"query\":{\"bool\":{\"filter\":[" +
 		cameraIdStr +

--
Gitblit v1.8.0