使用Mongo模板。
Criteria find = Criteria.where("company").is("Random");Query query = new Query().addCriteria(find).with(new Sort(Sort.Direction.DESC, "reportDate"));BasicDBObject result = mongoOperations.findOne(query, BasicDBObject.class, "collection_name");使用Mongo存储库
Report findTopByCompanyOrderByReportDateDesc(String company)



