sunty
2019-11-14 98ac3a8c6d249262afc7c6259024bf5760ecca0b
EsApi.go
@@ -240,13 +240,18 @@
//根据抓拍人员id更新(videourl)摄像机地址
func UpdateVideourlById(id string, videoUrl string, indexName string, serverIp string, serverPort string) (statu int) {
func UpdateVideourlById(id string, videoUrl string, indexName string, serverIp string, serverPort string,command int) (statu int) {
   var info interface{}
   url := "http://"+serverIp+":"+serverPort+"/"+indexName+"/_update_by_query?refresh=true"
   sourceStr :=  "ctx._source.videoUrl='" + videoUrl + "'"
   if command>=0  {
      sourceStr =  "ctx._source.linkTagInfo["+strconv.Itoa(command)+"].videoUrl='" + videoUrl + "'"
   }
   var videoUrlInfo = `
        {
          "script": {
            "source": "ctx._source.videoUrl='` + videoUrl + `'"
            "source": "`+ sourceStr + `"
          },
          "query": {
            "term": {