我有json,如下所示我想建立查询,以便我将传递一个日期,我想如果囤积包含statusQueues然后最大campaignEndDate小于输入的日期应返回。我怎么能这样做?
"hoardings" : [ {
"isActive" : false,
"id" : "5a9a4c7af5369628809e8124",
"statusQueues" : [ {
"campaignStartDate" : "03 Mar, 2018",
"campaignEndDate" : "27 Mar, 2018",
"module" : "Campaign"
}, {
"campaignStartDate" : "03 Mar, 2018",
"campaignEndDate" : "28 Mar, 2018",
"module" : "Campaign"
}, {
"campaignStartDate" : "03 Mar, 2018",
"campaignEndDate" : "29 Mar, 2018",
"module" : "Campaign"
},
{
"campaignStartDate" : "03 Mar, 2018",
"campaignEndDate" : "20 Mar, 2018",
"module" : "Campaign"
} ]
},
{
"isActive" : false,
"id" : "5a9a4c7af5369628809e8125",
"statusQueues" : [ ]
}]
我尝试过使用mongoTemplate但无法为此编写查询。