panlei
2019-09-12 fb1b6c4f3eac63ad04f48be4a1e88a372799e95f
为调追踪把性别和年龄描述改为id和分值
1个文件已修改
9 ■■■■ 已修改文件
insertdata/insertDataToEs.go 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
insertdata/insertDataToEs.go
@@ -9,6 +9,7 @@
    "net"
    "ruleprocess/cache"
    "ruleprocess/logger"
    "strconv"
    "time"
    "basic.com/pubsub/protomsg.git"
@@ -206,6 +207,7 @@
                }
                //logger.Info("================小图地址:", resp["fileUrl"].(string))
                sex := ""
                logger.Info(sex)
                if face.ThftRes.Gender == 1 {
                    sex = "男"
                } else {
@@ -213,11 +215,14 @@
                }
                race := getRaceString(face.ThftRes.Race)
                ageDescription := getDescription(face.ThftRes.Age)
                logger.Info(ageDescription)
                esDataId := uuid.NewV4().String()
                linksId := ""
                if linkId != "" {
                    linksId = linkId
                }
                logger.Info("人脸的id:",strconv.FormatUint(face.Id, 10))
                logger.Info("人脸的分值:",face.Score)
                pervideo := PerVideoPicture{
                    esDataId,
                    msg.Cid,
@@ -230,9 +235,9 @@
                    "",
                    alarmRules,
                    time.Now().Format("2006-01-02 15:04:05"), // 只检测,没有比对时间
                    sex,
                    strconv.FormatUint(face.Id, 10),            //暂改为人脸id
                    face.ThftRes.Age,
                    ageDescription,
                    strconv.FormatFloat(face.Score, 'E', -1, 64), // 暂改为分值
                    race,
                    face.ThftRes.Smile,
                    face.ThftRes.Beauty,