MongoDB中 字段为数组类型的 时间比较

MongoDB中 字段为数组类型的 时间比较
我有一个这样的数据
{
    "_id" : ObjectId("5d3180f90bf69d240419b1aa"),
    "marketName" : "安德鲁炸鸡汉堡",
    "marketTimes" : [ 
        {
            "_id" : NumberLong(1029),
            "time_open" : "09:00:00",
            "time_over" : "22:00:00",
        }
    ]
}

/* 2 */
{
    "_id" : ObjectId("5d3180f90bf69d240419b1ab"),
    "marketName" : "关爱食尚快餐",
    "marketTimes" : [ 
        {
            "_id" : NumberLong(1030),
            "time_open" : "09:00:00",
            "time_over" : "15:00:00",
        },
        {
            "_id" : NumberLong(1031),
            "time_open" : "17:00:00",
            "time_over" : "22:00:00",                    
        }
    ]
}
我想获取在 marketTimes中在当前时间段的数据, 比如当前为15点30,那第二条数据就不符合条件
mongodb了解的不太多请帮助,谢谢!
原生sql语句 或者java代码都可以。
db.demo147.find({ 'Details.Score': { $gt: 45, $lt: 50 }});

mongodb时间的用的比较少,不过比较用的多,你可以试下

https://www.mongodb.com/docs/
聚合一下,做时间查询,或者感觉你这个格式可以变成int直接对比就行了

目前的时间使用字符串,比较起来会有问题,建议转为时间戳。

db.products.insertMany( [
      {
    "_id" : ObjectId("5d3180f90bf69d240419b1aa"),
    "marketName" : "安德鲁炸鸡汉堡",
    "marketTimes" : [ 
        {
            "_id" : NumberLong(1029),
            "time_open" : "09:00:00",
            "time_over" : "22:00:00",
        }
    ]
},
{
    "_id" : ObjectId("5d3180f90bf69d240419b1ab"),
    "marketName" : "关爱食尚快餐",
    "marketTimes" : [ 
        {
            "_id" : NumberLong(1030),
            "time_open" : "09:00:00",
            "time_over" : "15:00:00",
        },
        {
            "_id" : NumberLong(1031),
            "time_open" : "17:00:00",
            "time_over" : "22:00:00",                    
        }
    ]
},
   ] );

> db.products.find({"marketTimes.time_open" : {"$lte" : "15:30:00"}, "marketTimes.time_over" : {"$gte" : "15:30:00"}}, {marketTimes:1})
{ "_id" : ObjectId("5d3180f90bf69d240419b1aa"), "marketTimes" : [ { "_id" : NumberLong(1029), "time_open" : "09:00:00", "time_over" : "22:00:00" } ] }
{ "_id" : ObjectId("5d3180f90bf69d240419b1ab"), "marketTimes" : [ { "_id" : NumberLong(1030), "time_open" : "09:00:00", "time_over" : "15:00:00" }, { "_id" : NumberLong(1031), "time_open" : "17:00:00", "time_over" : "22:00:00" } ] }