摘要: 一、MongoTemplate 中 Aggregation 应用 使用Aggregation聚合查询 支持返回固定字段 支持分组计算(count)总数、(sum)求和、(avg)平均值、(max)最大值、(min)最小值等 public Page<Student> getListWithAggreg 阅读全文
posted @ 2024-03-19 09:34 东北大亨 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 在mongo中 aggregation(聚合应用) 1、插入测试数据 db.tycoon.insertMany( [ {item:"paper",tycoon:25,size:{h:14, w:21,cm:"and" },status:"A"}, {item:"notebook",tycoon:50 阅读全文
posted @ 2024-03-19 08:36 东北大亨 阅读(5) 评论(0) 推荐(0) 编辑