package labelFilter import ( "basic.com/pubsub/protomsg.git" "ruleprocess/cache" "ruleprocess/logger" "ruleprocess/ruleserver" ) type Label struct { CameraId string CameraName string CameraAddr string TaskId string Persons []*Person DefenceLevel string } type Person struct { Id string Level string Gender string Age int Race string Likers []*protomsg.Baseinfo } func DataFormatToLabel(result ruleserver.ResultMsg) Label { labelData := Label{} labelData.CameraId = result.Cid camera, err := cache.GetCameraById(result.Cid) if err != nil { logger.Error("查询摄像机信息出错") } labelData.CameraName = camera.Name labelData.CameraAddr = camera.Addr labelData.TaskId = result.Tasklab.Taskid return Label{} }