zhaoqingang
2025-02-10 3082a0156f6efddb78a597090c5459f9cdb8c5a6
models/locationAnalysis.go
@@ -402,9 +402,9 @@
                                 },
                                 "picDate": map[string]interface{}{ // 新增按 picDate 聚合
                                    "date_histogram": map[string]interface{}{
                                       "field":     "picDate",
                                       "interval":  "1d",     // 按天聚合
                                       "time_zone": "+08:00", // 设置时区
                                       "field": "picDate",
                                       //"interval":  "1d",     // 按天聚合
                                       //"time_zone": "+08:00", // 设置时区
                                    },
                                 },
                              },
@@ -467,7 +467,7 @@
                        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 结构体