From 74f4798a0f8578aa4609cd05f57f19f43a115afc Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 28 七月 2020 20:06:55 +0800
Subject: [PATCH] fix face to FaceDetect

---
 esutil/EsClient.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/esutil/EsClient.go b/esutil/EsClient.go
index 9d2e1c9..ea1a079 100644
--- a/esutil/EsClient.go
+++ b/esutil/EsClient.go
@@ -132,7 +132,7 @@
 			if len(tiArr) > 0 {
 				ti := tiArr[0]
 				d["picSmUrl"] = ti.PicSmUrl
-				if ti.TargetType == "face" {
+				if ti.TargetType == "FaceDetect" {
 					sLabelStr, ok := source["showLabels"]
 					if ok {
 						labelArr := strings.Split(sLabelStr.(string), "/")
@@ -296,7 +296,7 @@
 		mustNotStr = strings.Join(mustNotArr, ",")
 	}
 	param := "{\"query\":{\"bool\":{\"filter\":["+filterStr+"],\"must_not\":["+mustNotStr+"]}},\"size\":\""+sizeStr+"\",\"sort\":[{\"picDate\":{\"order\":\"desc\"}}]," +
-		"\"_source\":{\"includes\":[\"cameraAddr\",\"baseInfo\",\"targetInfo\",\"content\",\"id\",\"picMaxUrl\",\"picDate\",\"showLabels\",\"taskName\",\"sdkName\",\"videoUrl\",\"alarmRules\"],\"excludes\":[\"*.feature\",\"*.attachTarget\",\"*.targetLocation\",\"alarmRules\"]}" +
+		"\"_source\":{\"includes\":[\"cameraAddr\",\"baseInfo\",\"targetInfo\",\"content\",\"id\",\"picMaxUrl\",\"picDate\",\"showLabels\",\"taskName\",\"sdkName\",\"videoUrl\",\"alarmRules\"],\"excludes\":[\"*.feature\",\"*.attachTarget\",\"*.targetLocation\"]}" +
 		"}"
 	err, tokenRes := GetEsDataReq(url, param, true)
 

--
Gitblit v1.8.0