---
panlei
2019-11-19 1fac78f3b6e21aff0946a151dda83f4530b6d1c7
insertdata/insertDataToEs.go
@@ -49,8 +49,8 @@
   Content         string                `json:"content"`
   AlarmRules      []AlarmRule           `json:"alarmRules"`
   LikeDate        string                `json:"likeDate"`
   ShowLables      string                `json:"showLables"`
   OtherLables     string                `json:"otherLables"`
   ShowLabels      string                `json:"showLabels"`
   OtherLabels     string                `json:"otherLabels"`
   VideoUrl        string                `json:"videoUrl"`
   AnalyServerId   string                `json:"analyServerId"`
   AnalyServerName string                `json:"analyServerName"`
@@ -79,8 +79,8 @@
   Content         string                `json:"content"`
   AlarmRules      []AlarmRule           `json:"alarmRules"`
   LikeDate        string                `json:"likeDate"`
   ShowLables      string                `json:"showLables"`
   OtherLables     string                `json:"otherLables"`
   ShowLabels      string                `json:"showLabels"`
   OtherLabels     string                `json:"otherLabels"`
   VideoUrl        string                `json:"videoUrl"`
   AnalyServerId   string                `json:"analyServerId"`
   AnalyServerName string                `json:"analyServerName"`
@@ -97,7 +97,7 @@
type Target struct {
   TargetId       string  `json:"targetId"`
   TargetScore    float64 `json:"targetScore"`
   FaceFeature    string  `json:"faceFeature"`
   FaceFeature    string  `json:"feature"`
   PicSmUrl       string  `json:"picSmUrl"`
   TargetLocation Points  `json:"targetLocation"`
}
@@ -164,8 +164,7 @@
      panic("配置文件不合法")
   }
   weedfsUrl = "http://" + localConfig1.WebPicIp + ":" + strconv.Itoa(int(localConfig1.WebPicPort)) + "/submit"
   videoPersonUrl = "http://" + localConfig1.AlarmIp + ":" + strconv.Itoa(int(localConfig1.AlarmPort)) + "/" + EsInfo.EsIndex.VideoPersons.IndexName + "/" + EsInfo.EsIndex.VideoPersons.IndexType
   personAction = "http://" + localConfig1.AlarmIp + ":" + strconv.Itoa(int(localConfig1.AlarmPort)) + "/" + EsInfo.EsIndex.Personaction.IndexName + "/" + EsInfo.EsIndex.Personaction.IndexType
   videoPersonUrl = "http://" + localConfig1.AlarmIp + ":" + strconv.Itoa(int(localConfig1.AlarmPort)) + "/" + EsInfo.EsIndex.AIOcean.IndexName + "/" + EsInfo.EsIndex.AIOcean.IndexType
   InsertFace(msg)
   InsertYolo(msg)
   InsertTarget(msg)
@@ -465,7 +464,7 @@
               logger.Info("json parse error ", err)
               return
            }
            resp1, err2 := EsReq("POST", personAction, requstbody)
            resp1, err2 := EsReq("POST", videoPersonUrl, requstbody)
            if err2 != nil {
               logger.Error("往ES插入数据失败", err)
            } else {
@@ -626,7 +625,7 @@
                  logger.Info("json parse error ", err)
                  return
               }
               resp1, err2 := EsReq("POST", personAction, requstbody)
               resp1, err2 := EsReq("POST", videoPersonUrl, requstbody)
               if err2 != nil {
                  logger.Error("往ES插入数据失败", err)
               } else {