tcp server 用于给andriod 客户端定时发送消息
liuxiaolong
2020-07-28 74f4798a0f8578aa4609cd05f57f19f43a115afc
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)