From 262c28082842d9f487f187075da0ce7a6ed3b31d Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 29 十月 2019 17:24:09 +0800
Subject: [PATCH] GetAllLocalVideopersonsId add alarmLevelTypes filter

---
 controllers/fileController.go |    3 ++-
 go.sum                        |    4 ++--
 go.mod                        |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/controllers/fileController.go b/controllers/fileController.go
index dd13cd0..ecdc766 100644
--- a/controllers/fileController.go
+++ b/controllers/fileController.go
@@ -561,7 +561,8 @@
 			arg.InputValue = searchBody.InputValue
 			arg.Collection = searchBody.Collection
 			arg.AnalyServerId = localConf.ServerId
-			captureIds := esApi.GetAllLocalVideopersonsId(arg, config.EsInfo.EsIndex.VideoPersons.IndexName, localConf.AlarmIp, strconv.Itoa(int(localConf.AlarmPort)))
+			alarmLevelTypes := strings.Replace(strings.Trim(fmt.Sprint(getAlarmLevel(searchBody.AlarmLevel)), "[]"), " ", "\",\"", -1)
+			captureIds := esApi.GetAllLocalVideopersonsId(arg, config.EsInfo.EsIndex.VideoPersons.IndexName, localConf.AlarmIp, strconv.Itoa(int(localConf.AlarmPort)), alarmLevelTypes)
 			logger.Debug("searchPhoto first Result.len:",len(*co.CompareData),"twice len(captureIds):",len(captureIds))
 			if captureIds !=nil {
 				var aResult protomsg.SdkCompareResult
diff --git a/go.mod b/go.mod
index d6feba4..ee4e5ce 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@
 	basic.com/dbapi.git v0.0.0-20191029073251-acc3826d096d // indirect
 	basic.com/fileServer/WeedFSClient.git v0.0.0-20190919054037-0182b6c3f5cb // indirect
 	basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48 // indirect
-	basic.com/pubsub/esutil.git v0.0.0-20191029031958-4ab66414c6d1 // indirect
+	basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6 // indirect
 	basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745
 	basic.com/valib/capture.git v0.0.0-20190924061718-7e98d8c98b3c // indirect
 	basic.com/valib/deliver.git v0.0.0-20190531095353-25d8c3b20051
diff --git a/go.sum b/go.sum
index 79b82c4..159f81f 100644
--- a/go.sum
+++ b/go.sum
@@ -4,8 +4,8 @@
 basic.com/fileServer/WeedFSClient.git v0.0.0-20190919054037-0182b6c3f5cb/go.mod h1:FTryK8BsVLfUplx8a3+l8hJWub6VbAWZCUH7sPRZaso=
 basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48 h1:BBA30Rgljn6MRieC4gUncETJDyna3ObyubTo9HEQ2M0=
 basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48/go.mod h1:gHLJZz2ee1cGL0X0ae69fs56bAxkDgEQwDhhXZJNUcY=
-basic.com/pubsub/esutil.git v0.0.0-20191029031958-4ab66414c6d1 h1:mfMti1ktfWQ8xxytOYpwt8lb8fLuCqvISpSHEd73Peg=
-basic.com/pubsub/esutil.git v0.0.0-20191029031958-4ab66414c6d1/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw=
+basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6 h1:HNdnjoaOpLJvyNzUPD2Yx9tLsS7unR19O+0ZYviW2II=
+basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw=
 basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745 h1:NQ/172pylwH5BnVwt4vlrXVN+UDn8YJc+5V2ZPaC4P0=
 basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745/go.mod h1:un5NV5VWQoblVLZfx1Rt5vyLgwR0jI92d3VJhfrJhWU=
 basic.com/valib/capture.git v0.0.0-20190924061718-7e98d8c98b3c h1:aNujtcGxq0cNLSK08cCamAiUYiQ2/ZsUMNXbX2w8Clc=

--
Gitblit v1.8.0