From 06cfa3a6a024de4c67e9b0ec631e2a2720f76256 Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期五, 16 八月 2019 13:40:27 +0800 Subject: [PATCH] 地址存全路径 --- insertdata/insertDataToEs.go | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/insertdata/insertDataToEs.go b/insertdata/insertDataToEs.go index 07614d8..30d4117 100644 --- a/insertdata/insertDataToEs.go +++ b/insertdata/insertDataToEs.go @@ -9,7 +9,6 @@ "net" "ruleprocess/cache" "ruleprocess/logger" - "strings" "time" "basic.com/pubsub/protomsg.git" @@ -205,7 +204,7 @@ if err != nil { logger.Error("涓婁紶灏忓浘鍑洪敊") } - logger.Info("================灏忓浘鍦板潃:", resp["fileUrl"].(string)) + //logger.Info("================灏忓浘鍦板潃:", resp["fileUrl"].(string)) sex := "" if face.ThftRes.Gender == 1 { sex = "鐢�" @@ -224,7 +223,7 @@ msg.Cid, camera.Addr, i.Timestamp, - strings.Split(bigPhotoUrl["fileUrl"].(string), "/")[1], + bigPhotoUrl["fileUrl"].(string), msg.Tasklab.Taskid, msg.Tasklab.Taskname, "浜鸿劯", @@ -238,7 +237,7 @@ face.ThftRes.Smile, face.ThftRes.Beauty, base64.StdEncoding.EncodeToString(face.Feature), - []string{strings.Split(resp["fileUrl"].(string), "/")[1]}, + []string{resp["fileUrl"].(string)}, "鏆傛棤闆嗙兢", localConfig.ServerId, localConfig.ServerName, @@ -362,7 +361,7 @@ } else { logger.Info("涓婁紶鐨勫浘鐗囦俊鎭細", resp1) } - url = append(url, strings.Split(resp1["fileUrl"].(string), "/")[1]) + url = append(url, resp1["fileUrl"].(string)) } } } @@ -421,7 +420,7 @@ } serverIp, err := GetLocalIP() - url = append(url, strings.Split(resp["fileUrl"].(string), "/")[1]) + url = append(url, resp["fileUrl"].(string)) esDataId := uuid.NewV4().String() linksId := "" if linkId != "" { @@ -516,7 +515,7 @@ localConfig.ServerName, serverIp, "", - []string{strings.Split(resp["fileUrl"].(string), "/")[1]}, + []string{resp["fileUrl"].(string)}, i.Timestamp, "", "", @@ -574,7 +573,7 @@ msg.Cid, camera.Addr, i.Timestamp, - strings.Split(bigPhotoUrl["fileUrl"].(string), "/")[1], + bigPhotoUrl["fileUrl"].(string), msg.Tasklab.Taskid, msg.Tasklab.Taskname, "浜鸿劯", -- Gitblit v1.8.0