zhaoqingang
2025-02-10 c41ba2b25c89b5b2d7040f761792dabb327dfd5b
测试 场景分析 bug
1个文件已修改
44 ■■■■ 已修改文件
models/locationAnalysis.go 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/locationAnalysis.go
@@ -328,28 +328,28 @@
        filters = append(filters, addrParams)
    }
    //var queryTimes []map[string]interface{}
    for date := startTime; date.Before(nowTime); date = date.Add(24 * time.Hour) {
        start := time.Date(date.Year(), date.Month(), date.Day(), locationModel.StartTime, 0, 0, 0, date.Location())
        end := time.Date(date.Year(), date.Month(), date.Day(), locationModel.EndTime, 0, 0, 0, date.Location())
        //queryTimes = append(queryTimes, map[string]interface{}{
        //    "range": map[string]interface{}{
        //        "picDate": map[string]interface{}{
        //            "gte": start.Format(time.DateTime), // "2006-01-02 15:04:05d"
        //            "lte": end.Format(time.DateTime),
        //        },
        //    },
        //})
        filters = append(filters, map[string]interface{}{
            "range": map[string]interface{}{
                "picDate": map[string]interface{}{
                    "gte": start.Format(time.DateTime),
                    "lte": end.Format(time.DateTime),
                },
            },
        })
    }
    //for date := startTime; date.Before(nowTime); date = date.Add(24 * time.Hour) {
    //    start := time.Date(date.Year(), date.Month(), date.Day(), locationModel.StartTime, 0, 0, 0, date.Location())
    //    end := time.Date(date.Year(), date.Month(), date.Day(), locationModel.EndTime, 0, 0, 0, date.Location())
    //
    //    //queryTimes = append(queryTimes, map[string]interface{}{
    //    //    "range": map[string]interface{}{
    //    //        "picDate": map[string]interface{}{
    //    //            "gte": start.Format(time.DateTime), // "2006-01-02 15:04:05d"
    //    //            "lte": end.Format(time.DateTime),
    //    //        },
    //    //    },
    //    //})
    //
    //    filters = append(filters, map[string]interface{}{
    //        "range": map[string]interface{}{
    //            "picDate": map[string]interface{}{
    //                "gte": start.Format(time.DateTime),
    //                "lte": end.Format(time.DateTime),
    //            },
    //        },
    //    })
    //}
    //filters = append(filters, map[string]interface{}{
    //    "bool": map[string]interface{}{
    //        "filter": queryTimes,