panlei
2019-07-08 d5fab9d5ff335edeb8cff771ad6e7ceac60e3af9
insertdata/insertDataToEs.go
@@ -117,12 +117,13 @@
            }
            i := protomsg.Image{}
            err = proto.Unmarshal(bdata, &i)
            logger.Info("-------------------------------------------看下宽和高", i.Width, i.Height)
            //logger.Info("-------------------------------------------看下宽和高", i.Width, i.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 {
               logger.Error("上传小图出错")
            }
            logger.Info("================小图地址:",resp["fileUrl"].(string))
            sex := ""
            if face.ThftRes.Gender == 1 {
               sex = "男"
@@ -149,7 +150,7 @@
               race,
               face.ThftRes.Smile,
               face.ThftRes.Beauty,
               "",
               string(face.Feature),
               []string{strings.Split(resp["fileUrl"].(string), "/")[1]},
               "暂无集群",
               localConfig.ServerId,
@@ -190,12 +191,13 @@
            }
            i := protomsg.Image{}
            err = proto.Unmarshal(bdata, &i)
            logger.Info("-------------------------------------------看下宽和高", i.Width, i.Height)
            //logger.Info("-------------------------------------------看下宽和高", i.Width, i.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 {
               logger.Error("上传小图出错")
            }
            logger.Info("================小图地址:",resp["fileUrl"].(string))
            sex := ""
            if face.ThftRes.Gender == 1 {
               sex = "男"