标签:mongodb asi ndt mon list force status date cond
条件类似:a=5 or (a=2 and b>3)
BasicDBList endList = new BasicDBList();
BasicDBObject forceEnd = new BasicDBObject();
forceEnd.put("status", 5);
BasicDBList condList = new BasicDBList();
BasicDBObject autoEnd = new BasicDBObject();
condList.add(new BasicDBObject("status", 2));
condList.add(new BasicDBObject("endTime", new BasicDBObject("$lt", new Date())));
autoEnd.put("$and",condList);
endList.add(forceEnd);
endList.add(autoEnd);
basicDBObject.put("$or",endList);
标签:mongodb asi ndt mon list force status date cond
原文地址:http://www.cnblogs.com/lcp12306/p/6101352.html