From a527225f7f3cc93882aa870c20f0985d07d6fe92 Mon Sep 17 00:00:00 2001 From: sunty <suntianyu0923@163.com> Date: 星期四, 22 八月 2019 18:12:03 +0800 Subject: [PATCH] set yn main port 7100 --- controllers/capture.go | 20 ++++---------------- 1 files changed, 4 insertions(+), 16 deletions(-) diff --git a/controllers/capture.go b/controllers/capture.go index d74d6ae..441588b 100644 --- a/controllers/capture.go +++ b/controllers/capture.go @@ -17,12 +17,11 @@ // @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}" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" // @Router /data/api-v/realTime/capture [POST] -//瀹炴椂鎶撴媿 func (rc *RealTimeController) PostCapture(c *gin.Context) { searchBody := make(map[string]interface{}, 0) @@ -45,22 +44,11 @@ prama := "{\"query\":{\"bool\":{\"filter\":[" + cameraIdStr + 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\",\"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{}) { - if value.(map[string]interface{})["personId"] != nil { - info := getDBPersonInfo(value.(map[string]interface{})["personId"].(string)) - for key, val := range info { - //fmt.Println(value.(map[string]interface{})[key],val) - value.(map[string]interface{})[key] = val - - } - } - }*/ - util.ResponseFormat(c, code.Success, tokenRes) } -- Gitblit v1.8.0