当前位置:Gxlcms > 数据库问题 > java里mongodb复合查询

java里mongodb复合查询

时间:2021-07-01 10:21:17 帮助过:22人阅读

Query query = new Query();
Criteria criteria = Criteria.where("packetTitle").is(redPacketStatVO.getActiveTitle())
.and("activeCode").is(redPacketStatVO.getActiveCode())
.and("packetDetailStatus").is(RedPacketDetailStatusEnum.FINISH.getValue())
.and("drawStatus").is(RedPacketDrawEnum.GET_PACKET.getValue());
query.addCriteria(criteria);

//领取总量
List<RedPacketDraw> drawTotals = mongoTemplate.find(query, RedPacketDraw.class);

java里mongodb复合查询

标签:list   detail   get   tde   template   class   ODB   temp   iter   

人气教程排行