mongodb分组聚合查询以及spring-data-mongodb实现
1. mongodb复杂查询查找2020年1月1日以后有操作记录但是2020年6月1日后未上线的用户db.user_history.aggregate([ { $match : { 'updateTime' : { $gte : ISODate("2020-01-01T00:00:00Z") } } }, { $group: { _id: '$userId', last: {
原创
2020-10-10 17:04:31 ·
790 阅读 ·
1 评论