panlei
2019-07-03 333a9c6a715acae04f3d0dcb06d7d711df68ba7f
人脸加上摄像机地址
1个文件已修改
7 ■■■■ 已修改文件
insertdata/insertDataToEs.go 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
insertdata/insertDataToEs.go
@@ -124,6 +124,11 @@
                if err != nil {
                    panic("解压缩图片时出现错误")
                }
                // 查询cameraName
                camera, err := cache.GetCameraById(msg.Cid)
                if err != nil {
                    log.Println("查询摄像机信息失败")
                }
                i := protomsg.Image{}
                err = proto.Unmarshal(bdata, &i)
                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))
@@ -134,7 +139,7 @@
                pervideo := PerVideoPicture{
                    uuid.NewV4().String(),
                    msg.Cid,
                    msg.Caddr,
                    camera.Addr,
                    time.Now().Format("2006-01-02 15:04:05"),
                    strings.Split(bigPhotoUrl["fileUrl"].(string), "/")[1],
                    msg.Tasklab.Taskid,