| | |
| | | Location: fmt.Sprintf("%s%s%s", domains[record.CommunityId].Name, record.Building, record.Floor), |
| | | Building: record.Building, |
| | | Floor: record.Floor, |
| | | PicDate: time.Unix(int64(record.PicDate), 0).Format("2006-01-02 15:04:05"), |
| | | PicDate: time.Unix(int64(record.PicDate/1000), 0).Format("2006-01-02 15:04:05"), |
| | | //PicDate: , |
| | | FirstPersonID: record.DocumentNumbers[0], |
| | | } |
| | |
| | | if floorBuckets, ok := locationBucket.(map[string]interface{})["floor"].(map[string]interface{})["buckets"].([]interface{}); ok { |
| | | for _, floorBucket := range floorBuckets { |
| | | floor := floorBucket.(map[string]interface{})["key"].(string) |
| | | logger.Debugf("floor--------------------------------------- %s -----%s ", floor, floorBucket) |
| | | //logger.Debugf("floor--------------------------------------- %s -----%s ", floor, floorBucket) |
| | | appearCount := floorBucket.(map[string]interface{})["doc_count"].(float64) |
| | | //logger.Debugf("appearCount--------------------------------------- %s- --", appearCount) |
| | | // 构建 LocationRecord 结构体 |