From 7c811247ecf143e08c576986a884bedadc57dd66 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 05 六月 2020 18:29:41 +0800
Subject: [PATCH] add refresh token to resp

---
 controllers/monitoring.go |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/controllers/monitoring.go b/controllers/monitoring.go
index ee186fd..d18673a 100644
--- a/controllers/monitoring.go
+++ b/controllers/monitoring.go
@@ -49,9 +49,9 @@
 	}
 	//璇锋眰澶�
 	localConf, err2 := cache.GetServerInfo()
-	if err2 !=nil || localConf.AlarmIp == "" || localConf.ServerId == "" {
+	if err2 != nil || localConf.AlarmIp == "" || localConf.ServerId == "" {
 		logger.Debug("localConfig is wrong!!!")
-		util.ResponseFormat(c,code.ComError,"localConf wrong")
+		util.ResponseFormat(c, code.ComError, "localConf wrong")
 		return
 	}
 	url := "http://" + localConf.AlarmIp + ":" + strconv.Itoa(int(localConf.AlarmPort)) +
@@ -73,12 +73,12 @@
 		linkTagInfoAnalyServerFilterStr +
 		"{\"range\":{\"linkTagInfo.picDate\":{\"gte\":\"now+8h-15s\",\"lt\":\"now+8h\"}}}" +
 		"]}}" +
-		"]}}," +
+		"],\"minimum_should_match\":1}}," +
 		"\"sort\":[{\"picDate\":{\"order\":\"desc\"}}]," +
 		"\"size\":\"1000\"," +
 		"\"_source\":{\"includes\":[],\"excludes\":[\"*.feature\"]}}"
-	fmt.Println(prama)
-	fmt.Println(url)
+	logger.Debug("monitor param:", prama)
+	logger.Debug("monitor url:", url)
 	tokenRes := esutil.GetEsDataReq(url, prama, true)
 	/*	for _, value := range tokenRes["datalist"].([]interface{}) {
 		if value.(map[string]interface{})["personId"] != nil {
@@ -88,5 +88,6 @@
 			}
 		}
 	}*/
-	util.ResponseFormat(c, code.Success, tokenRes)
+	tmpAllDate := esutil.ResponseData(tokenRes)
+	util.ResponseFormat(c, code.Success, tmpAllDate)
 }

--
Gitblit v1.8.0