Как мне выполнить эту операцию в весенних данных mongodb?
$group: {
"_id": {orderDate: {"$substr": ["$localDate",0,params.getDateType]},storeId: "$storeId"},
"date": {"$last": {"$substr": ["$localDate",0,params.getDateType]}
},
Пока я пробовал это.
GroupOperation groupOperation = Aggregation.group(String.valueOf(new BasicDBObject("orderDate",
StringOperators.Substr.valueOf("localDate").substring(0,dateType))))
.last(String.valueOf(new BasicDBObject("orderDate",
StringOperators.Substr.valueOf("localDate").substring(0,dateType)))).as("date")
Заранее спасибо.