https://blog.csdn.net/weixin_40986713/article/details/124192456
优化点 有时间可以慢慢全部优化成mybatis-plus风格
private Query eqQuery(Map<String, Object> data) {
Query query = new Query();
if (CollectionUtils.isEmpty(data)) {
return EMPTY_QUERY;
} else {
Criteria criteria = new Criteria();
data.forEach((k, v) -> {
if (v instanceof Collection) {
criteria.and(k).in(((Collection<?>) v).toArray());
} else if (v instanceof Array) {
criteria.and(k).in(v);
}else {
criteria.and(k).is(v);
}
});
return Query.query(criteria);
}
}