sunty
2019-11-20 c9f5e31201b49c886bfa44626ba9294f45c96627
update picmaxurl to operated and fix getinfobyid
2个文件已修改
19 ■■■■ 已修改文件
EsApi.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EsClient.go 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EsApi.go
@@ -60,7 +60,7 @@
                        }]
                    }
                },
                "_source":["faceFeature"]
                "_source":["targetInfo.feature"]
            }
        `
    buf, err := EsReq("POST", "http://"+serverIp+":"+serverPort+"/"+indexName+"/_search", []byte(jsonDSL))
@@ -72,8 +72,8 @@
    if err != nil {
        return "", err
    }
    faceFeature := sources[0]["faceFeature"].(string)
    return faceFeature, nil
    feature := sources[0]["targetInfo"].([]interface{})[0].(map[string]interface{})["feature"].(string)
    return feature, nil
}
//根据抓拍人员id更新(videourl)摄像机地址
EsClient.go
@@ -108,7 +108,12 @@
        tmpinfo.TaskId, ok = source["taskId"].(string)
        tmpinfo.TaskName, ok = source["taskName"].(string)
        tmpinfo.SdkName, ok = source["sdkName"].(string)
        tmpinfo.PicMaxUrl, ok = source["picMaxUrl"].(string)
        if source["picMaxUrl"] != nil {
            for _,v := range source["picMaxUrl"].([]interface{}) {
                tmpinfo.PicMaxUrl = append(tmpinfo.PicMaxUrl, v.(string))
            }
        }
        tmpinfo.VideoUrl, ok = source["videoUrl"].(string)
        tmpinfo.PicDate, ok = source["picDate"].(string)
        if source["targetInfo"] != nil {
@@ -202,7 +207,11 @@
                lti.TaskId, ok = lm["taskId"].(string)
                lti.TaskName, ok = lm["taskName"].(string)
                lti.SdkName, ok = lm["sdkName"].(string)
                lti.PicMaxUrl, ok = lm["picMaxUrl"].(string)
                if lm["picMaxUrl"] != nil {
                    for _,v := range lm["picMaxUrl"].([]interface{}) {
                        lti.PicMaxUrl = append(lti.PicMaxUrl, v.(string))
                    }
                }
                lti.VideoUrl, ok = lm["videoUrl"].(string)
                lti.PicDate, ok = lm["picDate"].(string)
                if lm["targetInfo"] != nil {