废话不多说,直接上代码
public void findOne() {
Query query = new Query();
//使用数字大小进行排序
Document document = Collation.of("zh").toDocument();
document.put("numericOrdering",true);
query.collation(Collation.from(document));
query.with(new Sort(Sort.Direction.DESC, "version"));
centerTemplate.findOne(query, VersionCreateRecord.class);
}
有不懂的加我QQ:1169592202
请备注来意