---
panlei
2019-07-12 29dab16f1e57d799e2589524bd932e418cbc6a44
insertdata/insertDataToEs.go
@@ -101,7 +101,6 @@
func InsertToEs(msg ruleserver.ResultMsg) {
   // 直接从规则的标签数据里拿符合规则的人脸结果
   //logger.Info("------------------------------------从配置文件读取的值:",weedfsUrl)
   if msg.RuleResult["face"] != nil && len(msg.RuleResult["face"].([]ruleserver.Arg)) > 0 {
      logger.Info("往ES插人脸数据")
      for _, face := range msg.RuleResult["face"].([]ruleserver.Arg) {
@@ -135,7 +134,6 @@
            }
            i := protomsg.Image{}
            err = proto.Unmarshal(bdata, &i)
            logger.Info("-------------------------------------------看下宽和高", int(face.Location.X),int(face.Location.Y),int(face.Location.X+face.Location.Width),int(face.Location.Y+face.Location.Height))
            bytes := util.SubImg(i, int(face.Location.X), int(face.Location.Y), int(face.Location.X+face.Location.Width), int(face.Location.Y+face.Location.Height))
            resp, err := util.PostFormBufferData1(weedfsUrl, bytes, uuid.NewV4().String())
            if err != nil {
@@ -268,9 +266,7 @@
            }
            err = EsReq("POST", "http://192.168.1.182:9200/videopersons/perVideoPicture", requstbody)
            logger.Info("跟底库的相似数据---------:", face.Liker)
            fmt.Println("------------------------------------------哈哈哈哈,底库有人")
            logger.Info("------------------------------------------哈哈哈哈,底库有人")
         }
      }