From 11f5369e44c2ff32967b215d9884f9cac6f2a9cd Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期三, 25 九月 2019 18:09:46 +0800 Subject: [PATCH] add compare result search person id filter option --- controllers/monitoring.go | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/controllers/monitoring.go b/controllers/monitoring.go index 70414ea..8586698 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" @@ -45,7 +44,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 +52,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