我有两个名为 'store' 和 'items' 的集合,其中 store 保存的所有产品记录都属于带有时间戳的超市。'items' 记录了一些关于购买的细节。
店铺收藏
{{"id": "802736816700002577966429","$date": "2021-05-05T07:02:51Z","state":"VALID"},{"id": "802736816700002577966430","$date": "2021-07-27T07:02:51Z","state":"NOT VALID"},{"id": "802736816700002577966430","$date": "2021-04-27T07:02:51Z","state":"VALID"}}
物品收藏
{{"id": "802736816700002577966429","$date": "2021-05-05T07:02:51Z"},{"id": "802736816700002577966430","$date": "2021-07-27T07:02:51Z"},{"id": "802736816700002577966430","$date": "2021-07-27T07:02:51Z"}}
我要执行的查询是->
从商店集合中选择状态!= 有效且时间戳<2021-05-10 的项目,然后从项目集合中删除相应的项目
请提供类似于以下的 Spring-boot 标准/聚合代码
标准标准Evt =新标准(....);
聚合aggregationEvt = newAggregation(.....)