随笔分类 -  Mongodb

摘要:1、条件匹配:MatchOperation MatchOperation matchOperation = Aggregation.match(new Criteria().where("area_code").is(areaCode)); 2、分组计数:GroupOperation + count 阅读全文
posted @ 2020-11-05 20:15 蓝色土耳其 阅读(285) 评论(0) 推荐(0)
摘要:背景:系统中需要通过起始时间、结束时间来查询数据1、原写法 if(StringUtil.isNotEmpty(startTime) && StringUtil.isNotEmpty(endTime)){ criteria.and("create_time").gte(startTime); crit 阅读全文
posted @ 2020-10-12 14:36 蓝色土耳其 阅读(1835) 评论(0) 推荐(0)