我找到了 !:
val query = BSONDocument()
.equal("userId", user.id.map(_.value).map(_.toLong).get)
.greaterThanOrEqual("start", interval.start.jodaDateTime)
.lesserThan("end", interval.end.jodaDateTime)
.count("RREntity")
println(BSONDocument.pretty(query))