From 5e664037b47b68b1ba28e07cefcfcec2795fbeed Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期一, 22 七月 2019 14:20:22 +0800 Subject: [PATCH] add initForCaptureData controller add initForMonitoringData controller fix capture fix monitoring --- controllers/monitoring.go | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/monitoring.go b/controllers/monitoring.go index 4bae956..af8d7a7 100644 --- a/controllers/monitoring.go +++ b/controllers/monitoring.go @@ -16,7 +16,7 @@ // @Description 瀹炴椂鐩戞帶姣斿鏁版嵁 // @Accept json // @Produce json -// @Tags es +// @Tags realTime // @Param obj body map true "搴曞簱鏁版嵁" // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" // @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" @@ -34,7 +34,7 @@ cameraIdStr = "{\"terms\":{\"cameraId\":[\"" + esCameraId + "\"]}}," } //鍒ゆ柇浠诲姟ID - taskIdStr := "" + taskIdStr := "{\"terms\":{\"taskId\":[]}}," taskId := searchBody["tasks"].([]interface{}) if taskId != nil && len(taskId) > 0 { esTaskId := strings.Replace(strings.Trim(fmt.Sprint(taskId), "[]"), " ", "\",\"", -1) @@ -52,10 +52,10 @@ cameraIdStr + taskIdStr + analyServerFilterStr + - "{\"range\":{\"picDate\":{\"gte\":\"now+8h-5000s\",\"lt\":\"now+8h\"}}}]}}," + + "{\"range\":{\"picDate\":{\"gte\":\"now+8h-15s\",\"lt\":\"now+8h\"}}}]}}," + "\"sort\":[{\"picDate\":{\"order\":\"desc\"}}]," + "\"size\":\"1000\"," + - "\"_source\":[\"baseInfo\",\"gender\",\"indeviceName\",\"sdkType\",\"ageDescription\",\"content\",\"ID\",\"picAddress\",\"picMaxUrl\",\"picDate\",\"race\",\"videoNum\",\"picSmUrl\",\"taskName\",\"personIsHub\",\"IDCard\",\"videoIp\",\"cameraId\"]}" + "\"_source\":[\"baseInfo\",\"alarmRules\",\"sex\",\"analyServerName\",\"sdkName\",\"ageDescription\",\"content\",\"id\",\"cameraAddr\",\"picMaxUrl\",\"picDate\",\"race\",\"videoUrl\",\"picSmUrl\",\"taskName\",\"personIsHub\",\"isAlarm\",\"analyServerIp\",\"cameraId\"]}" fmt.Println(prama) tokenRes := esutil.GetEsDataReq(url, prama, true) /* for _, value := range tokenRes["datalist"].([]interface{}) { -- Gitblit v1.8.0