mongoDb 多条件模糊查询
//模糊匹配
Pattern pattern = Pattern.compile("^.*" + dto.getQueryKey() + ".*$", Pattern.CASE_INSENSITIVE);
Criteria cr = new Criteria();
//多条件模糊查询
query.addCriteria(cr.orOperator(
Criteria.where("collectorNo").regex(pattern),
Criteria.where("username").regex(pattern),
Criteria.where("value").regex(pattern),
Criteria.where("electricValveName").regex(pattern)));
}